From b832e3b2f7f548c867ca57b09efb394f82615df0 Mon Sep 17 00:00:00 2001 From: Evan Richter Date: Mon, 29 Apr 2024 09:59:16 -0600 Subject: [PATCH 1/2] remove --tier from device add getopt parser --- c_src/cmd_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/cmd_device.c b/c_src/cmd_device.c index b4bcd345..1fffc01d 100644 --- a/c_src/cmd_device.c +++ b/c_src/cmd_device.c @@ -74,7 +74,7 @@ int cmd_device_add(int argc, char *argv[]) bool force = false; int opt; - while ((opt = getopt_long(argc, argv, "t:fh", + while ((opt = getopt_long(argc, argv, "fh", longopts, NULL)) != -1) switch (opt) { case 'S': From a739671c0b33d688c12524e681d95001b54d0962 Mon Sep 17 00:00:00 2001 From: Evan Richter Date: Mon, 29 Apr 2024 10:16:13 -0600 Subject: [PATCH 2/2] 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" --- c_src/cmd_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/cmd_device.c b/c_src/cmd_device.c index 1fffc01d..c86fb7f1 100644 --- a/c_src/cmd_device.c +++ b/c_src/cmd_device.c @@ -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':