25#define DASD_IOCTL_LETTER 'D'
27#define DASD_PARTN_BITS 2
29#define PARTITION_LINUX_SWAP 0x82
30#define PARTITION_LINUX 0x83
31#define PARTITION_LINUX_LVM 0x8e
32#define PARTITION_LINUX_RAID 0xfd
34#define PART_TYPE_NATIVE "NATIVE"
35#define PART_TYPE_SWAP "SWAP "
36#define PART_TYPE_RAID "RAID "
37#define PART_TYPE_LVM "LVM "
40#define PDEBUG fprintf(stderr, "%s:%d:%s\n", \
79 unsigned char async:1;
82 unsigned char model:3;
83 } __attribute__ ((packed)) cu_model;
100 unsigned char cache:1;
105 } __attribute__ ((packed)) facilities;
127 } __attribute__ ((packed)) factors;
167#define DASD_FMT_INT_FMT_R0 1
168#define DASD_FMT_INT_FMT_HA 2
169#define DASD_FMT_INT_INVAL 4
170#define DASD_FMT_INT_COMPAT 8
174#define BIODASDDISABLE _IO(DASD_IOCTL_LETTER,0)
176#define BIODASDENABLE _IO(DASD_IOCTL_LETTER,1)
179#define DASDAPIVER _IOR(DASD_IOCTL_LETTER,0,int)
181#define BIODASDINFO _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
187#define BLKROGET _IO(0x12,94)
189#define BLKRRPART _IO(0x12,95)
191#define BLKSSZGET _IO(0x12,104)
193#define BLKGETSIZE64 _IOR(0x12,114,size_t)
195#define HDIO_GETGEO 0x0301
200#define PARTN_MASK ((1 << DASD_PARTN_BITS) - 1)
201#define USABLE_PARTITIONS ((1 << DASD_PARTN_BITS) - 1)
203#define DASD_MIN_API_VERSION 0
205#define DEFAULT_FDASD_CONF "/etc/fdasd.conf"
207#define FDASD_VERSION "1.32.0"
208#define DEVICE "device"
212#define ALTERNATE_CYLINDERS_USED 0x10
292 unsigned int start,
unsigned int stop);
typedef __attribute__
Definition: vtoc.h:80
uint32_t start
Definition: dos.c:4
offset
Definition: fdasd.h:264
fdasd_failure
Definition: fdasd.h:266
#define USABLE_PARTITIONS
Definition: fdasd.in.h:201
int fdasd_get_volser(fdasd_anchor_t *anc, char *volser, int fd)
Definition: fdasd.c:1349
void fdasd_check_api_version(fdasd_anchor_t *anc, int fd)
Definition: fdasd.c:899
void fdasd_initialize_anchor(fdasd_anchor_t *anc)
Definition: fdasd.c:202
void fdasd_change_volser(fdasd_anchor_t *anc, char *str)
Definition: fdasd.c:1361
void fdasd_cleanup(fdasd_anchor_t *anchor)
Definition: fdasd.c:105
void fdasd_check_volser(char *volser, int devno)
Definition: fdasd.c:1323
@ upper
Definition: fdasd.in.h:264
@ lower
Definition: fdasd.in.h:264
int fdasd_write_labels(fdasd_anchor_t *anc, int fd)
Definition: fdasd.c:414
struct partition_info partition_info_t
int fdasd_prepare_labels(fdasd_anchor_t *anc, int fd)
Definition: fdasd.c:430
@ device_verification_failed
Definition: fdasd.in.h:280
@ wrong_disk_format
Definition: fdasd.in.h:274
@ read_only_disk
Definition: fdasd.in.h:270
@ dsname_corrupted
Definition: fdasd.in.h:278
@ config_syntax_error
Definition: fdasd.in.h:276
@ api_version_mismatch
Definition: fdasd.in.h:272
@ unable_to_seek_disk
Definition: fdasd.in.h:268
@ vlabel_corrupted
Definition: fdasd.in.h:277
@ wrong_disk_type
Definition: fdasd.in.h:273
@ unable_to_ioctl
Definition: fdasd.in.h:271
@ disk_in_use
Definition: fdasd.in.h:275
@ malloc_failed
Definition: fdasd.in.h:279
@ volser_not_found
Definition: fdasd.in.h:281
@ unable_to_read_disk
Definition: fdasd.in.h:269
@ unable_to_open_disk
Definition: fdasd.in.h:267
struct fdasd_anchor fdasd_anchor_t
partition_info_t * fdasd_add_partition(fdasd_anchor_t *anc, unsigned int start, unsigned int stop)
Definition: fdasd.c:1269
void fdasd_recreate_vtoc(fdasd_anchor_t *anc)
Definition: fdasd.c:512
int fdasd_check_volume(fdasd_anchor_t *anc, int fd)
Definition: fdasd.c:836
void fdasd_reuse_vtoc(fdasd_anchor_t *anc)
Definition: fdasd.c:1375
struct config_data config_data_t
int fdasd_get_geometry(const PedDevice *dev, fdasd_anchor_t *anc, int fd)
Definition: fdasd.c:988
A block device - for example, /dev/hda, not /dev/hda3.
Definition: device.h:74
unsigned long start
Definition: fdasd.h:227
unsigned long stop
Definition: fdasd.h:228
unsigned char dual_copy
Definition: fdasd.h:101
unsigned short f2
Definition: fdasd.h:117
unsigned char defect_wr
Definition: fdasd.h:93
unsigned short no_dia_trk
Definition: fdasd.h:131
unsigned char reserved4
Definition: fdasd.h:95
unsigned short first_sup_trk
Definition: fdasd.h:132
unsigned short dev_type
Definition: fdasd.h:84
unsigned char director
Definition: fdasd.h:136
unsigned char rd_trk_set
Definition: fdasd.h:137
unsigned char RD_IN_LR
Definition: fdasd.h:90
unsigned char dev_class
Definition: fdasd.h:106
unsigned char RWANY_in_LR
Definition: fdasd.h:140
unsigned char OBR_ID
Definition: fdasd.h:135
unsigned char model
Definition: fdasd.h:82
unsigned char factor7
Definition: fdasd.h:142
unsigned char byte_per_track[3]
Definition: fdasd.h:111
unsigned char cache
Definition: fdasd.h:100
unsigned char RT_in_LR
Definition: fdasd.h:88
unsigned char unit_type
Definition: fdasd.h:107
unsigned char reset_alleg
Definition: fdasd.h:103
unsigned char factor8
Definition: fdasd.h:143
unsigned char reserved2
Definition: fdasd.h:91
unsigned int long_no_cyl
Definition: fdasd.h:146
unsigned char MDR_ID
Definition: fdasd.h:134
unsigned char sense_down
Definition: fdasd.h:104
unsigned char cache_info
Definition: fdasd.h:81
unsigned short first_dia_trk
Definition: fdasd.h:130
unsigned char reserved5
Definition: fdasd.h:97
unsigned char reserved
Definition: fdasd.h:80
unsigned char mult_burst
Definition: fdasd.h:87
unsigned char formula
Definition: fdasd.h:113
unsigned char striping
Definition: fdasd.h:96
unsigned short trk_per_cyl
Definition: fdasd.h:109
unsigned char factor6
Definition: fdasd.h:141
unsigned char reserved1
Definition: fdasd.h:89
unsigned char f4
Definition: fdasd.h:124
unsigned short cu_type
Definition: fdasd.h:76
unsigned char cfw
Definition: fdasd.h:98
unsigned short first_alt_trk
Definition: fdasd.h:128
unsigned short f3
Definition: fdasd.h:118
unsigned char support
Definition: fdasd.h:78
unsigned short no_alt_trk
Definition: fdasd.h:129
unsigned char XRC_supported
Definition: fdasd.h:94
unsigned char f1
Definition: fdasd.h:116
unsigned char sec_per_trk
Definition: fdasd.h:110
unsigned char async
Definition: fdasd.h:79
unsigned char reserved3
Definition: fdasd.h:92
unsigned char dev_model
Definition: fdasd.h:85
unsigned char reserved6
Definition: fdasd.h:99
unsigned short no_cyl
Definition: fdasd.h:108
struct dasd_eckd_characteristics::@0 __attribute__((packed)) cu_model
unsigned char f5
Definition: fdasd.h:125
unsigned char dfw
Definition: fdasd.h:102
unsigned short home_bytes
Definition: fdasd.h:112
unsigned short max_rec_zero
Definition: fdasd.h:138
unsigned short no_sup_trk
Definition: fdasd.h:133
unsigned int FBA_layout
Definition: fdasd.h:260
unsigned long label_pos
Definition: fdasd.h:245
bool is_file
Definition: fdasd.h:261
int devno
Definition: fdasd.h:239
int verbose
Definition: fdasd.h:238
int partno[USABLE_PARTITIONS]
Definition: fdasd.h:242
format4_label_t * f4
Definition: fdasd.h:248
u_int16_t dev_type
Definition: fdasd.h:243
int big_disk
Definition: fdasd.h:236
partition_info_t * last
Definition: fdasd.h:253
struct fdasd_hd_geometry geo
Definition: fdasd.h:258
volume_label_t * vlabel
Definition: fdasd.h:254
u_int32_t formatted_cylinders
Definition: fdasd.h:257
format5_label_t * f5
Definition: fdasd.h:249
int silent
Definition: fdasd.h:237
int print_table
Definition: fdasd.h:235
unsigned int used_partitions
Definition: fdasd.h:244
int option_reuse
Definition: fdasd.h:240
int vtoc_changed
Definition: fdasd.h:233
unsigned int label_block
Definition: fdasd.h:259
u_int32_t hw_cylinders
Definition: fdasd.h:256
int vlabel_changed
Definition: fdasd.h:232
config_data_t confdata[USABLE_PARTITIONS]
Definition: fdasd.h:255
format7_label_t * f7
Definition: fdasd.h:250
int auto_partition
Definition: fdasd.h:234
format9_label_t * f9
Definition: fdasd.h:251
partition_info_t * first
Definition: fdasd.h:252
unsigned int blksize
Definition: fdasd.h:246
int option_recreate
Definition: fdasd.h:241
unsigned long fspace_trk
Definition: fdasd.h:247
struct partition_info * next
Definition: fdasd.h:221
unsigned long fspace_trk
Definition: fdasd.h:219
u_int8_t type
Definition: fdasd.h:223
format1_label_t * f1
Definition: fdasd.h:220
u_int8_t used
Definition: fdasd.h:215
struct partition_info * prev
Definition: fdasd.h:222
unsigned long start_trk
Definition: fdasd.h:216
unsigned long end_trk
Definition: fdasd.h:217
unsigned long len_trk
Definition: fdasd.h:218
struct volume_label volume_label_t
Definition: vtoc.h:63
struct format7_label format7_label_t
Definition: vtoc.h:72
struct format4_label format4_label_t
Definition: vtoc.h:68
struct format1_label format1_label_t
Definition: vtoc.h:67
struct format9_label format9_label_t
Definition: vtoc.h:73
struct format5_label format5_label_t
Definition: vtoc.h:70