Home | History | Annotate | Download | only in arch

Lines Matching defs:mbr

67 	struct mbr_sector mbr;
96 * Read in the existing MBR.
98 rv = pread(params->fsfd, &mbr, sizeof(mbr), MBR_BBSECTOR);
102 } else if (rv != sizeof(mbr)) {
106 if (mbr.mbr_magic != le16toh(MBR_MAGIC)) {
107 const char *p = (const char *)&mbr;
108 const char *e = p + sizeof(mbr);
114 "Ignoring MBR with invalid magic in sector 0 of `%s'\n",
117 memset(&mbr, 0, sizeof(mbr));
156 * original MBR to the temporary buffer by examining the first
173 for (i = 0; i < (int)sizeof(mbr.mbr_parts); i++) {
184 * Copy the BPB and the partition table from the original MBR to the
191 (void)memcpy(bootstrapbuf + MBR_BPB_OFFSET, &mbr.mbr_bpb,
195 memcpy(bootstrapbuf + MBR_PART_OFFSET, &mbr.mbr_parts,
196 sizeof(mbr.mbr_parts));
229 * Write MBR code to sector zero.