Technical data

dkio(7I) Ioctl Requests SunOS 5.5
ioctl() returns the device’s current VTOC (volume table of contents).
DKIOCSVTOC The argument is a pointer to a vtoc structure (described below). This
ioctl() changes the VTOC associated with the device.
struct partition {
ushort p_tag; /ID tag of partition /
ushort p_flag; /permission flags /
daddr_t p_start; /start sector of partition /
long p_size; /# of blocks in partition /
};
If DKIOCSVTOC is used with a floppy diskette, the p_start field must be the first sector of
a cylinder. Multiply the number of heads by the number of sectors per track to compute
the number of sectors per cylinder.
struct vtoc {
unsigned long v_bootinfo[3]; /info needed /
/by mboot /
/(unsupported) /
unsigned long v_sanity; /to verify vtoc /
/sanity /
unsigned long v_version; /layout version /
char v_volume[LEN_DKL_VVOL]; /volume name /
ushort v_sectorsz; /sector size in /
/bytes /
ushort v_nparts; /number of /
/partitions /
unsigned long v_reserved[10]; /free space /
struct partition v_part[V_NUMPAR]; /partition /
/headers/
time_t timestamp[V_NUMPAR]; /partition /
/timestamp /
/(unsupported) /
char v_asciilabel[LEN_DKL_ASCII]; /compatibility /
};
/
Partition permission flags
/
#define V_UNMNT 0x01 /Unmountable partition /
#define V_RONLY 0x10 /Read only /
/
Partition identification tags
/
#define V_UNASSIGNED 0x00 /unassigned partition /
#define V_BOOT 0x01 /Boot partition /
#define V_ROOT 0x02 /Root filesystem /
7I-82 modified 3 Mar 1995