sunos man page for read_vtoc

Query: read_vtoc

OS: sunos

Section: 3ext

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

read_vtoc(3EXT) 					    Extended Library Functions						   read_vtoc(3EXT)

NAME
read_vtoc, write_vtoc - read and write a disk's VTOC
SYNOPSIS
cc [ flag ... ] file ... -ladm [ library ... ] #include <sys/vtoc.h> int read_vtoc(int fd, struct vtoc *vtoc); int write_vtoc(int fd, struct vtoc *vtoc);
DESCRIPTION
The read_vtoc() function returns the VTOC (volume table of contents) structure that is stored on the disk associated with the open file descriptor fd. The write_vtoc() function stores the VTOC structure on the disk associated with the open file descriptor fd. The fd argument refers to any slice on a raw disk.
RETURN VALUES
Upon successful completion, read_vtoc() returns a positive integer indicating the slice index associated with the open file descriptor. Otherwise, it returns a negative integer indicating one of the following errors: VT_EIO An I/O error occurred. VT_ENOTSUP This operation is not supported on this disk. VT_ERROR An unknown error occurred. Upon successful completion, write_vtoc() returns 0. Otherwise, it returns a negative integer indicating one of the following errors: VT_EINVAL The VTOC contains an incorrect field. VT_EIO An I/O error occurred. VT_ENOTSUP This operation is not supported on this disk. VT_ERROR An unknown error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+
SEE ALSO
fmthard(1M), format(1M), prtvtoc(1M), ioctl(2), efi_alloc_and_init(3EXT), attributes(5), dkio(7I)
BUGS
The write_vtoc() function cannot write a VTOC on an unlabeled disk. Use format(1M) for this purpose. SunOS 5.10 25 Jul 2002 read_vtoc(3EXT)
Related Man Pages
fmthard(1m) - opensolaris
efi_alloc_and_init(3ext) - opensolaris
write_vtoc(3ext) - opensolaris
fmthard(1m) - sunos
read_vtoc(3ext) - sunos
Similar Topics in the Unix Linux Community
Disk operation Error
after ZFS can not restore VTOC of disk..
fmthard showing error with prtvtoc
Disk mismatch while trying to zfs mirroring non-root disks
Labeling VTOC