Age | Commit message (Collapse) | Author |
|
DEV_BSIZE. Simply extract/insert the desired MBR from/into the first
DEV_BSIZE bytes of the sector. Makes fdisk work with devices having a
sector size different from DEV_BSIZE (512 bytes). e.g. 2048 byte
sector MP3 devices. Original diff from weingart@.
ok pedro@ deraadt@ weingart@
|
|
errno = EIO for short reads. This makes it easier to check for
read and write errors. Much patient tutoring by weingart@, deraadt@,
and cloder@.
Correctly use ssize_t to store read(2) and write(2) return values.
No functional change, since MBR_read() and MBR_write() return values
aren't currently checked.
OK deraadt@
|
|
|
|
argument to PRT_parse() then becomes unused, so remove that too.
ok henning@, otto@
|
|
|
|
|
|
|
|
|
|
Idea borrowed from disklabel. i.e. Users can now type "print M"
and be rewarded with partition sizes in Megs
|
|
bytes of the MBR are treated as code for the purposes of the
(u)pdate command. This is consistent with the new -u flag.
This means boot managers like BootEasy can now be written
out correctly. Note that rewriting the MBR now whacks the
NT serial number - a behavior that is consistent with
the DOS FDISK /MBR.
|
|
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly
|
|
|
|
were made, some code in an ifdefed section was missed. Update that
section of code to have the appropriate added parameter.
|
|
print partition number in the message.
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.
|