[PATCH] Style guide: add "Required_argument" example to applet_longopts
Jody Bruchon
jody at jodybruchon.com
Wed Feb 9 04:25:58 UTC 2022
-------------- next part --------------
From 48532ee17f752a9bbf4dbf6cb1d7662004c41756 Mon Sep 17 00:00:00 2001
From: Jody Bruchon <jody at jodybruchon.com>
Date: Wed, 31 Mar 2021 11:30:31 -0400
Subject: [PATCH] Style guide: add "Required_argument" example to
applet_longopts
Signed-off-by: Jody Bruchon <jody at jodybruchon.com>
---
docs/style-guide.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/docs/style-guide.txt b/docs/style-guide.txt
index 9eed7f125..768bca92d 100644
--- a/docs/style-guide.txt
+++ b/docs/style-guide.txt
@@ -680,8 +680,9 @@ line in the midst of your #includes, if you need to parse long options:
Then have long options defined:
static const char <applet>_longopts[] ALIGN1 =
- "list\0" No_argument "t"
- "extract\0" No_argument "x"
+ "list\0" No_argument "t"
+ "extract\0" No_argument "x"
+ "directory\0" Required_argument "C"
;
And a code block similar to the following near the top of your applet_main()
--
2.15.0
More information about the busybox
mailing list