read_vtoc, write_vtoc - read and write a disk's VTOC
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);
int read_extvtoc(int fd, struct extvtoc *extvtoc);
int write_extvtoc(int fd, struct extvtoc *extvtoc);
The read_vtoc() and read_extvtoc() functions return the VTOC (volume table of contents) structure that is stored on the disk associated with the open file descriptor fd. On disks larger than 1 TB read_extvtoc() must be used.
The write_vtoc() and write_extvtoc() function stores the VTOC structure on the disk associated with the open file descriptor fd. On disks larger then 1TB write_extvtoc() function must be used.
The fd argument refers to any slice on a raw disk.
Upon successful completion, read_vtoc() and read_extvtoc() return a positive integer indicating the slice index associated with the open file descriptor. Otherwise, they return a negative integer indicating one of the following errors:
VT_EIO
VT_ENOTSUP
VT_ERROR
VT_OVERFLOW
Upon successful completion, write_vtoc() and write_extvtoc() return 0. Otherwise, they return a negative integer indicating one of the following errors:
VT_EINVAL
VT_EIO
VT_ENOTSUP
VT_ERROR
VT_OVERFLOW
See attributes(5) for descriptions of the following attributes:
|
fmthard(1M), format(1M), prtvtoc(1M), ioctl(2), efi_alloc_and_init(3EXT), attributes(5), dkio(7I)
The write_vtoc() function cannot write a VTOC on an unlabeled disk. Use format(1M) for this purpose.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |