[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Help in HDD partitioning...



Hello PROGRAMMERS,

I am in the process of writing a program to partition a HDD.
I am stuck in comprehending the significance of the following structure
found in <linux/genhd.h> used to write the partition table:

struct partition {
        unsigned char boot_ind;         /* 0x80 - active */
        unsigned char head;          /* starting head */
        unsigned char sector;        /* starting sector */
        unsigned char cyl;           /* starting cylinder */
        unsigned char sys_ind;       /* What partition type */
        unsigned char end_head;      /* end head */
        unsigned char end_sector;    /* end sector */
        unsigned char end_cyl;       /* end cylinder */
        unsigned int start_sect;     /* starting sector counting from 0*/
        unsigned int nr_sects;       /* nr of sectors in partition */
}

especially the following members:

unsigned char cyl;           /* starting cylinder */
unsigned char end_cyl;       /* end cylinder */