Lines Matching defs:dlp
171 struct disklabel *dlp = rlp;
179 if (dlp->d_magic != DISKMAGIC || dlp->d_magic2 != DISKMAGIC)
181 else if (dlp->d_npartitions > MAXPARTITIONS)
183 else if (dlp->d_secpercyl == 0)
185 else if (dlp->d_secsize == 0)
187 else if (dkcksum(dlp) != 0)
194 if (swap32(dlp->d_magic) != DISKMAGIC ||
195 swap32(dlp->d_magic2) != DISKMAGIC ||
196 swap16(dlp->d_npartitions) > MAXPARTITIONS)
203 start = (u_int16_t *)dlp;
204 end = (u_int16_t *)&dlp->d_partitions[
205 swap16(dlp->d_npartitions)];
211 dlp->d_magic = swap32(dlp->d_magic);
212 dlp->d_type = swap16(dlp->d_type);
216 dlp->d_secsize = swap32(dlp->d_secsize);
217 dlp->d_nsectors = swap32(dlp->d_nsectors);
218 dlp->d_ntracks = swap32(dlp->d_ntracks);
219 dlp->d_ncylinders = swap32(dlp->d_ncylinders);
220 dlp->d_secpercyl = swap32(dlp->d_secpercyl);
221 dlp->d_secperunit = swap32(dlp->d_secperunit);
225 dlp->d_acylinders = swap32(dlp->d_acylinders);
227 dlp->d_flags = swap32(dlp->d_flags);
229 dlp->d_secperunith = swap16(dlp->d_secperunith);
230 dlp->d_version = swap16(dlp->d_version);
233 dlp->d_spare[i] = swap32(dlp->d_spare[i]);
235 dlp->d_magic2 = swap32(dlp->d_magic2);
237 dlp->d_npartitions = swap16(dlp->d_npartitions);
240 pp = &dlp->d_partitions[i];
243 if (dlp->d_version == 0) {
253 dlp->d_checksum = 0;
254 dlp->d_checksum = dkcksum(dlp);
263 if (lp != dlp)
264 *lp = *dlp;