Lines Matching defs:label
69 struct disklabel label;
76 if (ioctl(sd, DIOCGDINFO, &label) < 0) {
77 perror("get label");
84 if (label.d_npartitions <= rawpart)
85 label.d_npartitions = rawpart + 1;
93 label.d_checksum = 0;
94 label.d_checksum = dkcksum(&label);
95 if (ioctl(sd, doraw ? DIOCWDINFO : DIOCSDINFO, &label) < 0) {
96 perror("set label");
128 if (label.d_secsize != SGI_BOOT_BLOCK_BLOCKSIZE)
130 label.d_secsize = SGI_BOOT_BLOCK_BLOCKSIZE;
156 if (label.d_secperunit != (uint32_t)vh->partitions[i].blocks)
158 label.d_secperunit = vh->partitions[i].blocks;
165 if (j >= label.d_npartitions)
169 if (++j >= label.d_npartitions)
173 if (memcmp(&label.d_partitions[j], &npe, sizeof(npe)) != 0) {
174 label.d_partitions[j] = npe;
182 if (label.d_nsectors != 1 || label.d_ntracks != 1 ||
183 label.d_secpercyl != 1 || label.d_ncylinders != label.d_secperunit)
185 label.d_nsectors = 1;
186 label.d_ntracks = 1;
187 label.d_secpercyl = 1;
188 label.d_ncylinders = label.d_secperunit;
191 if (label.d_partitions[i].p_fstype != FS_UNUSED ||
192 label.d_partitions[i].p_offset != 0 ||
193 label.d_partitions[i].p_size != label.d_secperunit) {
194 label.d_partitions[i].p_fstype = FS_UNUSED;
195 label.d_partitions[i].p_offset = 0;
196 label.d_partitions[i].p_size = label.d_secperunit;
294 int force; /* force label update */
295 int raw; /* update on-disk label as well */
297 int write_it; /* update in-core label if changed */
340 showpartitions(stdout, &label, 0);
345 printf("No change; not updating disk label.\n");
348 printf("Updating in-core %sdisk label.\n",
354 printf("Not updating disk label.\n");