]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: (sgi) cleanup devparams flags
authorKarel Zak <kzak@redhat.com>
Thu, 30 May 2013 09:31:38 +0000 (11:31 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:46:58 +0000 (16:46 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisksgilabel.c
fdisks/fdisksgilabel.h
include/pt-sgi.h

index 726712e98dea4fed929a275c3eaa12dcbd66b33b..afd1f8072b1dfa963b02bd5f2727711a09884ba9 100644 (file)
@@ -933,8 +933,10 @@ static int sgi_create_disklabel(struct fdisk_context *cxt)
        /* sectors/track */
        sgilabel->devparam.bytes        = cpu_to_be16(cxt->sector_size);
        sgilabel->devparam.ilfact       = cpu_to_be16(1);
-       sgilabel->devparam.flags        = cpu_to_be32(TRACK_FWD|\
-                                                         IGNORE_ERRORS|RESEEK);
+       sgilabel->devparam.flags        = cpu_to_be32(
+                       SGI_DEVPARAM_TRACK_FWD
+                       | SGI_DEVPARAM_IGNORE_ERRORS
+                       | SGI_DEVPARAM_RESEEK);
        sgilabel->devparam.datarate     = cpu_to_be32(0);
        sgilabel->devparam.retries_on_error     = cpu_to_be32(1);
        sgilabel->devparam.ms_per_word          = cpu_to_be32(0);
index 326195c297edd3927835a2f9b7d474ec00c0e629..5f926663c6621e7c9cc93d6e5c07d0d6d6949f16 100644 (file)
@@ -4,18 +4,7 @@
 #include "bitops.h"
 #include "pt-sgi.h"
 
-/*
- * controller flags
- */
-#define        SECTOR_SLIP     0x01
-#define        SECTOR_FWD      0x02
-#define        TRACK_FWD       0x04
-#define        TRACK_MULTIVOL  0x08
-#define        IGNORE_ERRORS   0x10
-#define        RESEEK          0x20
-#define        CMDTAGQ_ENABLE  0x40
 
-#
 /* toggle flags */
 #define SGI_FLAG_BOOT  1
 #define SGI_FLAG_SWAP  2
index ff482babdd3a5f0eeff91a9e8db5ce32f0b3015c..36b1a67fb31eb316664a45c131e2d5073d3e55e0 100644 (file)
@@ -43,7 +43,7 @@ struct sgi_device_parameter {
        uint16_t nsect;         /* sectors/tracks in cyl 0 or vol 0 */
        uint16_t bytes;
        uint16_t ilfact;
-       uint32_t flags;         /* controller flags */
+       uint32_t flags;         /* SGI_DEVPARAM_* controller flags */
        uint32_t datarate;
        uint32_t retries_on_error;
        uint32_t ms_per_word;
@@ -55,6 +55,17 @@ struct sgi_device_parameter {
        uint16_t xylogics_writecont;
 } __attribute__((packed));
 
+enum {
+       SGI_DEVPARAM_SECTOR_SLIP        = 0x01,
+       SGI_DEVPARAM_SECTOR_FWD         = 0x02,
+       SGI_DEVPARAM_TRACK_FWD          = 0x04,
+       SGI_DEVPARAM_TRACK_MULTIVOL     = 0x08,
+       SGI_DEVPARAM_IGNORE_ERRORS      = 0x10,
+       SGI_DEVPARAM_RESEEK             = 0x20,
+       SGI_DEVPARAM_CMDTAGQ_ENABLE     = 0x40
+};
+
+
 struct sgi_disklabel {
        uint32_t magic;                 /* magic number */
        uint16_t root_part_num;         /* # root partition */