mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* question about values in /sys/block/???/device/type
@ 2006-02-11 17:07 David Mansfield
  2006-02-12  2:28 ` Randy.Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: David Mansfield @ 2006-02-11 17:07 UTC (permalink / raw)
  To: Linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: question about values in /sys/block/???/device/type
  2006-02-11 17:07 question about values in /sys/block/???/device/type David Mansfield
@ 2006-02-12  2:28 ` Randy.Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2006-02-12  2:28 UTC (permalink / raw)
  To: David Mansfield; +Cc: Linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-12  2:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-11 17:07 question about values in /sys/block/???/device/type David Mansfield
2006-02-12  2:28 ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®