diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:52:39 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:52:39 +0200 |
commit | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (patch) | |
tree | b88cc7a8457658d67e0321718556ac807f6bccf3 /src/maildirmake.c | |
parent | 00be7622c428f279872f84569f098ce16150f8a8 (diff) |
format files
Diffstat (limited to 'src/maildirmake.c')
-rw-r--r-- | src/maildirmake.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/maildirmake.c b/src/maildirmake.c index 47edc44..6828df9 100644 --- a/src/maildirmake.c +++ b/src/maildirmake.c @@ -1,24 +1,19 @@ #include <sys/stat.h> #include <unistd.h> -#include "logmsg.h" + #include "exit.h" +#include "logmsg.h" #define WHO "maildirmake" int main(int argc, char **argv) { umask(077); - if (!argv[1]) - logmsg(WHO,100,USAGE,"maildirmake name"); - if (mkdir(argv[1],0700) == -1) - logmsg(WHO,111,FATAL,B("unable to mkdir: ",argv[1])); - if (chdir(argv[1]) == -1) - logmsg(WHO,111,FATAL,B("unable to chdir to: ",argv[1])); - if (mkdir("tmp",0700) == -1) - logmsg(WHO,111,FATAL,B("unable to mkdir: ",argv[1],"/tmp")); - if (mkdir("new",0700) == -1) - logmsg(WHO,111,FATAL,B("unable to mkdir: ",argv[1],"/new")); - if (mkdir("cur",0700) == -1) - logmsg(WHO,111,FATAL,B("unable to mkdir: ",argv[1],"/cur")); + if (!argv[1]) logmsg(WHO, 100, USAGE, "maildirmake name"); + if (mkdir(argv[1], 0700) == -1) logmsg(WHO, 111, FATAL, B("unable to mkdir: ", argv[1])); + if (chdir(argv[1]) == -1) logmsg(WHO, 111, FATAL, B("unable to chdir to: ", argv[1])); + if (mkdir("tmp", 0700) == -1) logmsg(WHO, 111, FATAL, B("unable to mkdir: ", argv[1], "/tmp")); + if (mkdir("new", 0700) == -1) logmsg(WHO, 111, FATAL, B("unable to mkdir: ", argv[1], "/new")); + if (mkdir("cur", 0700) == -1) logmsg(WHO, 111, FATAL, B("unable to mkdir: ", argv[1], "/cur")); _exit(0); } |