Lines Matching +defs:label +defs:offset
87 int offset;
95 struct disklabel *label;
106 label = malloc(params->sectorsize);
107 if (label == NULL) {
163 printf("Bootstrap `%s' found at offset %lu in `%s'\n",
181 * partition. Read NetBSD label to locate BOOT partition.
183 if (pread(params->fsfd, label, params->sectorsize,
189 /* And a quick validation - must be a big-endian label */
190 secsize = be32toh(label->d_secsize);
191 if (label->d_magic != htobe32(DISKMAGIC) ||
192 label->d_magic2 != htobe32(DISKMAGIC) ||
194 be16toh(label->d_npartitions) > MAXMAXPARTITIONS) {
199 i = be16toh(label->d_npartitions);
200 for (boot = label->d_partitions; ; boot++) {
293 offset = boot_offset <= HP300_SECTSIZE * 16 ? HP300_SECTSIZE * 16 : 0;
294 i = roundup(params->s1stat.st_size, secsize) - offset;
295 rv = pwrite(params->fsfd, bootstrap + offset, i, boot_offset + offset);
309 if (label != NULL)
310 free(label);