Searched defs:vtoc (Results 1 - 25 of 55) sorted by relevance

123

/illumos-gate/usr/src/lib/libadm/common/
H A Drdwr_vtoc.c37 #include <sys/vtoc.h>
42 * To copy each field of vtoc individually for copying extvtoc
43 * to 32 bit vtoc and vs.
81 read_vtoc(int fd, struct vtoc *vtoc) argument
86 * Read the vtoc.
88 if (ioctl(fd, DKIOCGVTOC, (caddr_t)vtoc) == -1) {
105 * Sanity-check the vtoc.
107 if (vtoc->v_sanity != VTOC_SANE) {
112 * Convert older-style vtoc'
161 write_vtoc(int fd, struct vtoc *vtoc) argument
[all...]
/illumos-gate/usr/src/cmd/devinfo/
H A Ddevinfo.c49 #include <sys/vtoc.h>
64 static int readvtoc(int fd, char *name, struct extvtoc *vtoc);
209 readvtoc(int fd, char *name, struct extvtoc *vtoc) argument
213 retval = read_extvtoc(fd, vtoc);
/illumos-gate/usr/src/cmd/addbadsec/
H A Daddbadsec.c43 #include <sys/vtoc.h>
58 struct extvtoc vtoc; /* table of contents */ variable in typeref:struct:extvtoc
176 if (ioctl(devfd, DKIOCGEXTVTOC, &vtoc) == -1) {
182 if ((vtoc.v_sanity != VTOC_SANE) || (vtoc.v_version != V_VERSION)) {
221 if (vtoc.v_part[i].p_tag == V_ALTSCTR)
224 part = &vtoc.v_part[i];
/illumos-gate/usr/src/uts/common/avs/ns/nsctl/
H A Dnsc_ioctl.h34 #include <sys/vtoc.h>
89 uint64_t vtoc; /* (struct vtoc *) */ member in struct:nscioc_bsize
/illumos-gate/usr/src/lib/libdiskmgt/common/
H A Dmedia.c37 #include <sys/vtoc.h>
422 struct extvtoc vtoc; local
457 if (read_extvtoc(fd, &vtoc) >= 0 && vtoc.v_volume[0] != 0) {
461 LEN_DKL_VVOL, vtoc.v_volume);
549 struct extvtoc vtoc; local
551 if (read_extvtoc(fd, &vtoc) >= 0) {
552 if (vtoc.v_volume[0] != NULL) {
555 vtoc.v_volume,
559 vtoc
[all...]
H A Dslice.c37 #include <sys/vtoc.h>
403 struct extvtoc vtoc; local
421 if ((status = read_extvtoc(fd, &vtoc)) >= 0) {
441 if (snum < 0 || snum >= vtoc.v_nparts ||
442 vtoc.v_part[snum].p_size == 0) {
463 if (nvlist_add_uint64(attrs, DM_START, vtoc.v_part[snum].p_start)
468 if (nvlist_add_uint64(attrs, DM_SIZE, vtoc.v_part[snum].p_size)
473 if (nvlist_add_uint32(attrs, DM_TAG, vtoc.v_part[snum].p_tag)
478 if (nvlist_add_uint32(attrs, DM_FLAG, vtoc.v_part[snum].p_flag)
622 struct extvtoc vtoc; local
741 struct extvtoc vtoc; local
821 struct extvtoc vtoc; local
[all...]
/illumos-gate/usr/src/lib/libdscfg/common/
H A Dcfg_local.c29 #include <sys/vtoc.h>
68 struct vtoc vtoc; local
93 slice = read_vtoc(fd, &vtoc);
100 if (vtoc.v_part[slice].p_start < CFG_VTOC_SIZE)
103 return (vtoc.v_part[slice].p_size);
198 /* skip the vtoc if necessary */
/illumos-gate/usr/src/lib/libgrubmgmt/common/
H A Dlibgrub_fs.c47 #include <sys/vtoc.h>
115 struct dk_gpt *vtoc; local
117 if ((i = efi_alloc_and_read(fd, &vtoc)) >= 0) {
119 if (vtoc->efi_parts[i].p_tag != V_USR)
121 efi_free(vtoc);
/illumos-gate/usr/src/cmd/prtvtoc/
H A Dprtvtoc.c49 #include <sys/vtoc.h>
148 findfree(struct dk_geom *geom, struct extvtoc *vtoc) argument
160 if (vtoc->v_nparts > V_NUMPAR) {
165 for (part = vtoc->v_part; part < vtoc->v_part + vtoc->v_nparts; ++part)
369 struct extvtoc vtoc; local
391 if ((idx = readvtoc(fd, name, &vtoc)) == VT_ENOTSUP) {
401 freemap = findfree(&geom, &vtoc);
406 putfree(&vtoc, freema
432 putfree(struct extvtoc *vtoc, freemap_t *freemap) argument
475 puttable(struct dk_geom *geom, struct extvtoc *vtoc, freemap_t *freemap, char *name, char **mtab) argument
608 readvtoc(int fd, char *name, struct extvtoc *vtoc) argument
[all...]
/illumos-gate/usr/src/cmd/fmthard/
H A Dfmthard.c72 #include <sys/vtoc.h>
113 /* new vtoc and reboot. Used during */
252 * Read the vtoc on the disk
358 * Shut system down after writing a new vtoc to disk
379 display(struct dk_geom *geom, struct extvtoc *vtoc, char *device) argument
388 if (*vtoc->v_volume) {
391 if ((c = vtoc->v_volume[i]) == 0)
412 if (vtoc->v_part[i].p_size > 0)
415 i, vtoc->v_part[i].p_tag,
416 vtoc
470 insert(char *data, struct extvtoc *vtoc) argument
532 load(FILE *fp, struct dk_geom *geom, struct extvtoc *vtoc) argument
701 validate(struct dk_geom *geom, struct extvtoc *vtoc) argument
863 vread(int fd, struct extvtoc *vtoc, char *devname) argument
906 vwrite(int fd, struct extvtoc *vtoc, char *devname) argument
[all...]
/illumos-gate/usr/src/cmd/avs/dsbitmap/
H A Ddsbitmap.c29 #include <sys/vtoc.h>
122 struct vtoc vtoc; local
133 rc = read_vtoc(fd, &vtoc);
135 size = (uint64_t)(ULONG_MAX & vtoc.v_part[rc].p_size);
142 gettext("unable to read the vtoc from partition, %s: %s"),
/illumos-gate/usr/src/cmd/fs.d/udfs/fsck/
H A Dsetup.c53 #include <sys/vtoc.h>
599 struct vtoc vtoc; local
602 if (ioctl(fsreadfd, DKIOCGVTOC, (intptr_t)&vtoc) != 0) {
607 if (vtoc.v_sanity != VTOC_SANE) {
624 return ((uint32_t)vtoc.v_part[dki_info.dki_partition].p_size);
/illumos-gate/usr/src/cmd/hal/utils/
H A Dfsutils.c220 * Return true if all non-empty slices in vtoc have identical start/size and
224 vtoc_one_slice_entire_disk(struct extvtoc *vtoc) argument
231 for (i = 0; i < vtoc->v_nparts; i++) {
232 p = &vtoc->v_part[i];
/illumos-gate/usr/src/cmd/format/
H A Dmenu_fdisk.c421 * reread the vtoc
433 if (cur_parts->vtoc.v_part[i].p_tag &&
434 cur_parts->vtoc.v_part[i].p_tag != V_ALTSCTR) {
435 cur_parts->vtoc.v_part[i].p_start = 0;
436 cur_parts->vtoc.v_part[i].p_size = 0;
441 cur_parts->vtoc.v_part[i].p_tag =
443 cur_parts->vtoc.v_part[i].p_flag =
457 cur_parts->vtoc.v_part[C_PARTITION].p_start =
459 cur_parts->vtoc.v_part[C_PARTITION].p_size =
462 cur_parts->vtoc
621 struct vtoc vtoc; local
[all...]
H A Dlabel.c36 #include <sys/vtoc.h>
63 static int vtoc_to_label(struct dk_label *label, struct extvtoc *vtoc,
228 err_print("SMI vtoc to EFI failed\n");
275 struct extvtoc vtoc; local
346 * Fill in the vtoc information
348 label.dkl_vtoc = cur_parts->vtoc;
356 * Put asciilabel in; on x86 it's in the vtoc, not the label.
374 * Convert the label into a vtoc
376 if (label_to_vtoc(&vtoc, &label) == -1) {
382 * we do this before writing the vtoc
487 struct extvtoc vtoc; local
694 vtoc64_to_label(struct efi_info *label, struct dk_gpt *vtoc) argument
747 vtoc_to_label(struct dk_label *label, struct extvtoc *vtoc, struct dk_geom *geom, struct dk_cinfo *cinfo) argument
893 label_to_vtoc(struct extvtoc *vtoc, struct dk_label *label) argument
991 struct extvtoc vtoc; local
1002 err_check(struct dk_gpt *vtoc) argument
[all...]
H A Dhardware_structs.h185 struct dk_vtoc vtoc; /* SVr4 vtoc additions */ member in struct:partition_info
/illumos-gate/usr/src/uts/common/sys/
H A Dvtoc.h47 * that AT&T implements it. AT&T puts the vtoc structure
50 * Sun incorporates the tag, flag, version, and volume vtoc fields into
51 * its Disk Label, which already has some vtoc-equivalent fields.
52 * Upon reading the vtoc with read_vtoc(), the following exceptions
100 * error codes for reading & writing vtoc
103 #define VT_EIO (-3) /* I/O error accessing vtoc */
104 #define VT_EINVAL (-4) /* illegal value in vtoc or request */
116 struct vtoc { struct
118 unsigned long v_sanity; /* to verify vtoc sanity */
140 uint64_t v_sanity; /* to verify vtoc sanit
[all...]
/illumos-gate/usr/src/cmd/hal/probing/storage/
H A Dprobe-storage.c30 #include <sys/vtoc.h>
351 struct extvtoc vtoc; local
442 if (read_extvtoc(rfd, &vtoc) >= 0) {
443 if (!vtoc_one_slice_entire_disk(&vtoc)) {
/illumos-gate/usr/src/cmd/hal/probing/volume/
H A Dprobe-volume.c32 #include <sys/vtoc.h>
443 struct extvtoc vtoc; local
564 if ((partition_number = read_extvtoc(rfd, &vtoc)) >= 0) {
565 if (!vtoc_one_slice_entire_disk(&vtoc)) {
567 if (partition_number < vtoc.v_nparts) {
568 if (vtoc.v_part[partition_number].p_size == 0) {
571 partition_start = vtoc.v_part[partition_number].p_start * block_size;
/illumos-gate/usr/src/uts/common/io/lvm/softpart/
H A Dsp_ioctl.c55 * DKIOCGVTOC - get vtoc information.
66 #include <sys/vtoc.h>
848 * and had a vtoc record attached to it, we remove the
849 * vtoc record, because the layout has changed completely.
878 * - There was a vtoc record for the unit,
879 * - This vtoc record is no longer needed, because
1345 /* vtoc information */
1346 struct vtoc *vtoc; local
1351 vtoc
1377 struct vtoc *vtoc; local
[all...]
/illumos-gate/usr/src/lib/libefi/common/
H A Drdwr_efi.c37 #include <sys/vtoc.h>
81 * Default vtoc information for non-SVr4 partitions
144 efi_alloc_and_init(int fd, uint32_t nparts, struct dk_gpt **vtoc) argument
178 if ((*vtoc = calloc(length, 1)) == NULL)
181 vptr = *vtoc;
205 efi_alloc_and_read(int fd, struct dk_gpt **vtoc) argument
215 if ((*vtoc = calloc(length, 1)) == NULL)
218 (*vtoc)->efi_nparts = nparts;
219 rval = efi_read(fd, *vtoc);
221 if ((rval == VT_EINVAL) && (*vtoc)
309 efi_read(int fd, struct dk_gpt *vtoc) argument
573 write_pmbr(int fd, struct dk_gpt *vtoc) argument
660 check_input(struct dk_gpt *vtoc) argument
843 efi_write(int fd, struct dk_gpt *vtoc) argument
1060 struct vtoc vtoc; local
1076 efi_err_check(struct dk_gpt *vtoc) argument
1171 efi_auto_sense(int fd, struct dk_gpt **vtoc) argument
[all...]
/illumos-gate/usr/src/lib/lvm/libmeta/common/
H A Dmeta_nameinfo.c147 * It is possible to present an efi label but be using vtoc
149 * disk in the underlying metadevice is a vtoc disk and starts
471 * free allocations in vtoc
505 if ((! nocache) && (dnp->vtoc.nparts != 0)) {
521 return (&dnp->vtoc);
524 /* can't get vtoc */
626 metafreevtoc(&dnp->vtoc);
627 meta_efi_to_mdvtoc(gpt, &dnp->vtoc);
628 if (dnp->vtoc.nparts > MD_MAX_PARTS) {
640 if (dnp->vtoc
664 struct extvtoc vtoc; local
741 struct extvtoc vtoc; local
[all...]
/illumos-gate/usr/src/cmd/avs/nsctl/
H A Dnskernd.c622 struct vtoc vtoc; local
630 bsize.vtoc = (uint64_t)(unsigned long)&vtoc;
671 if (vtoc.v_sanity != VTOC_SANE)
674 if (vtoc.v_version != V_VERSION && vtoc.v_version != 0)
680 *size = (uint64_t)vtoc.v_part[(int)dki_info.dki_partition].p_size;
/illumos-gate/usr/src/uts/common/avs/ns/solaris/
H A Dnsc_raw.c574 struct vtoc *vtoc = NULL; local
623 vtoc = kmem_alloc(sizeof (*vtoc), KM_SLEEP);
627 (intptr_t)vtoc, flags, cred, &rval);
654 if ((vtoc->v_sanity != VTOC_SANE) ||
655 (vtoc->v_version != V_VERSION && vtoc->v_version != 0) ||
661 *bsizep = (uint64_t)vtoc->v_part[(int)dki_info->dki_partition].p_size;
669 if (vtoc) {
[all...]
/illumos-gate/usr/src/uts/common/io/lvm/stripe/
H A Dstripe_ioctl.c36 #include <sys/vtoc.h>
574 * and had a vtoc record attached to it, we remove the
575 * vtoc record, because the layout has changed completely.
654 * - There was a vtoc record for the unit,
655 * - This vtoc record is no longer needed, because
694 struct vtoc *vtocp
705 struct vtoc *vtocp
1141 struct vtoc *vtoc; local
1146 vtoc
1175 struct vtoc *vtoc; local
[all...]

Completed in 129 milliseconds

123