ratox

FIFO based tox client
git clone git://git.2f30.org/ratox
Log | Files | Refs | README | LICENSE

commit dece4cc791d66c75c89caead1b44dafe92227ce2
parent c22deaffa3f61b2ea4577c44b4ec20fb24ea917b
Author: sin <sin@2f30.org>
Date:   Fri, 26 Sep 2014 16:20:39 +0100

Style fix

Diffstat:
Mratox.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/ratox.c b/ratox.c @@ -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);