question about values in /sys/block/???/device/type
Hi,
I'm trying to debug why my firewire harddrive is no longer handled by 'hald', and it seems that the value in /sys/block/sdb/device/type is 14 (0x0e) and this is not a value handled by the program. It is expecting 0x00 for disk and 0x05 for cdrom.
In the hald source (blockdev.c), there is a comment:
/* These magic values are documented in the kernel source */
and for the life of me I cannot find out where. You can't exactly grep for 0x0e and get anything meaningful!
Does anyone know?
BTW, I'm running the FC4 kernel: 2.6.15-1.1830_FC4 on ia32, if that matters.
David Mansfieldq
Quoted 14 lines · On Sat, 11 Feb 2006 12:07:06 -0500 David Mansfield wrote:
Hi,
I'm trying to debug why my firewire harddrive is no longer handled by 'hald', and it seems that the value in
/sys/block/sdb/device/typeis 14 (0x0e) and this is not a value handled by the program. It is expecting0x00for disk and0x05for cdrom.In the hald source (
blockdev.c), there is a comment:/* These magic values are documented in the kernel source */and for the life of me I cannot find out where. You can't exactly grep for
0x0eand get anything meaningful!
Quoted 6 lines
Does anyone know?
BTW, I'm running the FC4 kernel: 2.6.15-1.1830_FC4 on ia32, if that matters.
David Mansfieldq
include/scsi/scsi.h (hint: grepping in include/scsi for /type/ -i, this took about 5 seconds to find)
/*
* DEVICE TYPES
*/
#define TYPE_DISK 0x00 #define TYPE_TAPE 0x01 #define TYPE_PRINTER 0x02 #define TYPE_PROCESSOR 0x03 /* HP scanners use this */ #define TYPE_WORM 0x04 /* Treated as ROM by our system */ #define TYPE_ROM 0x05 #define TYPE_SCANNER 0x06 #define TYPE_MOD 0x07 /* Magneto-optical disk - * - treated as TYPE_DISK */ #define TYPE_MEDIUM_CHANGER 0x08 #define TYPE_COMM 0x09 /* Communications device */ #define TYPE_RAID 0x0c #define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
#define TYPE_RBC 0x0e
#define TYPE_NO_LUN 0x7f
---
~Randy