diff options
Diffstat (limited to 'src/shared/_usage.h')
-rw-r--r-- | src/shared/_usage.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/shared/_usage.h b/src/shared/_usage.h index 91b956e0..eb80bb3c 100644 --- a/src/shared/_usage.h +++ b/src/shared/_usage.h @@ -12,8 +12,9 @@ #include <getopt.h> #include <stdlib.h> +#include <librc.h> -#define getoptstring_COMMON "ChqVv" +#define getoptstring_COMMON "ChqVvU" #define longopts_COMMON \ { "help", 0, NULL, 'h'}, \ @@ -21,6 +22,7 @@ { "version", 0, NULL, 'V'}, \ { "verbose", 0, NULL, 'v'}, \ { "quiet", 0, NULL, 'q'}, \ + { "user", 0, NULL, 'U'}, \ { NULL, 0, NULL, 0 } #define longopts_help_COMMON \ @@ -28,13 +30,15 @@ "Disable color output", \ "Display software version", \ "Run verbosely", \ - "Run quietly (repeat to suppress errors)" + "Run quietly (repeat to suppress errors)", \ + "Run in user mode" #define case_RC_COMMON_getopt_case_C setenv ("EINFO_COLOR", "NO", 1); #define case_RC_COMMON_getopt_case_h usage (EXIT_SUCCESS); #define case_RC_COMMON_getopt_case_V if (argc == 2) show_version(); #define case_RC_COMMON_getopt_case_v setenv ("EINFO_VERBOSE", "YES", 1); #define case_RC_COMMON_getopt_case_q set_quiet_options(); +#define case_RC_COMMON_getopt_case_U rc_set_user(); #define case_RC_COMMON_getopt_default usage (EXIT_FAILURE); #define case_RC_COMMON_GETOPT \ @@ -43,6 +47,7 @@ case 'V': case_RC_COMMON_getopt_case_V; break; \ case 'v': case_RC_COMMON_getopt_case_v; break; \ case 'q': case_RC_COMMON_getopt_case_q; break; \ + case 'U': case_RC_COMMON_getopt_case_U; break; \ default: case_RC_COMMON_getopt_default; break; extern const char *applet; |