commit 4be7cbedb5f10025c9a59728848b2d7c4a42c195
parent 82d9f75804c462e8532c2451450ad1ea82d13aaf
Author: Cem Keylan <cem@ckyln.com>
Date: Thu, 13 Aug 2020 10:16:02 +0300
shalt: sync filesystems
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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);