diff options
author | Tyler Murphy <tylerm@tylerm.dev> | 2023-05-14 21:43:02 -0400 |
---|---|---|
committer | Tyler Murphy <tylerm@tylerm.dev> | 2023-05-14 21:43:02 -0400 |
commit | e735ad6710a82604a206ad29f6cbcdd7dc4b024c (patch) | |
tree | 5fe8eebbb7a2bff20bb71bd2368955356979e0a2 /command/sync.c | |
parent | sync (diff) | |
download | lazysphere-e735ad6710a82604a206ad29f6cbcdd7dc4b024c.tar.gz lazysphere-e735ad6710a82604a206ad29f6cbcdd7dc4b024c.tar.bz2 lazysphere-e735ad6710a82604a206ad29f6cbcdd7dc4b024c.zip |
refactor and add su
Diffstat (limited to 'command/sync.c')
-rw-r--r-- | command/sync.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/command/sync.c b/command/sync.c index 797d7a5..89ff86f 100644 --- a/command/sync.c +++ b/command/sync.c @@ -1,12 +1,9 @@ -#include "args.h" #include "command.h" #include "lslib.h" -#define _X_OPEN_SOURCE 500 #include <stdlib.h> #include <unistd.h> #include <fcntl.h> -#include <errno.h> #include <string.h> static struct { @@ -58,7 +55,7 @@ static bool sync_file(char* path) { } else { ret = flags.sync_data ? fdatasync(fd) : fsync(fd); if (ret < 0) { - error_s("failed to sync '%s': %s", path, strerror(errno)); + error_s("failed to sync '%s'", path); } } |