Age | Commit message (Collapse) | Author |
|
|
|
uint64_t values.
|
|
CHS information as required when writing MBR to disk, editing a partition in CHS
mode or printing MBR.
No intentional functional change.
|
|
On PolarFire SoC, the HSS firmware loads HSS payload from BIOS boot
partition. Typically the payload carries second-stage low-level boot
code, such as U-Boot. If the payload is missing, the SoC is not able
to boot normally. Hence automatic disk formatting should not delete
the partition.
OK krw@
|
|
conversion formula
LBA = (C Ã HPC + H) Ã SPT + (S â 1)
instead of the equivalent tortuous arithmetic used in PRT_fix_BN().
No intentional functional change.
|
|
|
|
to align with GPT functions. Simplifies logic and eliminates the
magic invocations to print the header.
No functional change.
|
|
source prt has prt_ns == 0 or prt_id == DOSPTYP_UNUSED.
No functional change.
|
|
header fields gh_csum and gh_part_csum.
Constrain kernel to accepting only correct little-endian
checksums.
Temporarily allow fdisk(8) to read either endian GPTs so that
big-endian GPTs can be made correct by a simple 'fdisk -e' &&
'w'.
Fixes inter-architecture, inter-OS GPT portability and GPT
fdisk(8) on big-endian architectures. Broken since initial GPT
implementation.
Suggestions and ok kettenis@
|
|
Always put '0x' prefix in front of displayed hex values,
i.e. the checksums.
Add missing letoh32() so bad endian checksum is clear.
Be consistent when displaying 'expected' and 'got' checksums,
i.e. 'expected' == calculated checksum and 'got' == checksum
found in GPT.
|
|
'EFI PART' reads better than "TRAP IFE" and
checksums are easier to read/compare when shown
in hex rather than decimal.
Prompted by recent GPT vs disklabel misc@ thread
concerning Rob Whitlock's problematic GPT.
|
|
any boot partition specified via '-b' or /usr/mdec/mbr; at the
power of 2 block after the first track; or immediately following
the MBR if there is only one track.
Mark any non-EFISYS boot partition created by -b as DOSACTIVE.
Suggested by kettenis@, better than a separate new option.
Brings -b behaviour into line with many uses of -e to create boot
partitions, allowing for the eventual elimination of said -e uses
in the creation of the various boot media and in the install
scripts.
|
|
last full cylinder. Let it extend to the end of the disk.
|
|
defined(__mips__)" chunk that rounded the start of the default
OpenBSD partition to a cylinder boundary. The value has been
immediately re-rounded to a power of 2 block since r1.25 in 2009.
Eliminates wasted space when no /usr/mdec/mbr partition
0 information is available.
'-b' becomes available to architectures other than amd64 and
i386, taking precedence over /usr/mdec/mbr partition 0
information. The latter being present only in macppc and loongson
/usr/mdec/mbr files.
|
|
|
|
of _powerpc__ and __mips__, preventing the possible creation of
MBRs with overlapping partitions 0 and 3.
Don't set bootprt DOSACTIVE flag if no partition 0 information
was provided via /usr/mdec/mbr or -f. Lets octeon fdisk(8) set
DOSACTIVE on the OpenBSD partition in the default MBR like
every other fdisk(8) does.
|
|
location within MBR_init(), ensuring that MBR_init() creates an
OpenBSD MBR partition only when there is space for it.
No functional change.
|
|
intermediate variable to make MBR_init() code clearer and lay
more groundwork for upcoming functional enhancements.
No functional change.
|
|
and use it instead of calculating it twice in MBR_init().
No functional change.
|
|
instead of CHS values. Shorter, easier to follow.
No intentional functional change.
|
|
|
|
compiling.
Use a couple of local 'struct prt' variables to make MBR_init()
easier to read.
No functional change.
|
|
|
|
easier to read.
No functional change.
|
|
|
|
partition 0 information from the default MBR.
loongson and macppc provide partition 0 information but no boot code.
amd64, i386, landisk provide boot code but no partition 0 information.
Other arch's get by w/o a default MBR (a.k.a. /usr/mdec/mbr).
No functional change.
|
|
|
|
-l, -c/-h/-s or DIOCGPDINFO) should be enough for anyone.
|
|
"rpath wpath" from the pledge() invocation. Makes default_dmbr information
available to DISK_open().
No intentional functional change.
|
|
disk.
The decoded values were overwritten by an invocation of PRT_fix_CHS() before
they were used.
|
|
optimistic alignment expectations" when extracting a uint32_t field from a
packed struct.
r1.70 (March 2015) removed one of the two #if 0 chunks, realizing there was no
real gain to be had even if various compilers were ever able to intuit the
expected alignment.
Belatedly nuke the other #if 0 chunk and always memcpy() the uint32_t values out
of the struct.
|
|
Those architectures needing either MBR boot code (amd64, i386,
landisk) or special boot partitions (macppc, loongson) have long
used /usr/mdec/mbr to provide that information.
Other architectures should not blindly write i386/amd64 boot code
into the MBR.
Fail quickly if the desired default MBR file is missing.
Prompted by deraadt@, tweak from kettenis@.
|
|
Two statements on one line may have seemed clever but now it's
just confusing.
No functional change.
|
|
Allow any value from 1 to UINT32_MAX.
MBR boot partition sizes/offsets are completely machine dependent.
Pointed out by loongson.
|
|
|
|
That's what 'bootable' means in the MBR world. GPT
partitions created by '-b' are unaffected.
Pointed out by kettenis@, obviating need for new option.
|
|
DISK_open(). So eliminate pointless check when printing geometry.
Replace unit_lookup() with units_size(), reducing four
conversion dances to one. Return pointer to the unit_type used in
the conversion. unit_types[] is now needed only in misc.c.
Fewer variables make for cleaner logic.
No intentional functional change.
|
|
|
|
dl.d_secsize.
Leave unit_types[SECTORS].ut_conversion at 0, and test that to
determine if a size needs to be converted from a sectors value.
Use consistent dance to find the desired size value to print.
Logic is clearer, unit_types[] is now const, nobody but misc.c
knows about SECTORS.
No intentional functional change.
|
|
Remove now pointless NULL check in unit_lookup().
No intentional functional change.
|
|
goto's.
Rename CMD_SAVE to CMD_QUIT to reflect actual command (Xquit) and
help and man page verbiage.
No intentional functional change.
|
|
sentinal entry.
No functional change.
|
|
shrinking static data demands. Split PRT_printall() into
PRT_print_mbrtypes() and PRT_print_gpttypes() to eliminate
pointless 'pseudo' MBR partition types and pointless display of
MBR partition types with no associated GPT GUIDs.
Eases future MBR and GPT partition type editing improvements.
ok kettenis@
|
|
id's that have no associated GUID, rather than disabling the
partition.
If the current partition type is a GUID with no corresponding
partition id, display and use that GUID as the default value.
Less surprising behaviour all round.
|
|
|
|
place.
Allows single-digit partition id's in '-b' as a side benefit.
|
|
|
|
|
|
the main '-e' loop.
No functional change.
|
|
printing a GPT.
No functional change outside of DEBUG.
|