diff options
author | Cem Keylan <cem@ckyln.com> | 2020-08-13 10:16:02 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-08-13 10:16:02 +0300 |
commit | 4be7cbedb5f10025c9a59728848b2d7c4a42c195 (patch) | |
tree | 6deb17bc91046a72bc76fc1d3a476327a27ed99d /bin | |
parent | 82d9f75804c462e8532c2451450ad1ea82d13aaf (diff) | |
download | init-4be7cbedb5f10025c9a59728848b2d7c4a42c195.tar.gz |
shalt: sync filesystems
Diffstat (limited to 'bin')
-rw-r--r-- | bin/shalt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/shalt.c b/bin/shalt.c index 1fa5428..9dc0028 100644 --- a/bin/shalt.c +++ b/bin/shalt.c @@ -2,7 +2,7 @@ #include <sys/reboot.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include <unistd.h> static char *argv0; #include "arg.h" @@ -17,6 +17,8 @@ usage(void) int main(int argc, char *argv[]) { + sync(); + ARGBEGIN { case 'p': reboot(RB_POWER_OFF); |