Commit Graph

296 Commits

Author SHA1 Message Date
wiz
0fa531d9a4 Add -g to usage. 2020-05-24 21:02:12 +00:00
wiz
11e3f06a51 Use Nx, fix formatting nit. 2020-05-24 21:01:49 +00:00
jmcneill
f907c64a8f Add -g flag to preserve GPT headers when updating MBR. 2020-05-24 18:42:48 +00:00
wiz
3bb7993d91 Fix xrefs. 2019-12-15 11:49:28 +00:00
christos
b54315f23d PR/54756: germain: Avoid confusion caused by overuse of the word "file" both
as a noun and an argument name.
2019-12-14 20:46:13 +00:00
mrg
de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
christos
ea4f9899c6 print the name of the disk causing the error. 2019-10-07 20:56:07 +00:00
tnn
3fe2f616e7 mention that -B is used to set the timeout for mbr_bootsel 2019-04-09 09:03:41 +00:00
mlelstv
51aec893ad In validate_bootsel, the code assumed that arr[j][i] can be accessed
with something like arr[0][j*ARRAYWIDTH+i]. gcc no longer allows such
hacks and discards the code silently because of undefined behaviour.
2018-11-14 12:05:29 +00:00
sevan
ae1f9ce6c8 Add missing -z flag to usage() 2018-08-27 14:55:46 +00:00
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