aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-08-13 10:16:02 +0300
committerCem Keylan <cem@ckyln.com>2020-08-13 10:16:02 +0300
commit4be7cbedb5f10025c9a59728848b2d7c4a42c195 (patch)
tree6deb17bc91046a72bc76fc1d3a476327a27ed99d
parent82d9f75804c462e8532c2451450ad1ea82d13aaf (diff)
downloadinit-4be7cbedb5f10025c9a59728848b2d7c4a42c195.tar.gz
shalt: sync filesystems
-rw-r--r--bin/shalt.c4
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);