Re: Request for cooperation with all burn backends
> int grab_sg (int blkfd)
Seems to work well for me and my two drives sr0 and sr1.
I threw out two of my three functions and made
try_to_lock_linux_sg() using grab_sg() instead.
The call in builtin_dd() has changed a bit:
if (i == 3 && fd >= 0)
I made a small change in grab_sg() in order to distinguish
a failed locking attempt from failure to get to that attempt.
int grab_sg (int blkfd)
else if (errno == EBUSY)
sgfd = -2;
void try_to_lock_linux_sg(char *ioctl_device, int ioctl_dev_fd)
int fd_sg = -1;
if ( ( ( strncmp (ioctl_device, "/dev/sr", 7) == 0
&& isdigit(ioctl_device) ) ||
( strncmp (ioctl_device, "/dev/scd", 8) == 0
&& isdigit(ioctl_device) )
fd_sg = grab_sg(ioctl_dev_fd);
if(fd_sg == -2)
fprintf (stderr,":-( unable to O_EXCL sg equivalent of %s: "
"Other burn program active on drive ?\n",
I will now use this variation of growisofs 7.0 for my daily
backups. It will last a few days until i get opportunity
to test it on kernel 2.6 and /dev/hdX.
If my code is as intended then this should not even call
grab_sg(), and of course never abort.
Give me a note as soon as you decided for a final implementation
and i will test as good as i can.
Have a nice day :)
PS: About -Z /dev/sr1=imagefile :
My ext3 is ok as source for image files.
My reiserfs is not. ":-( write failed: Invalid argument".
Mangling #ifdef O_DIRECT in growisofs.c enabled burning from
that reiserfs too.
Only good i watch other people's problems on this list. :))