Age | Commit message (Collapse) | Author |
|
|
|
Prompted by deraadt@.
|
|
|
|
|
|
MBR. If '-b' is specified an EFI System partition of the requested size is
created. All remaining space is put into an OpenBSD partition.
Minimal enhancement necessary for upcoming UEFI install support.
Committed first to flush out any unexpected impacts on 'normal' MBR
operation and install media.
ok deraadt@
|
|
is marked with '*'
due to comments from sthen and kettenis
|
|
with the simple facts a user needs.
ok kettenis krw
|
|
|
|
of SYNOPSIS and usage();
|
|
special boot partition on architectures that need it.
For now those architectures are amd64 and i386, where this option will
create an EFI system partition to store our new UEFI bootloader.
ok deraadt@, krw@
|
|
|
|
|
|
|
|
containing the MBR template. Most especially don't get upset when
the 512-byte file does not contain a full 4096 byte disk sector.
Allows 4096-byte disks to be fdisk'ed once more.
Problem reported and fix tested by Gerald Hanuer via bugs@.
ok deraadt@
|
|
once inside MBR_print().
|
|
DISK_writesector() and live in disk.[ch].
|
|
|
|
and writesector(). Move them to misc.[ch]. Soon to be used for more
than MBR reading/writing.
No intentional functional change.
|
|
non-amd64 boxen.
|
|
would complicate install media. Will be used by GPT support.
|
|
|
|
|
|
to obtain GPT partition names. Tweak ask_pid() to take low/high
bounds so it can handle 1-ff (MBR) or 1000-ffff (GPT) partition
pids as required. A pid of '0' is still special and disables the
partition.
No visible or intentional functional change.
|
|
will eventually be able to use.
|
|
to 64 bits, adjusting printf()'s, etc. as required. Preparing for
GPT partitions. Add 't' size unit. No other intentional functional
change.
|
|
to get the location. disk.size is a 32 bit value for MBR use. Use
DL_GETDSIZE(&dl) to get the real location even on 'big' disks.
|
|
|
|
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.
Fewer parameters, less confusion, no functional change.
|
|
Just use the offset recorded/parsed in the struct mbr being used.
Can still traverse/edit extended MBRs so offset really wasn't needed.
Fewer parameters, less confusion, no functional change.
|
|
There is only one disk being worked on, so just make it a global.
Fewer parameters, less confusion, no functional change.
|
|
code a bit.
ok deraadt@ igor@ (with suggested tweak that is coming)
|
|
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.
General cleanup of things noticed preparing the big churn.
No intentional functional change.
|
|
Diff from chl@. Committing now so it doesn't get lost in upcoming
megachurn.
|
|
With the permission of Toby.
ok deraadt@
|
|
written does not contain an EFI partition, zap any GPT signature
found on the 2nd (LBA 1) and last sectors on the disk. The install
script uses this sequence.
This is a temporary workaround until more GPT support is imported
post-5.7.
Should fix at least some machines who insist on using the GPT even
after we have overritten the 'protective' MBR.
ok deraadt@ tedu@ beck@ millert@
|
|
'User_modify' to 'USER_edit' for the same reason.
|
|
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
|
|
Part of a diff by Markus Mueller, which was derived from Bitrig during
Google Summer of Code, with further tweaks by me.
ok krw@ miod@
|
|
gcc's built-in/in-lined memcpy() can't copy elements of a struct
dos_partiton array from inside the __packed struct dos_mbr into an
'unpacked' local variable. But copying the whole array works fine. Be
consistant and use the same idiom in both places the partition table
is parsed.
Leave the landisk workaround/hack in place until it can be confirmed
it is no longer needed.
ok martynas@ after many alternatives crashed and burned.
|
|
fields, found the hard way on landisk, to allow the tree to build until a
proper fix is devised.
ok deraadt@
|
|
from -Tascii to -Tlocale, even though not quite yet because
there are more important things to do first.
But let's already make -Tascii explicit in the build system
right now, it is safer anyway.
|
|
of an intermediate variable. No intended functional change.
|
|
|
|
htole[16|32]. This is made possible by a) copying unaligned data
(struct dos_partition's) into properly aligned structs and accessing
the fields of the same; and b) realizing that gcc is smart enough to
access fields in packed struct's *if* it knows it is accessing a
packed struct. Even sparc64 finally gave a thumbs up.
After several attempts and feedback from deraadt@ and dlg@, it looks
good to deraadt@.
|
|
data. Since all the fields but 2 that are specially handled are
u_int8_t's there should be no danger from alignment issues.
ok dlg@
|
|
'u_int16_t' to be consistant with disklabel.h's struct dos_mbr.
|
|
|
|
are not used uninitialized. As a bonus, make variables the same
type as the data they are trying to preserve.
|
|
eliminate multiple 'implicit' declarations introduced by the previous
over-zealous #include cleanup.
Thanks to to tedu@ for pointing out how -Wall reveals all.
|
|
sparc64 at least.
Found when deraadt@ complained about loongson miniroot blowing up.
|