add short arg parsers to device add command

Without the single char (with ':' if optarg expected) only the long
argument string would successfully parse.

For example, now "-lasdf" parses the same as "--label asdf"
This commit is contained in:
Evan Richter 2024-04-29 10:16:13 -06:00
parent b832e3b2f7
commit a739671c0b

View File

@ -74,7 +74,7 @@ int cmd_device_add(int argc, char *argv[])
bool force = false;
int opt;
while ((opt = getopt_long(argc, argv, "fh",
while ((opt = getopt_long(argc, argv, "S:B:Dl:fh",
longopts, NULL)) != -1)
switch (opt) {
case 'S':