Lines Matching refs:label

721 		/* didn't find label (couldn't read anything) */
756 * fdgetlabel - read the SunOS label off the diskette
757 * if it can read a valid label it does so, else it will use a
766 struct dk_label *label;
784 * get some space to play with the label
786 label = kmem_zalloc(sizeof (struct dk_label), KM_SLEEP);
789 unit, (void *)label, (size_t)sizeof (struct dk_label)));
792 * read block 0 (0/0/1) to find the label
815 (caddr_t)label,
820 (caddr_t)label,
822 /* and label sector on cylinder 0 */
824 FDREAD, 0, 0, 1, (caddr_t)label,
879 * _something_ was read - look for unixtype label
881 if (label->dkl_magic != DKL_MAGIC ||
882 label->dkl_vtoc.v_sanity != VTOC_SANE) {
883 /* not a label - no magic number */
884 goto nolabel; /* no errors, but no label */
888 sp = (short *)label;
893 /* not a label - checksum didn't compute */
894 goto nolabel; /* no errors, but no label */
898 * the SunOS label overrides current diskette characteristics
900 fjp->fj_chars->fdc_ncyl = label->dkl_pcyl;
901 fjp->fj_chars->fdc_nhead = label->dkl_nhead;
902 fjp->fj_chars->fdc_secptrack = (label->dkl_nsect * DEV_BSIZE) /
909 fjp->fj_attr->fda_rotatespd = label->dkl_rpm;
910 fjp->fj_attr->fda_intrlv = label->dkl_intrlv;
912 fdp->d_vtoc_version = label->dkl_vtoc.v_version;
913 bcopy(label->dkl_vtoc.v_volume, fdp->d_vtoc_volume, LEN_DKL_VVOL);
914 bcopy(label->dkl_vtoc.v_asciilabel,
920 fdp->d_part[i].p_tag = label->dkl_vtoc.v_part[i].p_tag;
921 fdp->d_part[i].p_flag = label->dkl_vtoc.v_part[i].p_flag;
922 fdp->d_part[i].p_start = label->dkl_vtoc.v_part[i].p_start;
923 fdp->d_part[i].p_size = label->dkl_vtoc.v_part[i].p_size;
925 fdp->d_vtoc_timestamp[i] = label->dkl_vtoc.timestamp[i];
933 * if not found, fill in label info from default (mark default used)
946 kmem_free(label, sizeof (struct dk_label));
1286 struct dk_label *label;
1465 * Exit if the diskette has no label.
1466 * Also, get the label to make sure the correct one is
1540 label = kmem_zalloc(sizeof (struct dk_label), KM_SLEEP);
1544 if ((rval = fd_build_label_vtoc(fjp, fdp, &vtoc, label)) == 0) {
1547 0, 0, 1, (caddr_t)label, sizeof (struct dk_label));
1551 kmem_free(label, sizeof (struct dk_label));
1943 * construct the diskette label in supplied buffer
1946 /* Put appropriate vtoc structure fields into the disk label */