diff options
author | San Mehat <san@google.com> | 2009-05-18 09:53:56 -0700 |
---|---|---|
committer | San Mehat <san@google.com> | 2009-05-18 09:53:56 -0700 |
commit | c869ac135194dedcc218c4e1a8ad26a391d19208 (patch) | |
tree | 40004e86f527ca248d0daa7feed494e5fe528a49 | |
parent | cbb96659ea274f612c178abcf3abe8de4298e55f (diff) | |
download | dosfstools-c869ac135194dedcc218c4e1a8ad26a391d19208.tar.gz |
dosfsck: Add custom exit code for the case where the FS is read only
Signed-off-by: San Mehat <san@google.com>
-rw-r--r-- | src/io.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |