Commit Graph

286 Commits

Author SHA1 Message Date
joerg d8b81801d6 Really don't include ioctl code for tools build. 2017-10-02 22:02:05 +00:00
abhinav f1b8958974 Fix spelling of simultaneous. 2017-01-27 10:12:05 +00:00
sevan ef7ad9dc67 - Document the HISTORY of fdisk based on the original post to comp.unix.bsd by
Julian Elischer [1] and the Mach 2.5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared
as I didn't find documentation older than version 2.5 & no source code or repo
history. fdisk utility appears as a separate utility[3] in v2.5. Due to this,
I've avoided stating the exact version fdisk first appeared in Mach.
- Make correction pointed by textproc/igor
- Bump date

[1] https://groups.google.com/forum/#!searchin/comp.unix.bsd/14-Dec-89$20Robert$20Baron$20(rvb)$20at$20Carnegie-Mellon$20University%7Csort:relevance/comp.unix.bsd/Hhi45vAHxDg

[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps
2016-09-11 03:35:08 +00:00
christos cd40e75014 explain how to clear an entry (without reading the source) 2015-11-22 15:53:10 +00:00
christos 5bf62a09d2 a few more \n's in errors 2015-06-16 23:58:30 +00:00
christos d3037dba83 fix error messages containing \n 2015-06-16 23:18:54 +00:00
christos b2fb66aceb remove debugging. 2014-04-04 16:15:30 +00:00
wiz 57965cb9dc -s:
If the optional arguments are not provided, they stay as before or
use the same defaults as the interactive mode, if new.

(feel free to improve)
2014-04-04 13:07:30 +00:00
wiz ec456f9653 Fix a bug in previous and update detailed -s description. 2014-04-04 09:32:56 +00:00
wiz dd17dc5d6c Update SYNOPSIS.
Christos, please check.
2014-04-03 21:56:19 +00:00
christos 1e0f8240e6 instead of using ugly -1's make args optional 2014-04-03 17:07:11 +00:00
christos 6449a2097b default to something reasonable (like the interactive mode does) instead
of 0 when -1 is specified for the start or size.
2014-04-01 19:08:48 +00:00
martin aad6ef8bb5 Bring back the playstation2 port - now that a toolchain for it is
available again.
2014-03-31 11:25:47 +00:00
christos 58dbdf3810 Allow -1 values in the -s <sysid>/<start>/<size> indicate use the previous
values. For example:
fdisk -f -i /dev/rsd0d # initialize mbr and create an msdos partition.
fdisk -f -u -0 -a -s 169/-1/-1 /dev/rsd0d # converts the msdos partition
to a netbsd one, and makes it active.
2014-03-30 22:18:13 +00:00
jakllsch 6b4d75e30b Always print the MBR drive serial number, even if it's 0. 2014-03-10 15:42:51 +00:00
apb d53a09e4f6 Suggest using -b 1023/255/63 for modern disks where the BIOS is
configured to use LBA-Assisted translation.
2013-10-06 12:27:15 +00:00
jakllsch 3106f2915c Improve support for logical sector sizes greater than 512. 2013-04-14 22:48:22 +00:00
christos c1fffff4c4 Don't produce spurious errors when creating labels on files. 2013-02-13 00:40:28 +00:00
christos 26a38a4618 CID/979997: missing va_end() 2013-02-09 01:50:04 +00:00
wiz 4d8d2d3c45 Revert my previous commit, I misunderstood the intention.
Noted by njoly.
2012-10-06 09:11:34 +00:00
wiz ff22935a2e Previous slightly more consistently. 2012-10-05 21:30:29 +00:00
njoly 1fd47d12e9 Fix indented blocks rendering with mandoc. Switch from .in unsupported
macro to .Bd/.Ed ones. While here kill some unneeded .Pp/.br macros.
2012-10-05 18:07:46 +00:00
tsutsui 0532bb776d Use ${DESTDIR}/usr/mdec for DEFAULT_BOOTDIR on tools fdisk(8)
rather than unknown build host's /usr/mdec directory.

XXX: no option to leave MBR bootcode empty on x86 targets
2012-06-05 13:41:23 +00:00
tsutsui 56ed3d51fc Don't use "#if defined(__i386__) || defined(__x86_64__)" conditionals
in C source file to define option features.
Define proper options in each Makefile per ${MACHINE_ARCH} variable instead.

Previously if a host is x86 and it has /usr/mdec/mbr file in its system,
tools fdisk implicitly installs it as mbr bootcode even for !x86 targets.
2012-05-05 16:03:55 +00:00
wiz 1ac719d147 Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00
christos 788118e647 support sector sizes > 512. 2012-04-06 20:09:26 +00:00
joerg 66dd2755f5 Add __printflike attribution to use vprintf and friends with an argument
as format string.
2012-03-15 02:02:20 +00:00
wiz 68693617f8 Remove trailing whitespace. 2012-01-04 10:57:40 +00:00
riz 99370de066 According to most other OSes and documentation sources, an MBR has
one "extended" partition and the partitions inside that are "logical"
partitions.  Make fdisk(8) man page follow suit.

Patch from Julian Fagir in PR#45695.
2011-12-31 22:18:56 +00:00
christos 765bd39696 Also ignore out of space conditions for -I so we can create overlapping
partitions on a full disk. Document and add it to the options.
2011-12-02 15:21:15 +00:00
enami ecc71da821 Add missing -F flag and -I flag in usage. Sort the order to match
manpage.
2011-12-02 04:05:20 +00:00
christos 6d19ec83d5 put the error check in the conditional where it belongs. 2011-12-02 03:04:11 +00:00
wiz 1b8846959e Remove trailing whitespace. 2011-12-01 23:14:06 +00:00
christos 7bef7412af Add a flag to support writing overlapping partitions and explain why. 2011-12-01 22:24:29 +00:00
gson d2c5449570 fix the sparc build 2011-08-28 15:46:26 +00:00
christos 4d53e32690 one static is enough, otherwise you risk zapping yourself. 2011-08-27 20:49:03 +00:00
joerg 9c28fb5747 staticfy. __dead. 2011-08-27 17:16:01 +00:00
pgoyette 821775e983 Fix parsing of -A option so that the [/ptn_0_offset] part is optional, as
described in the man page.
2011-05-08 14:22:16 +00:00
wiz a26db019aa Use Nx. 2011-04-25 22:23:47 +00:00
wiz d129d948ec Minor punctuation fixes, improve and sort SYNOPSIS, sort flag descriptions.
From Bug Hunting in PR 43130.
2010-04-07 09:40:58 +00:00
dsl 5281921f56 Add info for -A ptn_alignment[/ptn_0_offset] 2009-12-23 20:56:18 +00:00
dsl 4d8b353d15 Put #endif in correct place - fixes PR/42500
Update usage() for -A, and rename one of the variables for clarity.
2009-12-23 18:50:40 +00:00
dsl 9193c05dda Add support for partition being aligned on non-cylinder boundaries.
Info can be specified with -A parameter.
Default is based on how the first partition is defined.
For empty disks larger than 128GB (arbitrary figure) use 1MB alignment.
2009-12-22 21:55:12 +00:00
dsl 5cb32d7a27 Editing partitions larger than 1TB works better if 'decimal' returns
64 bit integer values!
2009-12-22 21:04:37 +00:00
dsl 795733c59e Add a large comment about disk geometries.
Rename (with #defines) the variables use for aligning partitions to
separate them from the bios geometry.
All in advance of allowing other partition alignments (eg 2048 sectors).
2009-12-20 17:32:09 +00:00
pooka 3d1523b600 Use implicit -F for regular files, much like disklabel(8). 2009-12-17 14:27:49 +00:00
pooka d6224f4507 Remove support for NetBSD/playstation2. 2009-12-05 16:29:10 +00:00
tsutsui 1baf5ea42e Add a bunch of useful typical examples. Also use appropriate markup there. 2009-11-29 04:19:55 +00:00
tsutsui 1735ad7d34 Update -u usage to follow changes in fdisk.c rev 1.125:
>> Allow MB, GB and CYL (not just M, G and C) and lower case.
>> Don't output a splurious 'd' before "cyl".
>> Fixes PR/37414.

XXX "NNcy" is also allowed?
2009-11-28 17:25:45 +00:00
tsutsui d5fb21858d Clarify description of -f and -u options.
(-u means updating partition data, not interactive mode)
2009-11-28 16:45:20 +00:00