dsl
fb64c309b2
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.
Patch in PR is wrong!
2009-11-04 22:25:56 +00:00
dsl
3b8f95158f
Make absence of /usr/mdec/mbr only a warning.
...
Fixes PR/26510
2009-10-31 20:41:00 +00:00
joerg
b2ed4022ca
Do not use .Xo / .Xc without a good reason.
2009-10-14 22:00:55 +00:00
yamt
44484fcfa9
an example.
2009-08-10 02:56:23 +00:00
dsl
68a8748cf1
Change arguments to decimal() to be int64_t.
...
They need to be able to hold disk sector numbers > 2^31 and also -1.
Should fix PR/34807
2009-08-05 21:31:50 +00:00
snj
b80e388902
Small grammar tweak.
2009-07-02 00:49:58 +00:00
christos
1f751faed6
make this compile one non mbr machines (move #define to the general section)
2009-06-02 21:15:53 +00:00
christos
cb3a6fdee7
Delete GPT partitions if we overwrite with MBR to avoid confusion with disks
...
that have both MBR and a secondary left over GPT partition signature. From
Mike M. Volokhov
2009-06-01 19:57:33 +00:00
drochner
dff56c2587
also fix a comment wrt use of the csysid/cstart/csize vars
2009-04-20 17:06:55 +00:00
sborrill
45a4197562
When using -s flag, read start and size as unsigned to allow for larger
...
disks. (Thanks to drochner@ for catching it).
2009-04-20 15:03:56 +00:00
lukem
e6cb0042e9
remove mispelt WARNS. (it will be set in ../Makefile.inc "soon")
2009-04-06 12:19:16 +00:00
lukem
428fc016ff
fix sign-compare issues
2009-04-06 12:18:19 +00:00
apb
44f43cf298
Remove local definitions of PRIxxxx macros in favour of the
...
centralised definitions from tools/compat/compat_defs.h, which
are included via nbtool_config.h.
2009-01-18 21:15:14 +00:00
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