summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-09-18 15:29:10 +0100
committersin <sin@2f30.org>2014-09-18 15:29:10 +0100
commitb9e230f439c31ebeabd7b62d7d31cdd25f98986b (patch)
tree09304385878350d71aa2a94eb741786969abf6e3
parentee80990c3ba4c953d6bb9cc68f5c98b99f4b5152 (diff)
OUT_F is reserved for the edge-case where we don't know if OUT is a STATIC or FOLDER
So use STATIC here.
-rw-r--r--ratox.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ratox.c b/ratox.c
index 9edf05d..c1f8ff9 100644
--- a/ratox.c
+++ b/ratox.c
@@ -94,12 +94,12 @@ enum {
};
static struct file ffiles[] = {
- { .type = FIFO, .name = "text_in", .flags = O_RDWR | O_NONBLOCK, .mode = 0644 },
- { .type = FIFO, .name = "file_in", .flags = O_RDWR | O_NONBLOCK, .mode = 0644 },
- { .type = OUT_F, .name = "online", .flags = O_WRONLY | O_TRUNC | O_CREAT, .mode = 0644 },
- { .type = OUT_F, .name = "name", .flags = O_WRONLY | O_TRUNC | O_CREAT, .mode = 0644 },
- { .type = OUT_F, .name = "status", .flags = O_WRONLY | O_TRUNC | O_CREAT, .mode = 0644 },
- { .type = OUT_F, .name = "text_out", .flags = O_WRONLY | O_APPEND | O_CREAT, .mode = 0644 },
+ { .type = FIFO, .name = "text_in", .flags = O_RDWR | O_NONBLOCK, .mode = 0644 },
+ { .type = FIFO, .name = "file_in", .flags = O_RDWR | O_NONBLOCK, .mode = 0644 },
+ { .type = STATIC, .name = "online", .flags = O_WRONLY | O_TRUNC | O_CREAT, .mode = 0644 },
+ { .type = STATIC, .name = "name", .flags = O_WRONLY | O_TRUNC | O_CREAT, .mode = 0644 },
+ { .type = STATIC, .name = "status", .flags = O_WRONLY | O_TRUNC | O_CREAT, .mode = 0644 },
+ { .type = STATIC, .name = "text_out", .flags = O_WRONLY | O_APPEND | O_CREAT, .mode = 0644 },
};
enum {
@@ -733,7 +733,7 @@ friendcreate(int32_t fid)
perror("open");
exit(EXIT_FAILURE);
}
- } else if (ffiles[i].type == OUT_F) {
+ } else if (ffiles[i].type == STATIC) {
r = open(ffiles[i].name, ffiles[i].flags, ffiles[i].mode);
if (r < 0) {
perror("open");