Commit Graph

58 Commits

Author SHA1 Message Date
abs
315046f892 Casting an uint32_t pointer to (long *) may have been acceptable
in the eighties but that time has long past. Minimally invasive
fix using a temporary long variable, so while we can still overflow
at least we're less broken.
2012-06-25 16:47:03 +00:00
christos
e93329c39c print sizeof() with %zu 2012-04-08 21:18:46 +00:00
wiz
4fe94283f2 Cast argument to unsigned long for i386. 2012-04-08 20:41:18 +00:00
wiz
c1f6ba2db1 Fix a format string error clang found. 2012-04-08 17:04:19 +00:00
wiz
e57903e6cb Sprinkle __dead and __printflike for clang. 2012-04-08 17:04:07 +00:00
christos
dcf51b974e make this work on 64 bit machines; use stdint/inttypes. 2012-04-06 22:41:47 +00:00
he
12d4087930 More c89 prototypes, mostly just filling in void where needed. 2012-03-23 14:49:55 +00:00
he
2bf75ee57f Add a void to make function declaration c89. 2012-03-22 08:56:52 +00:00
christos
1598a84d98 fix non-literal format string 2011-08-25 16:51:48 +00:00
mrg
8ffc8574e6 fix some powerpc64 build issues. 2010-03-22 05:08:54 +00:00
mbalmer
8a65aabe5b Fix typo in command output. 2009-12-23 09:13:21 +00:00
he
e437fa175c Now that we have strnlen() in libc, get rid of the local
and type-conflicting implementation here instead of fixing
it locally.  I don't think (hope!) this is size-critical.
2009-05-10 22:03:22 +00:00
dogcow
c96865e412 more -Wsign-compare fixes. 2009-04-18 06:37:35 +00:00
joerg
997634fe14 Fix preamble to match order set out by mdoc(7). Discussed with wiz. 2009-03-09 19:24:26 +00:00
christos
336eaa9131 comment out impossible code. 2006-10-24 20:45:33 +00:00
mrg
5f6c58ab32 apply a few casts to quieten GCC4. 2006-05-25 09:04:37 +00:00
nathanw
74b0c97cb7 Pull in <machine/endian.h> on NetBSD instead of hardcoding to
big-endian.
2005-09-28 17:27:26 +00:00
he
4076227c4a Apply fixes so that this builds with WARNS=3.
Renames instances of "index" to "ix", and fixes a number of -Wcast-qual
problems by liberally sprinkling const declarations around.

This should now build again for both macppc and mac68k.

Patches sent to original maintainer.
2005-07-13 15:25:29 +00:00
he
3aae114a47 Initialize variable to appease -Wuninitialized for powerpc. 2005-07-13 15:22:55 +00:00
christos
4be93fc1ce PR/21155: Christian Biere: ctype function misuse. 2005-04-17 17:34:43 +00:00
dbj
3ce67e6c14 deal with editing partitions past the detected media size.
When deleting the final partition, truncate it to match media size.
Also handle creating new partitions beyond the existing partitions
if it is still within the media size.
2004-06-14 07:48:55 +00:00
itojun
e1e0321817 use bounded string op 2003-08-13 02:51:20 +00:00
wiz
55577d02cc New sentence, new line. Remove an empty line. 2003-04-24 12:28:12 +00:00
dbj
5273e73a7c bump date 2003-04-24 07:43:53 +00:00
dbj
7217a44a7f ensure variable is initialized 2003-04-24 07:05:21 +00:00
dbj
ec91c7e736 note pdisk's problems with calculating the raw device size 2003-04-24 06:32:42 +00:00
dbj
263ed6747c reenable include <getopt.h> for getopt_long(3) 2003-04-24 04:15:58 +00:00
dbj
729bd4d1af fix nits to compile and function on osX 2003-04-24 03:38:53 +00:00
dbj
47e126059c add support for selecting root, user, or swap in the Block Zero Block bits
when setting Apple_UNIX_SVR2.
Correctly update dpme flags when partition is changed to Apple_HFS
Properly reread Apple_HFS volume name when partition is changed to Apple_HFS
update man page to reflect new functionality
document t command in man page
2003-04-24 03:34:34 +00:00
dbj
8ce174cfdf comment out bogus attempt to zero first byte after map on disk 2003-04-22 18:19:39 +00:00
dbj
a693779b76 avoid freeing uninitialized pointer 2003-04-22 17:04:06 +00:00
wiz
65eac0ca35 Sort help here (just like in the man page). 2003-03-03 07:36:05 +00:00
wiz
b7fe070de4 Bump date for "t", and sort. 2003-03-03 07:35:45 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
soren
98bd894cee Add command to change partition types directly.
From Alexander Guy via OpenBSD.
2003-02-18 16:20:37 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
dbj
80437c10e3 add a HISTORY section, mentioning MkLinux 2002-09-17 08:14:22 +00:00
dbj
0270296979 when creating a partition, set bzb bits appropriate for netbsd root 2002-09-17 07:42:55 +00:00
dbj
1efa014b91 use %ld instead of %d to print long value 2002-09-09 13:19:28 +00:00
dbj
a587e4b1e8 remove menu and command line options to list all devices since they
only work on linux.  Update documentation to match.
2002-09-09 13:07:36 +00:00
dbj
538e2d34af use device instead of name to describe the --list argument. 2002-09-09 11:43:27 +00:00
wiz
9235156b82 Sort options. Some mdoc improvements. 2002-09-09 11:33:31 +00:00
dbj
72af4e4c96 fix typo in --list argument name 2002-09-09 11:29:56 +00:00
dbj
1436ee17e3 attempt to update pdisk man page to more correctly reflect program operation
. added long options
. noted that pdisk cannot yet create netbsd partitions
. renamed -p to -f and documented
. changed description of -L to note that it is off by default
2002-09-09 11:26:29 +00:00
dbj
a46307b17e default fflag (read HFS volume name ) option is now off
remove the non-functional -p/--pname argument, replace it with -f/--fname
add -a (use abbreviations) and -L (use logical offsets) to getopt parse list
thanks to wiz for noticing inconsistencies
2002-09-09 10:46:59 +00:00
dbj
8d3827bfb7 tweak error reporting when looking for hfs volume name 2002-09-09 10:38:55 +00:00
dbj
f89c2d2361 fix defines that set up lseek usage for reading media
to correctly handle large filesystems
re-enable some error reporting on media reads
2002-09-09 10:35:03 +00:00
dbj
28d41a2531 use getopt_long on netbsd as well as linux 2002-09-08 23:49:29 +00:00
dbj
47b77fc755 improved wording on explanation for disabling linux max partition warning. 2002-09-08 23:25:43 +00:00
dbj
b3ad08828d disable warnings about linux only handling 15 entries.
This check was found to not exist in the linux fdisk-0.1
sources, which are under current linuxppc use.  Also,
NetBSD users probably care less about warnings for bugs
in old versions of linux.
2002-09-08 23:18:11 +00:00