Linux - Library interface to slice and partition labels, Libdisk - Free BSD

Library interface to slice and partition labels


Library interface to slice and partition labels

Libdisk

It provides an interface to the low-level disk slice and partition labels. Most functions operate with arguments of the types ‘struct disk’, or ‘struct chunk’.

struct disk {
       char            *name;
       u_long          flags;
       u_long          bios_cyl;
       u_long          bios_hd;
       u_long          bios_sect;
       u_char          *bootmgr;
       u_char          *boot1;
       u_char          *boot2;
       struct chunk    *chunks;
       u_long          sector_size;
};

The only flag value by now is ‘DISK_ON_TRACK’, meaning that this disk is handled by the On-Track Disk Manager.

struct chunk {
       struct chunk    *next;
       struct chunk    *part;
       struct disk     *disk;
       long            offset;
       u_long          size;
       u_long          end;
       char            *name;
       char            *oname;
       chunk_e         type;
       int             subtype;
       u_long          flags;
       void            (*private_free)(void*);
       void            *(*private_clone)(void*);
       void            *private_data;
};

The topic on Linux - Library interface to slice and partition labels is posted by - Baski

Hope you have enjoyed, Linux - Library interface to slice and partition labelsThanks for your time

Tech Bluff