From 8b37d93f7d33dae2d7ad8aad35a2202a3bdcf46a Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Sun, 3 Nov 2013 10:19:58 -0800 Subject: [PATCH] Fixed #ifdefs in buse.c A couple #ifdefs were broken because the identifiers they were testing are defined as members of an enum, not as macros. This commit changes them to use actual macros that ought to serve the intended purpose of feature checking. --- buse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buse.c b/buse.c index 93dfd20..69039b7 100644 --- a/buse.c +++ b/buse.c @@ -177,14 +177,14 @@ int buse_main(const char* dev_file, const struct buse_operations *aop, void *use assert(aop->disc); aop->disc(userdata); return 0; -#if defined NBD_CMD_FLUSH +#ifdef NBD_FLAG_SEND_FLUSH case NBD_CMD_FLUSH: assert(aop->flush); reply.error = aop->flush(userdata); write_all(sk, (char*)&reply, sizeof(struct nbd_reply)); break; #endif -#if defined NBD_CMD_TRIM +#ifdef NBD_FLAG_SEND_TRIM case NBD_CMD_TRIM: assert(aop->trim); reply.error = aop->trim(from, len, userdata);