Age | Commit message (Collapse) | Author |
|
|
|
great for removing an include of <machine/param.h>
This needs further cleanup if someone has time.
|
|
capablity by using help text as regular prompt for 'size' and
'offset'. Try to detect and handle more overflow/underflow conditions
in getuint() and ensure returned value is always within requested
bounds. Handle zero-length partitions by treating them as UNUSED.
tested & ok halex@
|
|
is now superflous. With rounding gone the offset parameter is
similarly superfluous. Simply getuint() accordingly.
|
|
units handling by copying getuint() from disklabel. MBR partition id
and disklabel partition type are different beasts. So deciding to
round off a MBR partition with id FS_BSDFFS meant rounding off
NTFS partitions. And FS_SWAP partitions meant DOS FAT 12. So just
nuke rounding off for now to simplify getuint().
ok beck@
|
|
partition numbers.
|
|
are thus avoided. Since bounds are now reliable don't check the
returned value for being in-bounds. Since default value is
forced inside bounds, don't bother being tricky and passing a
default that is outside the bounds being specified.
ok beck@
|
|
are all constants. Independantly suggested by guenther@.
|
|
ask_num() function. Remove now unneeded 'flags' and 'help' parameters
from both. Display out of range values in hex in ask_pid(), since
we are seeking hex input.
ok guenther@
|
|
duplicating the code. Allows simplification of the EDIT() #define
in Xedit() since we always ASK_DEC and use a NULL help parameter when
invoking ask_num().
|
|
A #define to simplify a function calling snippet does not simply or
help when it is used only once.
|
|
strtonum(). Make related error messages consistant.
ok haesbaert@
|
|
messages consistant. Check for valid partition when 'select'ing a
partition.
ok haesbaert@
|
|
more than one OpenBSD partition.
ok deraadt
|
|
length of 0. And anyway PRT_fix_CHS() writes garbage when length
is zero.
Refresh the in-memory copy to reflect any data that was written
out, so you can see that your changes have taken effect.
Surprise behaviours noted by matthew@ at c2k11.
|
|
that value, print an error message and repost the question
ok krw@ deraadt@
|
|
as neither arrayified not arrayfied exist -- sanctioned dictionaries
like Merriam-Webster ones suggest a few alternatives (e.g., arrayed),
however these made up words are easy to understand and we are not
certain that current ones are not ok.
ok jmc@
|
|
the multi-line banner announcing that the MBR is being changed.
Also the listing of the partition table in 'fdisk -u'. Display a
consistant message when the MBR is written.
While here cleanup and shrink code without changing any semantics.
Started with a diff posted on tech@ by Tobias Ulmer.
"I like it" marco@ ok jsing@
|
|
consistent state upon write failure.
OK krw@ and deraadt@.
|
|
From Alexey Dobriyan <adobriyan@gmail.com>, thanks.
|
|
|
|
ok weingart@ deraadr@
|
|
|
|
ok deraadt@
|
|
|
|
argument to PRT_parse() then becomes unused, so remove that too.
ok henning@, otto@
|
|
option by updatng/setting the 0xAA55 signature at the end of the sector.
ok nick@ weingart@
|
|
|
|
|
|
|
|
Idea borrowed from disklabel. i.e. Users can now type "print M"
and be rewarded with partition sizes in Megs
|
|
the partition tables. These values may now contain units,
such as "300k" "500M" or "2G".
(sectors, bytes, and cylinders are also supported.)
This should largely eliminate the need for a calculator
when using fdisk on large disks.
|
|
|
|
parameters editing) -- vassilip@dsl.cis.upenn.edu
|
|
print partition number in the message.
|
|
hard drives >8G sharing partitions with other operating systems.
Also, support extended partition type 0x0F, which is quite common now.
|
|
|
|
sigh@kuzirabekon.econ.nagasaki-u.ac.jp
|
|
|
|
that is, use PAGER rather than "more" if it is defined and non-null, not
just if it is defined.
|
|
bios valid cyl,head,sector information (the information comes from the
sd driver) I have made some changes to fdisk to do the following.
Allow the powerpc to specify values larger than the bios limits.
All platforms now have code that will translate the LBA values
in the mbr into CHS values according to the disk geometry.
This occurs if the start and ending CHS values have been stored as
0xffffff.
If writing to the disk and one of the values of a partition violates
the bios limits, it writes the requested values in the LBA fields ,
and stores 0xffffff for the starting and ending CHS values.
This should not change the default formatting of any existing system
other than the CHS and LBA values should always match given the detected
geometry of the disk.
|
|
MBR when doing a 'fdisk -i'. That is because the msdos partition is used
for booting. The OpenBSD part (part 3) is set up to be the rest of the
disk. Also the msdos partition is set as the 'active' partition.
|
|
|
|
|
|
|
|
|
|
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.
|
|
|
|
|
|
|