Age | Commit message (Collapse) | Author |
|
of blocks to (long long) before multiplying by 512 and passing the
value to fmt_scaled().
Discovered and fix tested by rpe@.
ok rpe@ deraadt@
|
|
set to the same value.
|
|
human readable sizes.
|
|
flag around. More obviously current data. Nuke unnecessary variables
when displaying a partition.
|
|
used anywhere else.
Remove declarations of non-existant kPatchType and init_partition_map().
|
|
the same.
Don't use lblock_start or lblocks in calculation for length@base
display. We no longer display lblock info there.
|
|
tweak #include's as necessary.
|
|
struct block0 into struct partition_map. Easier to read code.
|
|
and read/write_block0() can move the data from/to disk to/from
appropriate fields anywhere. Removes a bunch of dereferencing,
malloc'ing and pointer checking.
|
|
'p' command output. And always show the lblock info in the 'P'
command. Showing sometimes one and sometimes another with a subtle
extra character to indicate which is being shown is error prone.
|
|
|
|
.o files.
|
|
|
|
|
|
block0, there is no point in checking later if block0 has magically
become invalid.
|
|
|
|
OK krw@
|
|
field and left over code that checks for logical != physical.
Removes confusion with dmpe fields lblock_start and lblocks, which
have nothing to do with block sizes! lblock_start is the block
offset within the partition where the data actually starts. and
lblocks is the number of blocks of data within the partition. Both
are in units of *physical blocks*, a.k.a. disk sectors.
|
|
statements.
|
|
strlcpy() to fill them.
They are also supposed to be NUL-padded so zap previous contents
before copying in possibly shorter new values.
|
|
statements. 0 -> NULL for pointer checks.
|
|
|
|
endian or alignment issues forcefully. Removes need for convert_*
functions so unhook convert.c from build. read/write_block become
static functions inside file_media.c.
Tweak struct block0 to stop trying to handle alignment issues by clever
declaration. Rely on the new functions to accurately translate between
on-disk and in-memory layouts.
Enables pdisk to work on amd64 and likely other architectures if
it's ever desirable. Does bring back DEV_BSIZE to pdisk.c since the
in-memory structure will *not* be 512 bytes on other archs.
|
|
Better comments, make all reserved fields uint8_t arrays, don't
claim uint32_t fields are actually pointers.
|
|
ok krw@
|
|
|
|
anything according to gcc & cmp.
cmp suggested by & ok stefan@.
|
|
|
|
Nuke kStringEmpty and use "" where needed. Nuke unused static 'g'.
Eliminate #include's in *.h files.
Some whitespace fixes.
|
|
instead of off_t values. Do the DEV_BSIZE multiplication in these two
functions.
Easier to read code and kills two #include <sys/param.h>.
Kill unused label.
|
|
So stop checking for NULL. Nuke get_block_zero() and just use
map->block0.
|
|
to 'create_dmpe'. Sweep up some 'struct dpme *data' to struct dpme
*dpme'.
|
|
|
|
the 'written' field and just use the 'changed' field to mediate
when it is appropriate to ask whether changes should be discarded.
|
|
just making all the commands available all the time. Document the
newly available commands.
Remove the former 'P' command (list partitions in base address
order) and use 'P' from expert mode (show map data structures).
Stop accepting uppercase aliases for commands documented as lower
case.
Bring the 'h' help text and man pages into agreement.
ok jasper@ millert@
|
|
a valid map to edit(). Should enable pledging a la fdisk at some point.
Since edit() always gets a valid map (and maintains its validity even when
'I'nitializing a new one) many checks for (map == NULL) are junked.
Remove some dances around block sizes by using DEV_BSIZE everywhere
since we don't support non-DEV_BSIZE (a.k.a. 512-byte) sectors.
Remove many superfluous #include statements.
|
|
(!rflag && writable == 0) can't be true remove those warning blocks and
simply leave the not-writable warning when attempting to write the
map. Always show 'w' in the help and rely on the check and warning
in do_write_partition_map() so the user always gets a message.
|
|
disk to be specified on the command line. Nuke dump() function and
hoist its few lines into main() as a result.
|
|
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@
|
|
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().
|
|
KNF'ish.
|
|
|
|
declarations.
|
|
|
|
|
|
bunch of consequent printf() format corrections.
|
|
partition_map -> struct partition_map
partition_map_header -> struct partition_map_header
|
|
PatchList -> struct patchlist
Nuke PatchListPtr
PatchListDescriptor -> struct patchlistdescriptor
Nuke PatchListDescriptorPtr
|
|
Nuke names/NAMES as the only use was in an unused array of abbreviations
which also goes.
|
|
|