summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-05-18 10:01:38 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-05-18 10:01:38 -0700
commit12c7c940033906326f2f7d71a9b37c1bd5c69bb8 (patch)
tree40004e86f527ca248d0daa7feed494e5fe528a49
parent418f78e9efb3a5e1faa8498a17137471af35b147 (diff)
parentc869ac135194dedcc218c4e1a8ad26a391d19208 (diff)
downloaddosfstools-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/io.c b/src/io.c
index 0ab0bbf..e1b07fc 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;