summaryrefslogtreecommitdiffstats
path: root/sbin/pdisk/pdisk.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Let the great de-typedef'ification begin. MEDIA -> struct file_media *.krw2016-01-171-2/+2
|
* Move last field (size_in_bytes) in struct media to struct file_mediakrw2016-01-161-2/+2
| | | | and replace MEDIA with FILE_MEDIA everywhere. media.h becomes unused.
* There can be only one. 'grain' that is. i.e. DEV_BSIZE. No need to trackkrw2016-01-161-5/+2
| | | | | | or store. Just use. No functional change.
* Start peeling away excess layers of abstraction.krw2016-01-161-3/+3
| | | | | | | | | | Since 'file' is the only kind of media, no need to call the appropriate functions via pointers. Just call the _file_ variants directly. Nuke the fields do_read(), do_write(), do_close(), do_os_reload() and the functions read_media(), write_media(), close_media() and os_reload_media(). No functional change.
* We don't need yet another alias for DEV_BSIZE. Use DEV_BSIZE andkrw2016-01-151-7/+8
| | | | nuke PBLOCK_SIZE and another unused #define.
* Kill unused variable 'lfile'.krw2016-01-141-6/+2
|
* Don't include hfs_misc.h, which no longer contains anything of use.krw2016-01-141-2/+1
|
* Remove code supporting undocumented and inaccessible flags 'a'krw2016-01-141-9/+1
| | | | | (abbreviate partition type names), 'f' (print HFS partition names) and 'kLogicalOption' (obviously a getopt_long() conversion error).
* Remove obsolete flags (h, v, i, c) from getopt() call.krw2016-01-131-7/+4
| | | | No need for 'flags' variable. Just call usage() on unknown options.
* The only thing in pdisk.h is an unused #define. So don't include it.krw2016-01-121-2/+1
|
* Use normal err/errx/warn/warnx rather than handrolling new ones. Movekrw2016-01-121-19/+23
| | | | | | usage() to pdisk.c and nuke do_help() and '-h'. ok jasper@ deraadt@
* Retire '-i', a poorly documented interactive mode that tries tokrw2016-01-121-138/+5
| | | | | | | mimic the 20th century MacOS version of pdisk more closely than the usual interactive editor. One set of commands is enough for anyone. ok jasper@
* Since we use the disklabel size info we are always in 'device sizekrw2016-01-121-21/+1
| | | | | mode' and '-c' and the '-d' command to toggle cflag are pointless since cflag is never examined.
* Remove some '-v' leftovers. Pointed out by jasper@.krw2016-01-111-8/+2
|
* open_pathname_as_media() simply called open_file_as_media() whichkrw2016-01-111-3/+3
| | | | | | | | | | takes the same parameters and returns the same value. Nuke open_pathname_as_media() and call open_file_as_media() directly. Nothing else from pathname.[ch] is used so remove them from build in preparation for moving them to the attic. ok deraadt@
* Remove '-v' and related version handling. Use strncasecmp() insteadkrw2016-01-111-21/+3
| | | | | | of handrolled local istrncmp(). No need to compile util.c anymore. ok deraadt@ jasper@
* more whitespace was lurkingjasper2016-01-111-2/+2
|
* add rcs idsjasper2016-01-111-0/+2
|
* Remove NULL-checks before free(). ok tb@mmcc2015-12-101-6/+3
|
* Use __progname instead of manually handling argv[0].tobias2015-12-061-2/+0
| | | | ok deraadt, mmcc, tedu
* <stdlib.h> is included, so do not need to cast result fromderaadt2015-08-201-1/+1
| | | | | malloc, calloc, realloc* ok krw millert
* remove mac68k leftoversjsg2012-08-081-31/+0
| | | | ok miod@ mpi@ deraadt@ martin@
* use opendev(), as requested in 6373. document this using text borrowed fromderaadt2010-05-251-2/+0
| | | | | disklabel(8), and while at it, fix the usage code to not be utterly distasteful ok drahn
* partion -> partition. First one (mkfs.c) noted by Brad Tilley on tech@.krw2009-12-231-1/+1
|
* put back original getopt(3) handling lost during the updatemartin2006-05-121-45/+5
|
* remove a bunch of linux and NeXT defines and, in turn, -D__unix__martin2006-05-111-39/+0
|
* With last pdisk and full functionality for mac68k now in place, startmartin2006-04-291-69/+0
| | | | | | cleaning the maze of ifdef's not relevant for us. This round wipes most linux and/or MacOS-only bits, more to come.
* update for pdisk 0.8a2, from NetBSD, retaining our local changes;martin2006-04-271-119/+182
| | | | | | | | | | | | | | | | | | | | | summing it up: - Clean up sources - fix naming, delete old email addresses - Added support for display of Mac volume names - Fix block 0 display to show logical offset of drivers - Require confirmation of quit without write - Fix iteration to not complain about missing devices - Warn when creating/writing a map with more than 15 entries and, most important, add do_update_dpme() which allows us to partition OpenBSD slices without previous MacOS setup. Tested with shared MacOS install on macppc, procedure there remains the same. grammer and spelling help and ok jmc@ ok miod@
* Check strdup return value for failure. OK miodcloder2005-03-061-1/+4
|
* get rid of incorrectly sized buffer by using asprintf; ok millertpvalchev2003-04-241-3/+8
|
* snprintf; drahn okderaadt2003-04-021-2/+1
|
* more writable spelling; torhhenning2002-12-151-7/+7
|
* rm trailing whitespacetodd2002-06-091-18/+18
|
* New feature for pdisk, change the type of a parition.drahn2001-10-121-1/+50
| | | | | | | Useful since that is part of the OpenBSD/macppc installation procedure. Code by Alexander Guy, examined by drahn@ ok deraadt@
* return from main() don't exitmickey2001-06-041-1/+1
|
* Make the apple code compile for OpenBSD. These changes are mostly from maja.drahn2001-03-241-2/+68
|
* Import of pdisk from apple, BSD licensed code. Archive dated Feb 18 1998 drahn2001-03-241-0/+1004
This is a HFS partition editing tool.