Made stdio-drives work on readonly CD block devices

This commit is contained in:
2007-09-24 18:14:07 +00:00
parent c78403d8cf
commit 78c16e7590
3 changed files with 5 additions and 6 deletions

View File

@ -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;