summaryrefslogtreecommitdiff
path: root/sbin/pdisk
AgeCommit message (Collapse)Author
2016-01-16Oops. Missed a file.Kenneth R Westerback
2016-01-16Another to the attic.Kenneth R Westerback
2016-01-16No need to abstract malloc(), so replace new_file_media() withKenneth R Westerback
malloc(). Removes last use of last used function in media.c, so unhook that from the Makefile and remove forward declarations from media.h. No functional change.
2016-01-16There can be only one. 'grain' that is. i.e. DEV_BSIZE. No need to trackKenneth R Westerback
or store. Just use. No functional change.
2016-01-16There can be only one. 'kind' that is. No need to allocate or track theKenneth R Westerback
media kind since it will always be the same -- a file. No functional change.
2016-01-16Remove some forward declarations missed in last commit.Kenneth R Westerback
2016-01-16Start peeling away excess layers of abstraction.Kenneth R Westerback
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.
2016-01-16remove these files for they're no longer accurate, up to date or relevant forJasper Lievisse Adriaanse
that matter. ok krw@
2016-01-16Another couple for the attic.Kenneth R Westerback
2016-01-16Nuke support for 1024- and 2048-byte sector devices. Error out ifKenneth R Westerback
anything other than 512-byte sectors are encountered. Unlink deblock_media.c from the build. ok jasper@
2016-01-15As with compute_device_size(), gut compute_block_size() and simplyKenneth R Westerback
ask the disklabel as everyone else does. Add file name to compute_block_size() parameters to make error messages nicer.
2016-01-15We don't need yet another alias for DEV_BSIZE. Use DEV_BSIZE andKenneth R Westerback
nuke PBLOCK_SIZE and another unused #define.
2016-01-15Two more for the attic.Kenneth R Westerback
2016-01-15Replace bitfield_get() and bitfield_set() abstraction with simple maskingKenneth R Westerback
operations since all the uses but 1 are for 1 bit fields. No functional change intended. Unhook bitfield.c from build.
2016-01-14Kill unused variable 'lfile'.Kenneth R Westerback
2016-01-14Move more unused files to attic.Kenneth R Westerback
2016-01-14Don't include hfs_misc.h, which no longer contains anything of use.Kenneth R Westerback
2016-01-14Nuke 'HFS_name' field which was not referenced now other than settingKenneth R Westerback
it and freeing it. Unhook hfs_misc.c from build since it now longer contains anything being used.
2016-01-14Remove code supporting undocumented and inaccessible flags 'a'Kenneth R Westerback
(abbreviate partition type names), 'f' (print HFS partition names) and 'kLogicalOption' (obviously a getopt_long() conversion error).
2016-01-13Remove obsolete flags (h, v, i, c) from getopt() call.Kenneth R Westerback
No need for 'flags' variable. Just call usage() on unknown options.
2016-01-13Nuke unused enum.Kenneth R Westerback
2016-01-12#define LOFF_T off_tKenneth R Westerback
#define llseek lseek #define LOFF_T_MAX LLONG_MAX I mean, really? Nuke'em and use off_t, lseek and LLONG_MAX. Also make a couple of checks for overflow of off_t value more likely to work. ok millert@
2016-01-12Another unused file for the attic.Kenneth R Westerback
2016-01-12The only thing in pdisk.h is an unused #define. So don't include it.Kenneth R Westerback
2016-01-12Move unused files to attic.Kenneth R Westerback
2016-01-12Use normal err/errx/warn/warnx rather than handrolling new ones. MoveKenneth R Westerback
usage() to pdisk.c and nuke do_help() and '-h'. ok jasper@ deraadt@
2016-01-12Remove media interation types, structures and functions. They are not usedKenneth R Westerback
anywhere, as evidenced by everything still compiling after they are gone.
2016-01-12Retire '-i', a poorly documented interactive mode that tries toKenneth R Westerback
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@
2016-01-12Since we use the disklabel size info we are always in 'device sizeKenneth R Westerback
mode' and '-c' and the '-d' command to toggle cflag are pointless since cflag is never examined.
2016-01-11More '-v' leftovers (usage).Kenneth R Westerback
2016-01-11Remove some '-v' leftovers. Pointed out by jasper@.Kenneth R Westerback
2016-01-11Nuke now unused files.Kenneth R Westerback
ok deraadt@
2016-01-11open_pathname_as_media() simply called open_file_as_media() whichKenneth R Westerback
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@
2016-01-11Nuke now unused files.Kenneth R Westerback
ok deraadt@ jasper@
2016-01-11Remove '-v' and related version handling. Use strncasecmp() insteadKenneth R Westerback
of handrolled local istrncmp(). No need to compile util.c anymore. ok deraadt@ jasper@
2016-01-11- remove some unused data structures/fieldsJasper Lievisse Adriaanse
- unifdef notdef ok krw@
2016-01-11plug a mem leakJasper Lievisse Adriaanse
ok krw@
2016-01-11more whitespace was lurkingJasper Lievisse Adriaanse
2016-01-11trailing whitespaceJasper Lievisse Adriaanse
2016-01-11add rcs idsJasper Lievisse Adriaanse
2016-01-10Use the normal method for determining a disk size. i.e. use theKenneth R Westerback
device's default disklabel. Don't spew i/o's at the disk to find the largest address that works, displaying many a 'read failed' message along the way. Problem noted by Brian Conway on bugs@ and jasper@. ok jasper@
2015-12-10Remove NULL-checks before free(). ok tb@mmcc
2015-12-06Use __progname instead of manually handling argv[0].Tobias Stoeckmann
ok deraadt, mmcc, tedu
2015-08-20Two reallocarray() conversions that were missed earlier.Todd C. Miller
OK deraadt@
2015-08-20<stdlib.h> is included, so do not need to cast result fromTheo de Raadt
malloc, calloc, realloc* ok krw millert
2014-07-21Switch from <sys/endian.h> or <machine/endian.h> to the new,Philip Guenther
being-standardized <endian.h> ok deraadt@ millert@ beck@
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2012-12-04remove some unnecessary sys/param.h inclusionsTheo de Raadt
2012-08-08remove mac68k leftoversJonathan Gray
ok miod@ mpi@ deraadt@ martin@
2012-06-20more mac68k bits for the atticMatthew Dempsky