Closed FiYHer closed 3 years ago
for (;;) {
opt = getopt_long(argc, argv, "pr:l", opts, NULL);
if (opt == -1)
break;
switch (opt) {
case 'p':
parsable = TRUE;
break;
case 'r':
ret = list_exported_devices(optarg);
goto out;
case 'l':
ret = list_devices(parsable);
goto out;
default:
break;
}
}
opt = getopt_long(argc, argv, "p:r:l", opts, NULL);
@FiYHer : I don't think so. The current implementation seems to be correct. A colon appears only if an additional argument(optarg) is required.
change wuf to w:u:f
int opt = getopt_long(argc, argv, "w:u:f", opts, NULL);