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

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
This commit is contained in:
San Mehat 2009-12-24 09:31:41 +01:00 committed by Daniel Baumann
parent 0657e01898
commit b8f3efed9c

View File

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