C
Chris Johnson
I'm working on a program that needs to stat devices and pick out
optical drives. I've run the following code on my computer and my
roommates:
opendir DEV, "/dev";
for(readdir(DEV)){
my @stats = stat "/dev/$_";
print "$_: $stats[5]\n";
}
closedir DEV;
And I found that all optical drives have a $gid ($stats[5]) of 93.
However, we both have IDE optical drives and udev, so rather than write
a program with the same configuration, I'd appreciate it if I could get
some confirmation from people with SCSI optical drives and/or devfs.
Thanks,
Chris
optical drives. I've run the following code on my computer and my
roommates:
opendir DEV, "/dev";
for(readdir(DEV)){
my @stats = stat "/dev/$_";
print "$_: $stats[5]\n";
}
closedir DEV;
And I found that all optical drives have a $gid ($stats[5]) of 93.
However, we both have IDE optical drives and udev, so rather than write
a program with the same configuration, I'd appreciate it if I could get
some confirmation from people with SCSI optical drives and/or devfs.
Thanks,
Chris