X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fsck.c;h=19f7be67739a5f1a0751e4f9dcb1460a4f45084b;hp=4d7198202a41363b822e8ea29b56383135eb853c;hb=c458b9d45e7c6ddda6285fca3797fddff815bd0a;hpb=80b069cfa99275331c28a15f8c7b9c77c41d80c4 diff --git a/fsck.c b/fsck.c index 4d719820..19f7be67 100644 --- a/fsck.c +++ b/fsck.c @@ -789,12 +789,12 @@ static int dump_rows(char *dump_dir, struct osl_table *t) current_dir = make_message("%s/rows_%u-%u", dump_dir, i, i + 999); PARA_NOTICE_LOG("dumping rows %u - %u\n", i, i + 999); ret = para_mkdir(current_dir, 0777); - if (ret < 0 && ret != -E_EXIST) + if (ret < 0 && !is_errno(-ret, EEXIST)) goto out; } row_dir = make_message("%s/row_%03u", current_dir, i); ret = para_mkdir(row_dir, 0777); - if (ret < 0 && ret != -E_EXIST) { + if (ret < 0 && !is_errno(-ret, EEXIST)) { free(row_dir); goto out; } @@ -818,11 +818,11 @@ static int dump_table(char *dump_dir, struct osl_table_description *desc) if (ret < 0) goto out; ret = para_mkdir(dump_dir, 0777); - if (ret < 0 && ret != -E_EXIST) + if (ret < 0 && !is_errno(-ret, EEXIST)) goto out; table_dump_dir = make_message("%s/%s", dump_dir, desc->name); ret = para_mkdir(table_dump_dir, 0777); - if (ret < 0 && ret != -E_EXIST) + if (ret < 0 && !is_errno(-ret, EEXIST)) goto out; desc_file = make_message("%s/table_description.c", table_dump_dir); ret = para_open(desc_file, O_WRONLY | O_CREAT | O_EXCL, 0644);