summaryrefslogtreecommitdiff
path: root/sbin/pdisk
AgeCommit message (Collapse)Author
2016-01-19Remove unused global 'io_buffer'.Kenneth R Westerback
2016-01-19Remove forward declarations for functions that do not exist.Kenneth R Westerback
2016-01-19Bring code into line with man page and usage() by only allowing oneKenneth R Westerback
disk to be specified on the command line. Nuke dump() function and hoist its few lines into main() as a result.
2016-01-19No need for pdisk(8) to provide a version of hexdump. RemoveKenneth R Westerback
the "expert" mode 'd'/'D' command and its supporting code. ok deraadt@ jasper@
2016-01-18The contents of the Apple_Patches partition is none of our business.Kenneth R Westerback
Stop pretending we care or know what's in there. Remove 'debugging' mode command to examine the partition contents and the supporting code. ok deraadt@ jasper@
2016-01-18struct file_media had 1 field left. And one place where structKenneth R Westerback
file_media was actually stored. So move the last field (fd) into the place formerly used to store pointer to the instance. As a result we can just pass fd's around rather than pointers to a struct containing a fd. close_file_media() becomes empty but for a close(). So just use close() and nuke close_file_media().
2016-01-18Discard a whack of double and triple checking lseek/read/write parameters.Kenneth R Westerback
Just use pread/pwrite and report error emanating from them. No more uses of size_in_byte field of struct file_media, so toss that too.
2016-01-18os_reload_file_media() doesn't do anything except tell you if you passed itKenneth R Westerback
a NULL pointer. And the result is ignored. Nuke it. This removes the only use of the 'regular_file' field of struct file_media. So nuke that too.
2016-01-18Run indent(1) over it and tweak the results a bit manually to look moreKenneth R Westerback
KNF'ish.
2016-01-18Run indent(1) over it and tweak the results a bit manually to look moreKenneth R Westerback
KNF'ish.
2016-01-18Run indent(1) over it and tweak the results a bit manually to look moreKenneth R Westerback
KNF'ish.
2016-01-18Run indent(1) over it and tweak the results a bit manually to look moreKenneth R Westerback
KNF'ish.
2016-01-18Run indent(1) over it and tweak the results a bit manually to look moreKenneth R Westerback
KNF'ish.
2016-01-18Run indent(1) over it and tweak the results a bit manually to look moreKenneth R Westerback
KNF'ish.
2016-01-18Run indent(1) over it and tweak the results a bit manually to look moreKenneth R Westerback
KNF'ish.
2016-01-18Fold get_options() into main() and eliminate unneeded nFLAG_DEFAULTKenneth R Westerback
#defines. Zero is a well known and acceptable number.
2016-01-18Remove a grab bag of unused #define's, fields, enum's, variables,Kenneth R Westerback
functions.
2016-01-17Change "//" comments to "/**/". Nuke really stupid ones.Kenneth R Westerback
2016-01-17Reduce namespace pollution by eliminating parameter names from forwardKenneth R Westerback
declarations.
2016-01-17Kill leading, imbedded, trailing whitespace.Kenneth R Westerback
2016-01-17Remove a bunch of ridiculous and uninformative comments like "// Defines".Kenneth R Westerback
2016-01-17The great de-typedef'ification concludes with u32 -> uint32_t. And aKenneth R Westerback
bunch of consequent printf() format corrections.
2016-01-17The great de-typedef'ification continues. u16 -> uint16_t.Kenneth R Westerback
2016-01-17The great de-typedef'ification continues. u8 -> uint8_t.Kenneth R Westerback
2016-01-17The great de-typedef'ification continues.Kenneth R Westerback
partition_map -> struct partition_map partition_map_header -> struct partition_map_header
2016-01-17The great de-typedef'ification continues. range_list -> struct range_list.Kenneth R Westerback
2016-01-17The great de-typedef'ification continues.Kenneth R Westerback
PatchList -> struct patchlist Nuke PatchListPtr PatchListDescriptor -> struct patchlistdescriptor Nuke PatchListDescriptorPtr
2016-01-17The great de-typedef'ification continues. OSType -> unsigned long.Kenneth R Westerback
Nuke names/NAMES as the only use was in an unused array of abbreviations which also goes.
2016-01-17The great de-typedef'ification continues. DDMap -> struct ddmap.Kenneth R Westerback
2016-01-17The great de-typedef'ification continues. Block0 -> struct block0.Kenneth R Westerback
2016-01-17The great de-typedef'ification continues. DPME -> struct dpme.Kenneth R Westerback
2016-01-17Let the great de-typedef'ification begin. MEDIA -> struct file_media *.Kenneth R Westerback
2016-01-17A/UX is no more, was m68k only, and we have no sentimental reasons forKenneth R Westerback
keeping support.
2016-01-17oopsJasper Lievisse Adriaanse
2016-01-17- tidy up a bunch of #if's for code that has been either enabled or disabled ↵Jasper Lievisse Adriaanse
since forever, or not relevant at all (e.g. some bits for A/UX support) - remove commented code that has never been compiled, etc ok krw@
2016-01-16Another one to the attic.Kenneth R Westerback
2016-01-16Move last field (size_in_bytes) in struct media to struct file_mediaKenneth R Westerback
and replace MEDIA with FILE_MEDIA everywhere. media.h becomes unused.
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