Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
parsing more robust (e.g. 'edit 0 ' is now accepted) and strict
(e.g. 'reinit gptx' is now rejected).
Input which may want that whitespace is not trimmed (e.g. GPT
partition names).
Use consistent definition of whitespace corresponding to that
used by isspace().
|
|
string_from_line(). Just errx() inside string_from_line() if
getline() fails.
Use strcspn() idiom to nuke '\n' returned by getline().
No functional change.
|
|
segfault on invalid edit commands.
|
|
calling it from Xhelp(). Move declaration of struct cmd to nestle
next to its only instantiation (cmd_table) and use nitems() when
scanning cmd_table.
No functional change.
|
|
sure the same verbiage is emitted as previously. i.e. "Writing
MBR at offset 0". Fixes regress complaints.
|
|
testing MBR_read() return value.
No intentional functional change.
|
|
cases. Make it so.
In passing nuke a single use 'error' variable and move an *errstr
declaration nearer to its friends.
No intentional functional change.
|
|
|
|
|
|
|
|
|