Linux block devices in sysfs have a capability
file, partly documented here. Well, one is documented.
Looking in genhd.h
as it suggests, there are others. Is there any documentation on them, or does anyone know what they mean?
Listed here for convenience:
- GENHD_FL_REMOVABLE
- GENHD_FL_CD
- GENHD_FL_UP
- GENHD_FL_SUPPRESS_PARTITION_INFO
- GENHD_FL_EXT_DEVT
- GENHD_FL_NATIVE_CAPACITY
- GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE
- GENHD_FL_NO_PART_SCAN
- GENHD_FL_HIDDEN
More specifically,
Removable? Like removable USB drives? Relation to /sys/block/*/removable? Redundant?
Whats extended devt?
suppress partitions?
no part scan? Different from suppressing partitions?
UP?
CD? Like "this is a CD drive"? Why? Means something else?
Native capacity?
*_CD
is clear that it's "cd-like", for*_UP
it means alive (just like with a network interface),*_SUPPRESS_PARTITION_INFO
means they won't appear in/proc/partitions
, etc.*_FL_REMOVABLE
is defined in a comment fromdrivers/mmc/core/block.c
: "As discussed on lkml,GENHD_FL_REMOVABLE
should: - be set for removable media with permanent block devices - be unset for removable block devices with permanent media".