On Sat, Jan 17, 2009 at 11:56:41AM +0800, fangxiaozhi 00110321 wrote: > > Dear all: > > I have a CDROM device, and after I plug it into the Linux system, the Linux system will generate three device files in the directory of /dev/, such as: > scd1: block special (11/0) > sr1: link to scd1 > sg1: character special(21/1) > > And I write a c program to send the SCSI command of SPACE to my CDROM device. Such as : > > fd = open("/dev/sg1", 0_RDWR); > ioctl(fd, SCSI_IOCTL_SEND_COMMAND, cmdbuff); > > And I found that I can send the SPACE command to my CDROM device, if I open the file of /dev/sg1. > But if I open the file of /dev/scd1, then I can not send the SPACE command to my CDROM device. > > Why I can not send SCSI command through /dev/scd1 ? > > What difference between /dev/sg1 and /dev/scd1 ? One is a character device, and the other a block device. > And how can I send send the command through /dev/scd1? You probably can't, it is usually a different block ioctl to do that. What are you really trying to do here? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html