mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Prefix unknown (i.e. un-aliased) partition types with '!'. This is
how they had to be given with ctlreq.
This commit is contained in:
parent
33a558c7e9
commit
cf23147053
2 changed files with 6 additions and 4 deletions
|
|
@ -358,9 +358,10 @@ g_part_apm_type(struct g_part_table *basetable, struct g_part_entry *baseentry,
|
|||
return (g_part_alias_name(G_PART_ALIAS_FREEBSD_UFS));
|
||||
if (!strcmp(type, APM_ENT_TYPE_FREEBSD_VINUM))
|
||||
return (g_part_alias_name(G_PART_ALIAS_FREEBSD_VINUM));
|
||||
len = MIN(sizeof(entry->ent.ent_type), bufsz - 1);
|
||||
bcopy(type, buf, len);
|
||||
buf[len] = '\0';
|
||||
buf[0] = '!';
|
||||
len = MIN(sizeof(entry->ent.ent_type), bufsz - 2);
|
||||
bcopy(type, buf + 1, len);
|
||||
buf[len + 1] = '\0';
|
||||
return (buf);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -602,7 +602,8 @@ g_part_gpt_type(struct g_part_table *basetable, struct g_part_entry *baseentry,
|
|||
return (g_part_alias_name(G_PART_ALIAS_FREEBSD_VINUM));
|
||||
if (EQUUID(type, &gpt_uuid_mbr))
|
||||
return (g_part_alias_name(G_PART_ALIAS_MBR));
|
||||
snprintf_uuid(buf, bufsz, type);
|
||||
buf[0] = '!';
|
||||
snprintf_uuid(buf + 1, bufsz - 1, type);
|
||||
return (buf);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue