Made stdio-drives work on readonly CD block devices
This commit is contained in:
@ -1379,7 +1379,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
||||
struct statvfs vfsbuf;
|
||||
char testpath[4096], *cpt;
|
||||
long blocks;
|
||||
int open_mode = O_RDWR, fd, ret;
|
||||
int open_mode = O_RDONLY, fd, ret;
|
||||
off_t add_size = 0;
|
||||
|
||||
testpath[0] = 0;
|
||||
@ -1396,8 +1396,6 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
||||
if (stat(testpath, &stbuf) == -1)
|
||||
return -1;
|
||||
} else if(S_ISBLK(stbuf.st_mode)) {
|
||||
if(burn_sg_open_o_excl)
|
||||
open_mode |= O_EXCL;
|
||||
fd = open(path, open_mode);
|
||||
if (fd == -1)
|
||||
return -2;
|
||||
|
Reference in New Issue
Block a user