lkml.org 
[lkml]   [2006]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: question about values in /sys/block/???/device/type
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/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

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-12 03:30    [W:0.048 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site