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:
parent
0657e01898
commit
b8f3efed9c
6
src/io.c
6
src/io.c
@ -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;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user