diff options
author | Davidlohr Bueso | 2011-12-20 14:42:10 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-02 13:43:06 +0100 |
commit | 3b622ddd72a783f9b532f1e363093978fe4d340a (patch) | |
tree | 6e9a7f1b9c8b895d447b1451c0b268cca98ae59a /include/blkdev.h | |
parent | mount: append inverting options for mount.<type> (diff) | |
download | kernel-qcow2-util-linux-3b622ddd72a783f9b532f1e363093978fe4d340a.tar.gz kernel-qcow2-util-linux-3b622ddd72a783f9b532f1e363093978fe4d340a.tar.xz kernel-qcow2-util-linux-3b622ddd72a783f9b532f1e363093978fe4d340a.zip |
fdisk: use CDROM_GET_CAPABILITY ioctl
And replace the current archaic logic of is_ide_cdrom_or_tape().
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'include/blkdev.h')
-rw-r--r-- | include/blkdev.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/blkdev.h b/include/blkdev.h index 1e7409dfd..1a9119d43 100644 --- a/include/blkdev.h +++ b/include/blkdev.h @@ -72,6 +72,12 @@ # ifdef __linux__ # define HDIO_GETGEO 0x0301 # endif + +/* uniform CD-ROM information */ +#ifndef CDROM_GET_CAPABILITY +# define CDROM_GET_CAPABILITY 0x5331 +#endif + struct hd_geometry { unsigned char heads; unsigned char sectors; @@ -98,4 +104,7 @@ int blkdev_is_misaligned(int fd); /* get physical block device size */ int blkdev_get_physector_size(int fd, int *sector_size); +/* is the device cdrom capable? */ +int blkdev_is_cdrom(int fd); + #endif /* BLKDEV_H */ |