瀏覽代碼

Adding custom exit code in dosfsck for the case where the FS is read only.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
San Mehat 14 年之前
父節點
當前提交
b8f3efed9c
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/io.c

+ 4 - 2
src/io.c

@@ -76,8 +76,10 @@ void fs_open(char *path,int rw)
 {
     struct stat stbuf;
 
-    if ((fd = open(path,rw ? O_RDWR : O_RDONLY)) < 0)
-	pdie("open %s",path);
+    if ((fd = open(path,rw ? O_RDWR : O_RDONLY)) < 0) {
+       perror("open");
+       exit(6);
+    }
     changes = last = NULL;
     did_change = 0;