return retval;
}
+static bool want_oldstyle(struct generic_conf gct, struct generic_conf* gc) {
+ if(gct.flags & F_OLDSTYLE) {
+ return true;
+ }
+ if(gc == NULL) {
+ return false;
+ }
+ if(gc->flags & F_OLDSTYLE) {
+ return true;
+ }
+ return false;
+}
/**
* Parse the config file.
*
if(i==1 || !expect_generic) {
p=lp;
p_size=lp_size;
- if(!(glob_flags & F_OLDSTYLE)) {
+ if(!want_oldstyle(genconftmp, genconf)) {
lp[1].required = FALSE;
}
}
} else {
s.virtstyle=VIRT_IPLIT;
}
- if(s.port && !(glob_flags & F_OLDSTYLE)) {
+ if(s.port && !want_oldstyle(genconftmp, genconf)) {
g_warning("A port was specified, but oldstyle exports were not requested. This may not do what you expect.");
g_warning("Please read 'man 5 nbd-server' and search for oldstyle for more info");
}