tnn
bc465dcf63
mbr_dsn is unsigned, print it as such.
2008-03-09 14:57:10 +00:00
dsl
7ddd81a137
Add support for mbr code with ascii keycodes
2008-01-25 23:19:10 +00:00
dsl
683572a3a3
Note the existance of mbr_com0 and mbr_com0_9600.
2008-01-20 15:04:09 +00:00
tsutsui
aa7cb7b8f0
- add a sanity check to avoid possible division by zero
...
- adjust sector numbers _after_ "Sanity check the data against all zeroes"
Should close PR bin/37656.
2008-01-20 06:39:31 +00:00
apb
bb3a1dfc42
Remove note about the first track being reserved for the BIOS (it's
...
not), and replace it with a note about the first partition traditionally
beginning in the second track of the first cylinder.
2007-12-23 10:47:42 +00:00
apb
ca6bb6217d
Track zero is not strictly reserved for the BIOS, that's just a
...
convention, so don't make it an error in check_overlap(). Sector 0 is
reserved for the MBR, so make that an error in check_overlap().
2007-12-23 10:43:57 +00:00
apb
49b1fa58d7
Report the first active partition.
2007-12-23 08:58:34 +00:00
apb
29a92a49d4
If the partition is unused, then attempting to decode the PBR would
...
actually decode the MBR from sector 0 of the disk. Don't do it if
v_flag < 3.
2007-12-23 08:14:28 +00:00
dsl
fe8a8005c1
Make this compile without -Wno-pointer-sign
...
(Needs updated bootblock.h)
2007-11-29 23:19:25 +00:00
dsl
0d1f6529aa
Change -F to not use opendisk().
...
Don't change default to the boot volume until after we've found we aren't
doing -F.
For tool-fdisk enforce -F and use #defines to make code that can no
longer possibly execute compile.
2007-11-29 23:02:00 +00:00
apb
02c42d6bae
Remove unwanted ">" from a printed message.
2007-11-18 19:19:00 +00:00
tsutsui
b682074ae4
Don't print Drive serial number if -S (setting shell variables) is specified.
2007-10-28 10:02:08 +00:00
tls
ae75a5cdbe
This program is a host tool, so when we use newfangled C features like
...
PRIxyz we have to ensure it still builds on hosts with Old compilers.
Noticed while building a cross-toolchain on FreeBSD 4.
2007-09-04 00:34:58 +00:00
dsl
4c11bfb2e9
Preserve the mbr 'driver serial number' when copying in the netbsd
...
mbr code. Should leave windows vista bootable.
Print the dsn from the mbr, not each pbr.
2007-07-05 20:30:29 +00:00
wiz
a115c64dc7
Plural fix.
2007-05-20 22:27:46 +00:00
christos
7731d9378a
PR/36223: Milos Negovanovic: Don't ask if we want to install mbr_bootselect
...
with -f.
2007-04-26 18:51:00 +00:00
apb
41bcdc8c57
Bump date for previous.
2007-03-11 10:51:03 +00:00
apb
4713b815f3
WARNS= 4
2007-03-10 18:22:04 +00:00
apb
7a268741a3
Document the new checks for whether a PBR is bootable.
...
Also add more detail in the introduction, and a few
more references.
2007-03-10 14:19:46 +00:00
apb
4c9d64d78e
Try to check whether each partition is bootable. If not,
...
always print an error message. If bootable and -v flag was
specified, print a success message. If -v flag was specified
more than once, also try to decode more information from
the PBR.
Input from dsl and bad.
2007-03-10 14:18:28 +00:00
dsl
26ad77c3e1
Report the last sector number of a partition, instead of that of the first
...
of the next - with appropriate discarding of the head/sector values
if the partition is cylinder aligned.
Fixes PR 26921
2006-11-25 16:10:32 +00:00
wiz
da100ff1d9
Use more macros. New sentence, new line.
2006-09-24 15:52:12 +00:00
jmcneill
4fd9dcb2a0
PR# 28660: how to remove bootmenu text from some partition
2006-09-24 15:22:01 +00:00
lukem
272515842e
Support MAKEVERBOSE.
...
Use CLEANFILES to cleanup temp files instead of rm.
Cosmetic tweaks.
2006-06-28 15:03:00 +00:00
lukem
a0f0fb81a8
Convert to using CC instead of LD, as LDFLAGS is for CC not LD.
2006-06-28 15:00:51 +00:00
christos
e5ea88eb01
PR/33633: Yoshito Komatsu: /sbin/fdisk does not work
...
Downgrade error getting heads to a warning.
2006-06-02 17:40:34 +00:00
christos
124bff0089
PR/33522: Peter Bex: Sanity checks to avoid zerodivide.
2006-05-21 16:00:17 +00:00
mrg
16efbf8575
don't do the -Wno-pointer-sign dance for host programs.
2006-05-12 01:18:25 +00:00
mrg
aadd7d4847
sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4.
2006-05-11 23:16:28 +00:00
dsl
df7e187ccb
Appease Coverty CID 7449. Avoid close(-1) in error path.
2006-03-18 08:36:50 +00:00
rumble
e948e1b17f
Check for allocation failures in malloc, calloc, realloc, asprintf, and
...
vasprintf and try to handle them.
2006-03-17 15:53:46 +00:00
dyoung
6c1041b8b7
So that we can build a full-featured fdisk cross-tool with -DBOOTSEL,
...
condition the definition of DEFAULT_BOOTxxx variables and SCAN_xxx
on defined(BOOTSEL), instead of defined(__i386__) || defined(__x86_64__).
While I'm here, only build get_diskname in the same conditions as
get_geometry is built, since only the latter calls the former.
2006-02-14 04:48:15 +00:00
dsl
c28e0ae4af
Byteswap the constant MBR_{BS_}MAGIC throughout, should genetate better code.
...
Except that non all architectures have that optimisation :-(
2006-01-29 12:55:16 +00:00
uwe
39ab40b2aa
PRI* macros should not contain percent sign.
...
While here, conditionalise use of "lld" for PRId64 on HAVE_LONG_LONG.
2005-10-07 23:57:10 +00:00
dogcow
7babc7145c
Fix cross-compilation on FreeBSD 4.x (and other OSes) where PRId64 isn't
...
defined.
2005-10-07 01:04:08 +00:00
uwe
25503c6713
When building as host tool don't include "../../include/util.h".
...
opendisk() declared in that file is not used in this case anyway, and
<util.h> pulls in unwatned includes (e.g. <utmpx.h> doesn't exist on
FreeBSD 4.*).
2005-08-27 22:43:40 +00:00
christos
2c6eadc9ce
Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
...
programs that did not compile before.
2005-06-27 01:00:04 +00:00
fvdl
a33a5a18b5
If HOSTPROG is empty, do not pull in libutil, since we do not need it in that
...
case, and several host platforms do not have libutil. Fixes the build of
these programs as host tools on platforms without libutil.
2005-06-23 00:54:47 +00:00
dyoung
4580f13f42
Turn fdisk(8) into a host tool. Still todo: commit the host-tool
...
build infrastructure to src/tools/fdisk/.
2005-06-12 19:14:10 +00:00
dyoung
023801f122
For portability, use standard types: s/uint/unsigned int/,
...
s/ulong/unsigned long/, s/u_int8_t/uint8_t/.
2005-06-12 19:06:43 +00:00
lukem
dfee67134f
Make fdisk(8) available on all platforms, since MS-DOS partitioning
...
is the de-facto standard for many removable media types.
2005-05-22 03:45:30 +00:00
dsl
4118385742
Allow partition sizes to be input in GB
2005-04-07 20:23:13 +00:00
xtraeme
76500fc2f9
WARNS=2 is the default defined in sbin/Makefile.inc. (thanks wiz)
2005-01-20 16:39:22 +00:00
xtraeme
784c275927
Remove main() prototype; WARNS=2
2005-01-20 16:01:02 +00:00
wiz
7913b43af5
Fix typo in error message, reported by Nicolas Joly in PR 28347.
2004-11-18 12:00:18 +00:00
christos
fdad6cabc9
Use the 1st element's size as the argument to bsearch.
2004-11-15 21:59:23 +00:00
christos
88825a8a55
Use ptype table from <sys/bootblock.h>
2004-11-12 16:57:46 +00:00
christos
88ddc79ebd
Add 0xBF for Solaris. From Larry Lee <lclee at west.sun.com>
2004-11-10 02:39:48 +00:00
dsl
25b17683bd
Add (unsigned char) to isdigit() calls
2004-10-28 19:48:41 +00:00
gavan
0560d8b947
Initial import of iyonix port.
...
The Iyonix is a desktop machine from Castle Technology, based on a 600MHz
XScale[tm] 80321 processor.
* Uses the bootloader from NetBSD/acorn32, which is now 32-bit compatible.
* Currently boots multiuser with a serial console.
* Device support is not yet complete.
With help from abs.
2004-10-13 23:28:34 +00:00