]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include/blkdev: cleanup up
authorKarel Zak <kzak@redhat.com>
Fri, 15 Jun 2012 11:01:51 +0000 (13:01 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 15 Jun 2012 11:01:51 +0000 (13:01 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/blkdev.h

index 84c26dd3304ed5cce45f926da02a82b01b2f381a..8fca522c0b6fe63d347ebc071af1b8f017072b2c 100644 (file)
 #  define FITHAW     _IOWR('X', 120, int)    /* Thaw */
 # endif
 
+/* uniform CD-ROM information */
+# ifndef CDROM_GET_CAPABILITY
+#  define CDROM_GET_CAPABILITY 0x5331
+# endif
+
 #endif /* __linux */
 
+
 #ifdef APPLE_DARWIN
 # define BLKGETSIZE DKIOCGETBLOCKCOUNT32
 #endif
 #  define HDIO_GETGEO 0x0301
 # endif
 
-/* uniform CD-ROM information */
-#ifndef CDROM_GET_CAPABILITY
-# define CDROM_GET_CAPABILITY 0x5331
-#endif
-
-/* SCSI device types.  Copied almost as-is from kernel header.
- * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/scsi/scsi.h */
-#define SCSI_TYPE_DISK                 0x00
-#define SCSI_TYPE_TAPE                 0x01
-#define SCSI_TYPE_PRINTER              0x02
-#define SCSI_TYPE_PROCESSOR            0x03    /* HP scanners use this */
-#define SCSI_TYPE_WORM                 0x04    /* Treated as ROM by our system */
-#define SCSI_TYPE_ROM                  0x05
-#define SCSI_TYPE_SCANNER              0x06
-#define SCSI_TYPE_MOD                  0x07    /* Magneto-optical disk - treated as SCSI_TYPE_DISK */
-#define SCSI_TYPE_MEDIUM_CHANGER       0x08
-#define SCSI_TYPE_COMM                 0x09    /* Communications device */
-#define SCSI_TYPE_RAID                 0x0c
-#define SCSI_TYPE_ENCLOSURE            0x0d    /* Enclosure Services Device */
-#define SCSI_TYPE_RBC                  0x0e
-#define SCSI_TYPE_OSD                  0x11
-#define SCSI_TYPE_NO_LUN               0x7f
-
 struct hd_geometry {
        unsigned char heads;
        unsigned char sectors;
        unsigned short cylinders;       /* truncated */
        unsigned long start;
 };
-#endif
+#endif /* HDIO_GETGEO */
+
 
 /* are we working with block device? */
 int is_blkdev(int fd);
@@ -131,7 +115,26 @@ int blkdev_is_cdrom(int fd);
 /* get device's geometry - legacy */
 int blkdev_get_geometry(int fd, unsigned int *h, unsigned int *s);
 
+/* SCSI device types.  Copied almost as-is from kernel header.
+ * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/scsi/scsi.h */
+#define SCSI_TYPE_DISK                 0x00
+#define SCSI_TYPE_TAPE                 0x01
+#define SCSI_TYPE_PRINTER              0x02
+#define SCSI_TYPE_PROCESSOR            0x03    /* HP scanners use this */
+#define SCSI_TYPE_WORM                 0x04    /* Treated as ROM by our system */
+#define SCSI_TYPE_ROM                  0x05
+#define SCSI_TYPE_SCANNER              0x06
+#define SCSI_TYPE_MOD                  0x07    /* Magneto-optical disk - treated as SCSI_TYPE_DISK */
+#define SCSI_TYPE_MEDIUM_CHANGER       0x08
+#define SCSI_TYPE_COMM                 0x09    /* Communications device */
+#define SCSI_TYPE_RAID                 0x0c
+#define SCSI_TYPE_ENCLOSURE            0x0d    /* Enclosure Services Device */
+#define SCSI_TYPE_RBC                  0x0e
+#define SCSI_TYPE_OSD                  0x11
+#define SCSI_TYPE_NO_LUN               0x7f
+
 /* convert scsi type code to name */
 char *blkdev_scsi_type_to_name(int type);
 
+
 #endif /* BLKDEV_H */