From b8f3efed9cb0265968d0d5f2310eb9241a1b5650 Mon Sep 17 00:00:00 2001 From: San Mehat Date: Thu, 24 Dec 2009 09:31:41 +0100 Subject: [PATCH] Adding custom exit code in dosfsck for the case where the FS is read only. Signed-off-by: Daniel Baumann --- src/io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/io.c b/src/io.c index 49d0196..c4457a8 100644 --- a/src/io.c +++ b/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;