freebsd-skq/sbin/geom
marcel 0c3f6d383d 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
..
class Change the set and unset ctlreqs by making the index argument optional. 2013-06-09 23:34:26 +00:00
core More -Wmissing-variable-declarations fixes. 2012-10-19 14:49:42 +00:00
misc If 'req' is NULL, print error on stderr. 2011-10-25 07:34:35 +00:00
Makefile Switch the default WARNS level for sbin/ to 6. 2009-10-19 16:00:24 +00:00
Makefile.inc Rename the generic "CLASS" to the more specific "GEOM_CLASS". 2010-12-15 23:45:12 +00:00