afsd: Detect -dcache presence correctly
authorAndrew Deason <adeason@sinenomine.net>
Mon, 21 May 2012 23:14:16 +0000 (18:14 -0500)
committerDerrick Brashear <shadow@dementix.org>
Tue, 22 May 2012 00:51:58 +0000 (17:51 -0700)
cmd_OptionAsInt will return 0 if the requested option is present and
valid.

Change-Id: Ie5154648ccb274b04617dcb8cc397ed3aa3d97e6
Reviewed-on: http://gerrit.openafs.org/7444
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/afsd/afsd.c

index 0bed7e2..5fe8b04 100644 (file)
@@ -1735,7 +1735,7 @@ mainproc(struct cmd_syndesc *as, void *arock)
        }
     }
 
-    if (cmd_OptionAsInt(as, OPT_dcache, &dCacheSize))
+    if (cmd_OptionAsInt(as, OPT_dcache, &dCacheSize) == 0)
        sawDCacheSize = 1;
 
     cmd_OptionAsInt(as, OPT_volumes, &vCacheSize);