Changeset 8d74fdd in mainline for uspace/app/sysctl/main.c
- Timestamp:
- 2019-08-17T13:57:05Z (6 years ago)
- Children:
- f92b315
- Parents:
- be07995
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2016-01-27 00:01:13)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-17 13:57:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sysctl/main.c
rbe07995 r8d74fdd 39 39 #include <str_error.h> 40 40 #include <sysman/ctl.h> 41 #include <unistd.h> 41 42 42 43 #define NAME "sysctl" … … 141 142 } 142 143 144 static int shutdown(int argc, char *argv[]) 145 { 146 const int delay = 3; 147 printf("Will shutdown in %i seconds...\n", delay); 148 sleep(delay); 149 printf("Shutdown now.\n"); 150 151 int rc = sysman_shutdown(); 152 if (rc != EOK) { 153 printf("Shutdown request failed: %s.\n", str_error(rc)); 154 } 155 return rc; 156 } 157 143 158 command_t commands[] = { 144 159 { "list-units", 0, &list_units }, 145 160 { "start", 1, &start }, 146 161 { "stop", 1, &stop }, 162 { "shutdown", 0, &shutdown }, 147 163 { 0 } 148 164 };
Note:
See TracChangeset
for help on using the changeset viewer.