Lines Matching defs:vtoc

72 #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)
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->v_part[i].p_flag,
417 vtoc->v_part[i].p_start,
418 vtoc->v_part[i].p_size);
470 insert(char *data, struct extvtoc *vtoc)
489 vtoc->v_part[part].p_tag = (ushort_t)tag;
490 vtoc->v_part[part].p_flag = (ushort_t)flag;
491 vtoc->v_part[part].p_start = start;
492 vtoc->v_part[part].p_size = size;
532 load(FILE *fp, struct dk_geom *geom, struct extvtoc *vtoc)
545 vtoc->v_part[i].p_tag = 0;
546 vtoc->v_part[i].p_flag = V_UNMNT;
547 vtoc->v_part[i].p_start = 0;
548 vtoc->v_part[i].p_size = 0;
555 vtoc->v_part[2].p_tag = V_BACKUP;
556 vtoc->v_part[2].p_flag = V_UNMNT;
557 vtoc->v_part[2].p_start = 0;
558 vtoc->v_part[2].p_size = fullsz;
584 vtoc->v_part[part].p_tag = (ushort_t)tag;
585 vtoc->v_part[part].p_flag = (ushort_t)flag;
586 vtoc->v_part[part].p_start = start;
587 vtoc->v_part[part].p_size = size;
590 vtoc->timestamp[part] = (time_t)0;
701 validate(struct dk_geom *geom, struct extvtoc *vtoc)
718 /* make the vtoc look sane - ha ha */
719 vtoc->v_version = V_VERSION;
720 vtoc->v_sanity = VTOC_SANE;
721 vtoc->v_nparts = V_NUMPAR;
722 if (vtoc->v_sectorsz == 0)
723 vtoc->v_sectorsz = sectsiz;
727 if (vtoc->v_part[i].p_tag == V_BACKUP) {
728 if (vtoc->v_part[i].p_size != fullsz) {
737 if (vtoc->v_part[i].p_size == 0)
739 if ((vtoc->v_part[i].p_start % nblks) ||
740 (vtoc->v_part[i].p_size % nblks)) {
745 if (vtoc->v_part[i].p_start > fullsz ||
746 vtoc->v_part[i].p_start +
747 vtoc->v_part[i].p_size > fullsz) {
751 i, vtoc->v_part[i].p_size,
752 vtoc->v_part[i].p_start, fullsz);
758 if (vtoc->v_part[i].p_tag != V_BACKUP &&
759 vtoc->v_part[i].p_size != fullsz) {
761 if (vtoc->v_part[j].p_tag == V_BACKUP)
763 if (vtoc->v_part[j].p_size == fullsz)
765 isize = vtoc->v_part[i].p_size;
766 jsize = vtoc->v_part[j].p_size;
767 istart = vtoc->v_part[i].p_start;
768 jstart = vtoc->v_part[j].p_start;
863 vread(int fd, struct extvtoc *vtoc, char *devname)
867 if ((i = read_extvtoc(fd, vtoc)) < 0) {
906 vwrite(int fd, struct extvtoc *vtoc, char *devname)
910 if ((i = write_extvtoc(fd, vtoc)) != 0) {
913 "%s: invalid entry exists in vtoc\n",
934 "%s: invalid entry exists in vtoc\n",