static int do_menutree(int argc, char *argv[]) { int opt, ret; char *path = "/env/menu"; while ((opt = getopt(argc, argv, "m:")) > 0) { switch (opt) { case 'm': path = optarg; break; } } ret = menutree(path, 1); return ret; }
static int do_menutree(int argc, char *argv[]) { int opt, ret; char *path = "/env/menu"; login(); while ((opt = getopt(argc, argv, "m:")) > 0) { switch (opt) { case 'm': path = optarg; break; default: return COMMAND_ERROR_USAGE; } } ret = menutree(path, 1); return ret; }