Age | Commit message (Collapse) | Author |
|
While here, delete some extra #includes and apply style(9) sort rules.
ok deraadt@ krw@ mpi@
|
|
'[1 - 0] [1]' can no longer return '1'.
Issue reported by Alexi Malinin via bugs@. Thanks!
|
|
Issue reported by Alexi Malinin via bugs@. Thanks!
|
|
consistent and easier to identify, as outlined here:
- FAT12: FAT12 (01h)
- FAT16: FAT16S (04h), FAT16B (06h), FAT16L (0Eh)
- FAT32: FAT32 (0Bh), FAT32L (0Ch)
nothing in our tree is looking to the strings being replaced for anything
but printing them out, only to the numerical ids taken from disklabel.h
ok krw@, jmc@
|
|
often confusing than useful these days. Stop emitting them.
Prompted by bugs@ report of the 8TB disk travails of Jiri.
ok deraadt@ tom@
|
|
Makes 'reinit' respect current state of disk when deciding between
MBR and GPT initialization.
Problem noted by halex@
|
|
|
|
|
|
about the disk size. Making the protective MBR created by fdisk invalid as
fdisk used the 'correct' disk size.
So just do what MS does and put UINT32_MAX into the EE partition size field,
no matter what the disk size is. Lets tom@'s Dell boot.
ok kettenis@ tom@
|
|
ok krw
|
|
This diff by deraadt was overlooked far too many times, mostly by me.
It's the original fix of the pledge disklabel breakage found by espie.
diff by deraadt; ok semarie, tb.
|
|
messages to GPT.
Unchecked strdup() result noted by mestre@. ok mestre@ tim@
|
|
leaking. Refactor logic a bit to avoid leak and make logic clearer.
Noticed by (and initial diff from) mestre@ and his friend clang.
|
|
OK krw@
|
|
dump on the attempt to get a disklabel from a regular file.
Regular files have not been acceptable as the 'disk' for some time,
and pledging changed the consequences from a somewhat obscure error
message to an abort().
Issue discovered by espie@.
ok natano@
|
|
Discovered by rpe@. Tweaked by schwarze@.
ok rpe@ schwarze@ jmc@ deraadt@
|
|
information under the '-v' flag. This brings the GPT display more
into line with the MBR display and simplifies and hardens the parsing
of the partition info in the install scripts.
Original problem with install scripts parsing hand edited GPT
information reported by Valere Monseur via bugs@.
Man page fixes and tweaks from jmc@.
Install script changes tested & ok rpe@.
|
|
killing the macppc MSDOS partition created by '-i'.
Should fix the macppc install problems reported by Brian Conway on
bugs@. Date of breakage found by rpe@.
|
|
|
|
together three boolean values. In today's englightened world we
know about '||'.
Pointed out by naddy@
|
|
Suggestion, original diff and ok naddy@
|
|
so remove their references;
while here undo a predefined string (as mandoc_char(7) calls them);
|
|
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.
Man page & usage ok jmc@
|
|
print the disk's name in an error message.
|
|
any undesirable GPT hanging around. i.e. same as 'reinit' from the
fdisk(8) command line. Noticed now that install media relies on
'-i' rather than issuing 'reinit' in a script.
|
|
default; OK krw@
|
|
|
|
Suggested by & ok tim@
|
|
krw's refactorings which hoisted disk-opening to the top.
tested by krw
|
|
by presenting the existing offset and size as the defaults. Enhance
getuint64() to take a minimum value as ask_num() does. Use this to
ensure that GPT partitions are constrained to the valid area of the
disk. Leave MBR partition constraints alone for the moment.
Original problem(s) noted by tim@
|
|
and Xgedit() to a new mechanism. Keep a copy of the old partition
and compare final edited version to that to decide if it is dirty.
Fixes a number of (but not all!) nits in editing partitions.
Original problem(s) noted by, suggestions from, much testing and
ok tim@
|
|
table is marked dirty so that it gets written when "quit" is issued.
This commit contains the MBR part of the fix only. The GPT code needs a few
adjustments before the GPT part can be fixed properly.
OK krw@
|
|
Reduce overburden of unnecessary #include's. Note that param.h is
included only for DEV_BSIZE. Use INT64_MAX instead of LLONG_MAX
so stdint.h is enough. General tidying up of #include sections.
ok GCC
|
|
included only for DEV_BSIZE. Use INT64_MAX instead of LLONG_MAX
so stdint.h is enough. General tidying up of #include sections.
ok GCC
|
|
|
|
partition table in this variable when doing an 'u'pdate of the MBR.
Remove now superfluous MBR_pcopy() and its re-read of the on-disk MBR.
|
|
|
|
1) If mbr_file is NULL use built-in mbr for -i, -u and 'reinit'.
2) If mbr_file cannot be opened issue a warning and use built-in mbr for -i,
-u, and 'reinit'.
3) If mbr_file can't be read, bail out of fdisk.
4) Use the mbr read from mbr_file for -i, -u, and 'reinit'.
Remove inappropriate GPT dancing.
This restores pre-GPT-editing mbr_file handling and makes the logic
clearer at the expense of a tiny bit of duplication.
|
|
and re-read it from disk if appropriate. i.e. when the re-read MBR
is a protective MBR.
|
|
protective MBR.
|
|
from jan stary
|
|
returning a value to tell callers to zap it. Use consistant idiom
to check for the presence of a GPT (check gh.gh_sig). When zapping
GPT, always zap both the header and partition table just for
paranoia's sake.
|
|
invalid and mention the constraint in usage(). Modify the appropriate
field(s) of the global 'disk' as -l/-c/-h/-s are encountered. As a
result use the disklabel information to populate the global 'disk'
only when it has not already been populated. Move test for 'disk'
validity into DISK_open().
|
|
usage() verbiage a bit so it's clear all of '-c -h -s' are required
if any are used.
|
|
when none of -i, -e or -u are specified.
Prodded by deraadt@
|
|
MBR or GPT is printed. Do not attempt to read the MBR template file,
construct an initial mbr, etc.
|
|
-g needing -i. The usage() text is quite clear.
usage() doesn't return so eliminate unneeded 'else'.
|
|
|
|
verbiage in the usage() output.
|
|
and saving the fd in the global 'disk' structure. Stop passing around
fd's and just use the global.
Makes pledge() feasible.
Prompted by and ok deraadt@
|