fdisk: (sgi) cleanup devparams flags

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2013-05-30 11:31:38 +02:00
parent bfe99a55cb
commit 9fc1f5d809
3 changed files with 16 additions and 14 deletions

View 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);

View 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

View 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 */