freebsd-skq/sys/geom/part
Marcel Moolenaar 3bd22a9cc8 Change the set and unset ctlreqs by making the index argument optional.
This allows setting attributes on tables. One simply does not provide
an index in that case. Otherwise the entry corresponding the index has
the attribute set or unset.

Use this change to fix a relatively longstanding bug in our GPT scheme
that's the result of rev 198097 (relatively harmless) followed by rev
237057 (damaging). The damaging part being that our GPT scheme always
has the active flag set on the PMBR slice. This is in violation with
EFI. Existing EFI implementions for both x86 and ia64 reject the GPT.
As such, GPT disks created by us aren't usable under EFI because of
that.

After this change, GPT disks never have the active flag set on the PMBR
slice. In order to make the GPT disk bootable under some x86 BIOSes,
the reason of rev 198097, one must now set the active attribute on the
gpt table. The kernel will apply this to the PMBR slice For (S)ATA:
	gpart set -a active ada0

To fix an existing GPT disk that has the active flag set in the PMBR,
and that does not need the flag, use (again for (S)ATA):
	gpart unset -a active ada0

The EBR, MBR & PC98 schemes, which also impement at least 1 attribute,
now check to make sure the entry passed is valid. They do not have
attributes that apply to the table.
2013-06-09 23:34:26 +00:00
..
g_part_apm.c Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes. 2012-05-25 20:33:34 +00:00
g_part_bsd.c Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes. 2012-05-25 20:33:34 +00:00
g_part_ebr.c Change the set and unset ctlreqs by making the index argument optional. 2013-06-09 23:34:26 +00:00
g_part_gpt.c Change the set and unset ctlreqs by making the index argument optional. 2013-06-09 23:34:26 +00:00
g_part_if.m
g_part_ldm.c Remove stub implementation. 2013-06-09 23:12:43 +00:00
g_part_mbr.c Change the set and unset ctlreqs by making the index argument optional. 2013-06-09 23:34:26 +00:00
g_part_pc98.c Change the set and unset ctlreqs by making the index argument optional. 2013-06-09 23:34:26 +00:00
g_part_vtoc8.c Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes. 2012-05-25 20:33:34 +00:00
g_part.c Change the set and unset ctlreqs by making the index argument optional. 2013-06-09 23:34:26 +00:00
g_part.h Support the FAT16 partition type in gpart(8) 2013-03-07 22:32:41 +00:00