/titanic_44/usr/src/lib/libefi/common/ |
H A D | rdwr_efi.c | 144 efi_alloc_and_init(int fd, uint32_t nparts, struct dk_gpt **vtoc) in efi_alloc_and_init() argument 178 if ((*vtoc = calloc(length, 1)) == NULL) in efi_alloc_and_init() 181 vptr = *vtoc; in efi_alloc_and_init() 205 efi_alloc_and_read(int fd, struct dk_gpt **vtoc) in efi_alloc_and_read() argument 215 if ((*vtoc = calloc(length, 1)) == NULL) in efi_alloc_and_read() 218 (*vtoc)->efi_nparts = nparts; in efi_alloc_and_read() 219 rval = efi_read(fd, *vtoc); in efi_alloc_and_read() 221 if ((rval == VT_EINVAL) && (*vtoc)->efi_nparts > nparts) { in efi_alloc_and_read() 225 ((*vtoc)->efi_nparts - 1); in efi_alloc_and_read() 226 nparts = (*vtoc)->efi_nparts; in efi_alloc_and_read() [all …]
|
H A D | llib-lefi | 37 int efi_alloc_and_init(int fd, uint32_t nparts, struct dk_gpt **vtoc); 38 int efi_alloc_and_read(int fd, struct dk_gpt **vtoc); 39 int efi_write(int fd, struct dk_gpt *vtoc);
|
/titanic_44/usr/src/cmd/format/ |
H A D | label.c | 63 static int vtoc_to_label(struct dk_label *label, struct extvtoc *vtoc, 275 struct extvtoc vtoc; in write_label() local 348 label.dkl_vtoc = cur_parts->vtoc; in write_label() 376 if (label_to_vtoc(&vtoc, &label) == -1) { in write_label() 429 if (write_extvtoc(cur_file, &vtoc) != 0) { in write_label() 487 struct extvtoc vtoc; in read_label() local 491 if (read_extvtoc(fd, &vtoc) < 0 || in read_label() 497 return (vtoc_to_label(label, &vtoc, &geom, &dkinfo)); in read_label() 694 vtoc64_to_label(struct efi_info *label, struct dk_gpt *vtoc) in vtoc64_to_label() argument 702 nparts = vtoc->efi_nparts; in vtoc64_to_label() [all …]
|
H A D | partition.c | 209 assert(cur_parts->vtoc.v_version == V_VERSION); in change_partition() 210 deflt = cur_parts->vtoc.v_part[num].p_tag; in change_partition() 215 deflt = cur_parts->vtoc.v_part[num].p_flag; in change_partition() 338 cur_parts->vtoc.v_part[num].p_start = (daddr_t)(i * (nhead * nsect)); in change_partition() 339 cur_parts->vtoc.v_part[num].p_size = (long)j; in change_partition() 345 assert(cur_parts->vtoc.v_version == V_VERSION); in change_partition() 346 cur_parts->vtoc.v_part[num].p_tag = (ushort_t)tag; in change_partition() 347 cur_parts->vtoc.v_part[num].p_flag = (ushort_t)flag; in change_partition() 455 pptr->vtoc = cur_parts->vtoc; in make_partition() 513 bzero((caddr_t)&part->vtoc, sizeof (struct dk_vtoc)); in set_vtoc_defaults() [all …]
|
H A D | menu_fdisk.c | 432 if (cur_parts->vtoc.v_part[i].p_tag && in update_cur_parts() 433 cur_parts->vtoc.v_part[i].p_tag != V_ALTSCTR) { in update_cur_parts() 434 cur_parts->vtoc.v_part[i].p_start = 0; in update_cur_parts() 435 cur_parts->vtoc.v_part[i].p_size = 0; in update_cur_parts() 440 cur_parts->vtoc.v_part[i].p_tag = in update_cur_parts() 442 cur_parts->vtoc.v_part[i].p_flag = in update_cur_parts() 456 cur_parts->vtoc.v_part[C_PARTITION].p_start = in update_cur_parts() 458 cur_parts->vtoc.v_part[C_PARTITION].p_size = in update_cur_parts() 461 cur_parts->vtoc.v_part[I_PARTITION].p_start = in update_cur_parts() 463 cur_parts->vtoc.v_part[I_PARTITION].p_size = in update_cur_parts() [all …]
|
H A D | auto_sense.c | 252 struct dk_gpt *vtoc; in auto_efi_sense() local 287 if (efi_alloc_and_init(fd, EFI_NUMPAR, &vtoc) != 0) { in auto_efi_sense() 292 label->e_parts = vtoc; in auto_efi_sense() 299 vtoc->efi_parts[0].p_tag = V_USR; in auto_efi_sense() 300 vtoc->efi_parts[0].p_start = vtoc->efi_first_u_lba; in auto_efi_sense() 301 vtoc->efi_parts[0].p_size = vtoc->efi_last_u_lba - vtoc->efi_first_u_lba in auto_efi_sense() 307 for (i = 1; i < vtoc->efi_nparts - 2; i ++) { in auto_efi_sense() 308 vtoc->efi_parts[i].p_tag = V_UNASSIGNED; in auto_efi_sense() 309 vtoc->efi_parts[i].p_start = 0; in auto_efi_sense() 310 vtoc->efi_parts[i].p_size = 0; in auto_efi_sense() [all …]
|
H A D | modify_partition.c | 169 tmp_pinfo->vtoc = cur_parts->vtoc; in p_modify() 320 cur_parts->vtoc.v_part[i].p_start = in p_modify() 322 cur_parts->vtoc.v_part[i].p_size = in p_modify() 544 part->vtoc = label->dkl_vtoc;
|
/titanic_44/usr/src/lib/libadm/common/ |
H A D | rdwr_vtoc.c | 81 read_vtoc(int fd, struct vtoc *vtoc) in read_vtoc() argument 88 if (ioctl(fd, DKIOCGVTOC, (caddr_t)vtoc) == -1) { in read_vtoc() 107 if (vtoc->v_sanity != VTOC_SANE) { in read_vtoc() 114 switch (vtoc->v_version) { in read_vtoc() 123 vtoc->v_version = V_VERSION; in read_vtoc() 124 if (vtoc->v_nparts == 0) in read_vtoc() 125 vtoc->v_nparts = V_NUMPAR; in read_vtoc() 126 if (vtoc->v_sectorsz == 0) in read_vtoc() 127 vtoc->v_sectorsz = DEV_BSIZE; in read_vtoc() 161 write_vtoc(int fd, struct vtoc *vtoc) in write_vtoc() argument [all …]
|
/titanic_44/usr/src/cmd/fmthard/ |
H A D | fmthard.c | 379 display(struct dk_geom *geom, struct extvtoc *vtoc, char *device) in display() argument 388 if (*vtoc->v_volume) { in display() 391 if ((c = vtoc->v_volume[i]) == 0) in display() 412 if (vtoc->v_part[i].p_size > 0) in display() 415 i, vtoc->v_part[i].p_tag, in display() 416 vtoc->v_part[i].p_flag, in display() 417 vtoc->v_part[i].p_start, in display() 418 vtoc->v_part[i].p_size); in display() 470 insert(char *data, struct extvtoc *vtoc) in insert() argument 489 vtoc->v_part[part].p_tag = (ushort_t)tag; in insert() [all …]
|
/titanic_44/usr/src/uts/sun4v/sys/ |
H A D | vdsk_common.h | 383 #define VD_VTOC2VTOC(vd_vtoc, vtoc) \ argument 385 bzero((vtoc), sizeof (*(vtoc))); \ 386 bcopy((vd_vtoc)->volume_name, (vtoc)->v_volume, \ 388 sizeof ((vtoc)->v_volume))); \ 389 bcopy((vd_vtoc)->ascii_label, (vtoc)->v_asciilabel, \ 391 sizeof ((vtoc)->v_asciilabel))); \ 392 (vtoc)->v_sanity = VTOC_SANE; \ 393 (vtoc)->v_version = V_VERSION; \ 394 (vtoc)->v_sectorsz = (vd_vtoc)->sector_size; \ 395 (vtoc)->v_nparts = (vd_vtoc)->num_partitions; \ [all …]
|
/titanic_44/usr/src/cmd/prtvtoc/ |
H A D | prtvtoc.c | 148 findfree(struct dk_geom *geom, struct extvtoc *vtoc) in findfree() argument 160 if (vtoc->v_nparts > V_NUMPAR) { in findfree() 165 for (part = vtoc->v_part; part < vtoc->v_part + vtoc->v_nparts; ++part) in findfree() 369 struct extvtoc vtoc; in prtvtoc() local 391 if ((idx = readvtoc(fd, name, &vtoc)) == VT_ENOTSUP) { in prtvtoc() 401 freemap = findfree(&geom, &vtoc); in prtvtoc() 406 putfree(&vtoc, freemap); in prtvtoc() 411 puttable(&geom, &vtoc, freemap, devname, in prtvtoc() 432 putfree(struct extvtoc *vtoc, freemap_t *freemap) in putfree() argument 444 for (idx = 0; idx < vtoc->v_nparts; ++idx) { in putfree() [all …]
|
/titanic_44/usr/src/lib/libdiskmgt/common/ |
H A D | slice.c | 402 struct extvtoc vtoc; in get_attrs() local 420 if ((status = read_extvtoc(fd, &vtoc)) >= 0) { in get_attrs() 440 if (snum < 0 || snum >= vtoc.v_nparts || in get_attrs() 441 vtoc.v_part[snum].p_size == 0) { in get_attrs() 462 if (nvlist_add_uint64(attrs, DM_START, vtoc.v_part[snum].p_start) in get_attrs() 467 if (nvlist_add_uint64(attrs, DM_SIZE, vtoc.v_part[snum].p_size) in get_attrs() 472 if (nvlist_add_uint32(attrs, DM_TAG, vtoc.v_part[snum].p_tag) in get_attrs() 477 if (nvlist_add_uint32(attrs, DM_FLAG, vtoc.v_part[snum].p_flag) in get_attrs() 621 struct extvtoc vtoc; in get_fixed_assocs() local 633 if ((status = read_extvtoc(fd, &vtoc)) >= 0) { in get_fixed_assocs() [all …]
|
H A D | media.c | 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.v_volume, size);
|
/titanic_44/usr/src/cmd/fs.d/cachefs/cfstagchk/ |
H A D | cfstagchk.c | 79 struct vtoc vtoc; in main() local 123 slice = read_vtoc(fd, &vtoc); in main() 128 p = &vtoc.v_part[slice]; in main() 135 err = write_vtoc(fd, &vtoc); in main()
|
/titanic_44/usr/src/uts/sun4v/io/ |
H A D | vds.c | 477 struct extvtoc vtoc; /* synthetic for slice type */ member 682 static void vd_vtocgeom_to_label(struct extvtoc *vtoc, struct dk_geom *geom, 684 static void vd_label_to_vtocgeom(struct dk_label *label, struct extvtoc *vtoc, 687 static boolean_t vd_slice_vtoc_isvalid(vd_t *vd, struct extvtoc *vtoc); 801 ASSERT(vd->vtoc.v_sectorsz == DEV_BSIZE); in vd_dskimg_io_params() 1663 struct extvtoc vtoc; in vd_slice_flabel_write() local 1686 vd_label_to_vtocgeom(label, &vtoc, &geom); in vd_slice_flabel_write() 1688 vd_slice_vtoc_isvalid(vd, &vtoc)) in vd_slice_flabel_write() 2859 vd_vtocgeom_to_label(struct extvtoc *vtoc, struct dk_geom *geom, in vd_vtocgeom_to_label() argument 2864 ASSERT(vtoc->v_nparts == V_NUMPAR); in vd_vtocgeom_to_label() [all …]
|
/titanic_44/usr/src/uts/common/avs/ns/solaris/ |
H A D | nsc_raw.c | 574 struct vtoc *vtoc = NULL; in _raw_get_bsize() local 623 vtoc = kmem_alloc(sizeof (*vtoc), KM_SLEEP); in _raw_get_bsize() 627 (intptr_t)vtoc, flags, cred, &rval); in _raw_get_bsize() 654 if ((vtoc->v_sanity != VTOC_SANE) || in _raw_get_bsize() 655 (vtoc->v_version != V_VERSION && vtoc->v_version != 0) || in _raw_get_bsize() 661 *bsizep = (uint64_t)vtoc->v_part[(int)dki_info->dki_partition].p_size; in _raw_get_bsize() 669 if (vtoc) { in _raw_get_bsize() 670 kmem_free(vtoc, sizeof (*vtoc)); in _raw_get_bsize() 796 DKIOCGVTOC, (intptr_t)bsize->vtoc, flag, cred, rvp); in nskern_bsize()
|
/titanic_44/usr/src/cmd/addbadsec/ |
H A D | addbadsec.c | 58 struct extvtoc vtoc; /* table of contents */ variable 176 if (ioctl(devfd, DKIOCGEXTVTOC, &vtoc) == -1) { in main() 182 if ((vtoc.v_sanity != VTOC_SANE) || (vtoc.v_version != V_VERSION)) { in main() 221 if (vtoc.v_part[i].p_tag == V_ALTSCTR) in main() 224 part = &vtoc.v_part[i]; in main()
|
/titanic_44/usr/src/cmd/avs/nsctl/ |
H A D | nskernd.c | 622 struct vtoc vtoc; in get_bsize() local 630 bsize.vtoc = (uint64_t)(unsigned long)&vtoc; in get_bsize() 671 if (vtoc.v_sanity != VTOC_SANE) in get_bsize() 674 if (vtoc.v_version != V_VERSION && vtoc.v_version != 0) in get_bsize() 680 *size = (uint64_t)vtoc.v_part[(int)dki_info.dki_partition].p_size; in get_bsize()
|
/titanic_44/usr/src/uts/sun/io/ |
H A D | fd.c | 187 static int fd_build_label_vtoc(struct fdunit *, struct vtoc *); 188 static void fd_build_user_vtoc(struct fdunit *, struct vtoc *); 1883 struct vtoc vtoc; in fd_ioctl() local 2061 fd_build_user_vtoc(un, &vtoc); in fd_ioctl() 2069 vtoctovtoc32(vtoc, vtoc32); in fd_ioctl() 2077 if (ddi_copyout(&vtoc, (void *)arg, in fd_ioctl() 2078 sizeof (vtoc), flag)) in fd_ioctl() 2083 if (ddi_copyout(&vtoc, (void *)arg, sizeof (vtoc), flag)) in fd_ioctl() 2099 vtoc32tovtoc(vtoc32, vtoc); in fd_ioctl() 2104 if (ddi_copyin((const void *)arg, &vtoc, in fd_ioctl() [all …]
|
/titanic_44/usr/src/cmd/devinfo/ |
H A D | devinfo.c | 64 static int readvtoc(int fd, char *name, struct extvtoc *vtoc); 209 readvtoc(int fd, char *name, struct extvtoc *vtoc) in readvtoc() argument 213 retval = read_extvtoc(fd, vtoc); in readvtoc()
|
/titanic_44/usr/src/cmd/hal/probing/volume/ |
H A D | probe-volume.c | 443 struct extvtoc vtoc; in main() local 564 if ((partition_number = read_extvtoc(rfd, &vtoc)) >= 0) { in main() 565 if (!vtoc_one_slice_entire_disk(&vtoc)) { in main() 567 if (partition_number < vtoc.v_nparts) { in main() 568 if (vtoc.v_part[partition_number].p_size == 0) { in main() 571 partition_start = vtoc.v_part[partition_number].p_start * block_size; in main()
|
/titanic_44/usr/src/cmd/svr4pkg/hdrs/ |
H A D | libadm.h | 311 extern int read_vtoc __P((int fd, struct vtoc *vtoc)); 312 extern int write_vtoc __P((int fd, struct vtoc *vtoc));
|
/titanic_44/usr/src/cmd/avs/dsbitmap/ |
H A D | dsbitmap.c | 122 struct vtoc vtoc; in get_partsize() local 133 rc = read_vtoc(fd, &vtoc); in get_partsize() 135 size = (uint64_t)(ULONG_MAX & vtoc.v_part[rc].p_size); in get_partsize()
|
/titanic_44/usr/src/cmd/hal/utils/ |
H A D | fsutils.c | 224 vtoc_one_slice_entire_disk(struct extvtoc *vtoc) in vtoc_one_slice_entire_disk() argument 231 for (i = 0; i < vtoc->v_nparts; i++) { in vtoc_one_slice_entire_disk() 232 p = &vtoc->v_part[i]; in vtoc_one_slice_entire_disk()
|
/titanic_44/usr/src/cmd/fs.d/udfs/fsck/ |
H A D | setup.c | 599 struct vtoc vtoc; in get_last_block() local 602 if (ioctl(fsreadfd, DKIOCGVTOC, (intptr_t)&vtoc) != 0) { in get_last_block() 607 if (vtoc.v_sanity != VTOC_SANE) { in get_last_block() 624 return ((uint32_t)vtoc.v_part[dki_info.dki_partition].p_size); in get_last_block()
|