Signed-off-by: David Goulet <david.goulet@polymtl.ca>
// TODO: recursive create dir
ret = mkdir(chan->pathname, S_IRWXU | S_IRWXG );
if (ret < 0) {
- perror("mkdir trace path");
- ret = -errno;
- goto error;
+ if (ret != EEXIST) {
+ perror("mkdir trace path");
+ ret = -errno;
+ goto error;
+ }
}
}
ret = mkdir(KCONSUMERD_PATH, S_IRWXU | S_IRWXG);
if (ret < 0) {
- ERR("Failed to create " KCONSUMERD_PATH);
- goto error;
+ if (errno != EEXIST) {
+ ERR("Failed to create " KCONSUMERD_PATH);
+ goto error;
+ }
+ ret = 0;
}
/* Create the kconsumerd error unix socket */