diff options
author | San Mehat <san@google.com> | 2009-05-18 10:01:38 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-05-18 10:01:38 -0700 |
commit | 12c7c940033906326f2f7d71a9b37c1bd5c69bb8 (patch) | |
tree | 40004e86f527ca248d0daa7feed494e5fe528a49 | |
parent | 418f78e9efb3a5e1faa8498a17137471af35b147 (diff) | |
parent | c869ac135194dedcc218c4e1a8ad26a391d19208 (diff) | |
download | dosfstools-12c7c940033906326f2f7d71a9b37c1bd5c69bb8.tar.gz |
am c869ac13: dosfsck: Add custom exit code for the case where the FS is read only
Merge commit 'c869ac135194dedcc218c4e1a8ad26a391d19208'
* commit 'c869ac135194dedcc218c4e1a8ad26a391d19208':
dosfsck: Add custom exit code for the case where the FS is read only
-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; |