Fixed a bug with failed opening of pseudo-drive

This commit is contained in:
Thomas Schmitt 2007-09-05 19:53:50 +00:00
parent d2579c0671
commit ab5f294c57
2 changed files with 6 additions and 4 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2007.09.05.194124"
#define Cdrskin_timestamP "2007.09.05.195248"

View File

@ -1757,9 +1757,6 @@ early_failure:;
/* ts A70904 */
int burn_stdio_open_write(struct burn_drive *d, off_t start_byte, int flag)
{
int fd = -1;
int mode = O_RDWR | O_CREAT;
char msg[160];
/* <<< We need _LARGEFILE64_SOURCE defined by the build system.
*/
@ -1767,6 +1764,10 @@ int burn_stdio_open_write(struct burn_drive *d, off_t start_byte, int flag)
#define O_LARGEFILE 0
#endif
int fd = -1;
int mode = O_RDWR | O_CREAT | O_LARGEFILE;
char msg[160];
if (d->devname[0] == 0) /* null drives should not come here */
return -1;
fd = open(d->devname, mode, S_IRUSR | S_IWUSR);
@ -1775,6 +1776,7 @@ int burn_stdio_open_write(struct burn_drive *d, off_t start_byte, int flag)
0x00020005,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"Failed to open device (a pseudo-drive)", errno, 0);
return -1;
}
if (start_byte < 0)
start_byte = 0;