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.
This commit is contained in:
Adam Cozzette 2013-11-03 10:19:58 -08:00
parent 3d47e9d5bf
commit 8b37d93f7d
1 changed files with 2 additions and 2 deletions

4
buse.c
View File

@ -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);