@@ -28,6 +28,7 @@ static int shutdown_help(void) {
2828 " -k Don't halt/power-off/reboot, just send warnings\n"
2929 " --no-wall Don't send wall message before halt/power-off/reboot\n"
3030 " -c Cancel a pending shutdown\n"
31+ " --show Show pending shutdown\n"
3132 "\nSee the %s for details.\n" ,
3233 program_invocation_short_name ,
3334 ansi_highlight (),
@@ -40,7 +41,8 @@ static int shutdown_help(void) {
4041int shutdown_parse_argv (int argc , char * argv []) {
4142 enum {
4243 ARG_HELP = 0x100 ,
43- ARG_NO_WALL
44+ ARG_NO_WALL ,
45+ ARG_SHOW
4446 };
4547
4648 static const struct option options [] = {
@@ -50,6 +52,7 @@ int shutdown_parse_argv(int argc, char *argv[]) {
5052 { "reboot" , no_argument , NULL , 'r' },
5153 { "kexec" , no_argument , NULL , 'K' }, /* not documented extension */
5254 { "no-wall" , no_argument , NULL , ARG_NO_WALL },
55+ { "show" , no_argument , NULL , ARG_SHOW },
5356 {}
5457 };
5558
@@ -108,6 +111,10 @@ int shutdown_parse_argv(int argc, char *argv[]) {
108111 arg_action = ACTION_CANCEL_SHUTDOWN ;
109112 break ;
110113
114+ case ARG_SHOW :
115+ arg_action = ACTION_SHOW_SHUTDOWN ;
116+ break ;
117+
111118 case '?' :
112119 return - EINVAL ;
113120
0 commit comments