From 34269870665679912f22b1eb88485dbd58e2bd2d Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Thu, 13 Oct 2011 15:17:06 -0700 Subject: [PATCH] Adding a more correct trim function prototype to the struct of block device operations. --- buse.c | 2 +- buse.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buse.c b/buse.c index f22cf3b..e647371 100644 --- a/buse.c +++ b/buse.c @@ -124,7 +124,7 @@ int buse_main(int argc, char *argv[], const struct buse_operations *aop, void *u aop->flush(); break; case NBD_CMD_TRIM: - aop->trim(); + aop->trim(from, len); break; default: assert(0); diff --git a/buse.h b/buse.h index 4ed587f..bcf792e 100644 --- a/buse.h +++ b/buse.h @@ -8,7 +8,7 @@ struct buse_operations { int (*write)(const void *buf, u_int32_t len, u_int64_t offset); int (*disc)(); int (*flush)(); - int (*trim)(); + int (*trim)(u_int64_t from, u_int32_t len); u_int64_t size; };