diff options
author | sin <sin@2f30.org> | 2014-09-26 16:20:39 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-26 16:20:39 +0100 |
commit | dece4cc791d66c75c89caead1b44dafe92227ce2 (patch) | |
tree | d935b333a02a752cd761bb784775eb56dffb875d | |
parent | c22deaffa3f61b2ea4577c44b4ec20fb24ea917b (diff) |
Style fix
-rw-r--r-- | ratox.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -756,18 +756,22 @@ localinit(void) r = mkdir(gslots[i].name, 0755); if (r < 0 && errno != EEXIST) eprintf("mkdir %s:", gslots[i].name); + d = opendir(gslots[i].name); if (!d) eprintf("opendir %s:", gslots[i].name); + r = dirfd(d); if (r < 0) eprintf("dirfd %s:", gslots[i].name); gslots[i].dirfd = r; + for (m = 0; m < LEN(gfiles); m++) { if (gfiles[m].type == FIFO) { r = mkfifoat(gslots[i].dirfd, gfiles[m].name, 0644); if (r < 0 && errno != EEXIST) eprintf("mkfifoat %s:", gfiles[m].name); + r = openat(gslots[i].dirfd, gfiles[m].name, gfiles[m].flags, 0644); if (r < 0) eprintf("openat %s:", gfiles[m].name); @@ -781,6 +785,7 @@ localinit(void) r = mkdirat(gslots[i].dirfd, gfiles[m].name, 0777); if (r < 0 && errno != EEXIST) eprintf("mkdirat %s:", gfiles[m].name); + r = openat(gslots[i].dirfd, gfiles[m].name, O_RDONLY | O_DIRECTORY); if (r < 0) eprintf("openat %s:", gfiles[m].name); |