fdasd.h revision 7e7bd3dccbfe8f79e25e5c1554b5bc3a9aaca321
/*
* File...........: s390-tools/fdasd/fdasd.h
* Author(s)......: Volker Sameske <sameske@de.ibm.com>
* Horst Hummel <Horst.Hummel@de.ibm.com>
* Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2001-2002
*
* History of changes (starts March 2001)
* version 1.01 - menu entry 's' to show mapping devnode - DS name
* 1.02 - DS names count now from 0001 instead from 0000
* 1.03 - volser checks: 'AA AAA' to 'AAAAA '
* - removed dependency to kernel headers.
* 1.04 - added -p option
* 1.05 - new API policy, set it back to 0
*/
#ifndef FDASD_H
#define FDASD_H
/*****************************************************************************
* SECTION: Definitions needed for DASD-API (see dasd.h) *
*****************************************************************************/
#define DASD_IOCTL_LETTER 'D'
#define DASD_PARTN_BITS 2
#define PARTITION_LINUX_SWAP 0x82
#define PARTITION_LINUX 0x83
#define PARTITION_LINUX_EXT 0x85
#define PARTITION_LINUX_LVM 0x8e
#define PARTITION_LINUX_RAID 0xfd
#define PARTITION_LINUX_LVM_OLD 0xfe
#define PART_TYPE_NATIVE "NATIVE"
#define PART_TYPE_SWAP "SWAP "
#define PART_TYPE_RAID "RAID "
#define PART_TYPE_LVM "LVM "
#ifdef DEBUG_DASD
__FILE__, \
__LINE__, \
#else
#define PDEBUG
#endif
/*
* struct dasd_information_t
* represents any data about the device, which is visible to userspace.
* including foramt and featueres.
*/
typedef struct dasd_information_t {
unsigned int devno; /* S/390 devno */
unsigned int real_devno; /* for aliases */
unsigned int schid; /* S/390 subchannel identifier */
unsigned int open_count;
unsigned int req_queue_len;
unsigned int chanq_len; /* length of chanq */
/* unknown */
unsigned int status; /* current device level */
unsigned int label_block; /* where to find the VOLSER */
unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
unsigned int characteristics_size;
unsigned int confdata_size;
/*
* struct format_data_t
* represents all data necessary to format a dasd
*/
typedef struct format_data_t {
int start_unit; /* from track */
int stop_unit; /* to track */
int blksize; /* sectorsize */
int intensity;
/*
* values to be used for format_data_t.intensity
* 0/8: normal format
* 1/9: also write record zero
* 3/11: also write home address
* 4/12: invalidate track
*/
/* Disable the volume (for Linux) */
/* Enable the volume (for Linux) */
/* retrieve API version number */
/* Get information on a dasd device (enhanced) */
/*****************************************************************************
* SECTION: Further IOCTL Definitions (see fs.h) *
*****************************************************************************/
/* re-read partition table */
/* get block device sector size */
/*****************************************************************************
* SECTION: Definition from hdreq.h *
*****************************************************************************/
struct fdasd_hd_geometry {
unsigned char heads;
unsigned char sectors;
unsigned short cylinders;
unsigned long start;
};
/* get device geometry */
#define HDIO_GETGEO 0x0301
/*****************************************************************************
* SECTION: FDASD internal types *
*****************************************************************************/
#define DASD_MIN_API_VERSION 0
#define FDASD_VERSION "1.05"
#define DEVICE "device"
#define DISC "disc"
#define PART "part"
#define ALTERNATE_CYLINDERS_USED 0x10
typedef struct partition_info {
unsigned long start_trk;
unsigned long end_trk;
unsigned long len_trk;
unsigned long fspace_trk;
struct partition_info *next;
struct partition_info *prev;
typedef struct config_data {
unsigned long start;
unsigned long stop;
typedef struct fdasd_anchor {
int vlabel_changed;
int vtoc_changed;
int devname_specified;
int volid_specified;
int config_specified;
int auto_partition;
int print_table;
int big_disk;
int silent;
int verbose;
int devno;
int option_reuse;
int option_recreate;
int partno[USABLE_PARTITIONS];
unsigned int used_partitions;
unsigned long label_pos;
unsigned int blksize;
unsigned long fspace_trk;
struct fdasd_hd_geometry geo;
enum fdasd_failure {
};
#endif /* FDASD_H */