[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: growisofs problem



Hi,

> I am trying to use growisofs on my HP C8000, under HP-UX 11.11 to record
> to DVD+R media.
> growisofs version is 5.18, mkisofs version is 2.01

I can only guess about HP-UX system specifics.
It is obvious, though, that mkisofs is not the
problem in this case.

growisofs-5.18 is a bit antique but still an
interesting source to read.
I do not deem it to be the problem either,
but rather would blame a lack of superuser power
or some restrictive security settings in HP-UX.

Actually forbidden seems to be ioctl SIOC_IO
which shall transmit the harmless SCSI command
12h INQUIRY to the drive and return its reply.

Why this happens and how to work around seems
HP-UX specific.


-------------------------------------------------
Reasoning:

> Command line is:
> growisofs -Z /dev/rdsk/c3t0d0 /directory
> I get the output:
> unable to INQUIRY: Permission denied

INQUIRY is the first SCSI command which
growisofs tries to send to the drive.
It was able to open the desired device
file, though. So it seems not to be about
file access permissions.


> I have ensured that the corresponding file c3t0l0 is setup correctly in
> /dev/rscsi

In growisofs.c of dvd+rw-tools-5.18.4.8.6 i read:

#elif defined(__hpux)
...
    if ((in_fd = open64 (device,O_RDONLY)) < 0)
...
    if (fstat64 (in_fd,&sb) < 0)
...
    m=minor(sb.st_rdev);
...
    sprintf (rscsi,"/dev/rscsi/c%xt%x%c%x",
                    (m>>16)&0xFF,(m>>12)&0xF,'l',(m>>8)&0xF);
    ioctl_handle = (void *)open64 (rscsi,O_RDONLY);

This open64() obviously succeeds. Then i assume this
call fails:

    mmc_profile = get_mmc_profile (ioctl_handle);
  
Further i read:

#if 0       /* HP-UX requires root privileges upon SIOC_IO ioctl */

In transport.hxx this ioctl SIOC_IO seems to
be the heart of command execution:

    if (ioctl (fd,SIOC_IO,&cmd) != 0)       return -1;

So on the level of HP-UX system administration
you will have to find out why this fails for
the core level SCSI command 12h INQUIRY,
consisting of the bytes {0x12, 0, 0, 0, 36, 0}.


-------------------------------------------------
Differences i spotted towards current growisofs-7.1

Old:
    sprintf (rscsi,"/dev/rscsi/c%xt%x%c%x",
                    (m>>16)&0xFF,(m>>12)&0xF,'l',(m>>8)&0xF);
    ioctl_handle = (void *)open64 (rscsi,O_RDONLY);
New:
    sprintf (rscsi,"/dev/rscsi/c%ut%u%c%x",
                    (m>>16)&0xFF,(m>>12)&0xF,'l',(m>>8)&0xF);
    ioctl_handle = (void *)(long)open64 (rscsi,O_RDONLY);

The difference between %u and %x should not show up
with numbers 0 to 9.
But maybe the "(long)" operator has an influence on
the validity of ioctl_handle. (I doubt, though.)

-------------------------------------------------


Have a nice day :)

Thomas


Reply to: