Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/part/g_part_mbr.c
Show First 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | g_part_mbr_bootcode(struct g_part_table *basetable, struct g_part_parms *gpp) | ||||
uint32_t dsn; | uint32_t dsn; | ||||
if (gpp->gpp_codesize != MBRSIZE) | if (gpp->gpp_codesize != MBRSIZE) | ||||
return (ENODEV); | return (ENODEV); | ||||
table = (struct g_part_mbr_table *)basetable; | table = (struct g_part_mbr_table *)basetable; | ||||
dsn = *(uint32_t *)(table->mbr + DOSDSNOFF); | dsn = *(uint32_t *)(table->mbr + DOSDSNOFF); | ||||
bcopy(gpp->gpp_codeptr, table->mbr, DOSPARTOFF); | bcopy(gpp->gpp_codeptr, table->mbr, DOSPARTOFF); | ||||
if (dsn != 0) | if (dsn != 0 && !gpp->gpp_skip_dsn) | ||||
*(uint32_t *)(table->mbr + DOSDSNOFF) = dsn; | *(uint32_t *)(table->mbr + DOSDSNOFF) = dsn; | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
g_part_mbr_create(struct g_part_table *basetable, struct g_part_parms *gpp) | g_part_mbr_create(struct g_part_table *basetable, struct g_part_parms *gpp) | ||||
{ | { | ||||
struct g_provider *pp; | struct g_provider *pp; | ||||
▲ Show 20 Lines • Show All 333 Lines • Show Last 20 Lines |