History log of /openbsd-src/sbin/pdisk/dump.c (Results 1 – 25 of 75)
Revision Date Author Comments
# 5fe72782 23-Feb-2016 krw <krw@openbsd.org>

Fix display of pdisk partition sizes by casting the 32-bit number
of blocks to (long long) before multiplying by 512 and passing the
value to fmt_scaled().

Discovered and fix tested by rpe@.

ok rpe

Fix display of pdisk partition sizes by casting the 32-bit number
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@

show more ...


# ead46a34 31-Jan-2016 krw <krw@openbsd.org>

Nuke pointless map field 'physical_block' and just use 'sbBlkSize' which is
set to the same value.


# a8aa5af7 31-Jan-2016 krw <krw@openbsd.org>

Nuke djust_value_and_compute_prefix() and use fmt_scaled() to display
human readable sizes.


# 575b2bc1 31-Jan-2016 krw <krw@openbsd.org>

Just call contains_driver() when you need to know rather than carrying a
flag around. More obviously current data. Nuke unnecessary variables
when displaying a partition.


# 71c5b58d 31-Jan-2016 krw <krw@openbsd.org>

Move dump_block() declaration from io.h to io.c since it is not
used anywhere else.

Remove declarations of non-existant kPatchType and init_partition_map().


# 2b90374c 31-Jan-2016 krw <krw@openbsd.org>

Apple sets lblock_start and lblocks to 0 in free space entries. Do
the same.

Don't use lblock_start or lblocks in calculation for length@base
display. We no longer display lblock info there.


# a63f2390 30-Jan-2016 krw <krw@openbsd.org>

Move last three lines (#define's) from dpme.h to partition_map.h and
tweak #include's as necessary.


# f8fa35e5 30-Jan-2016 krw <krw@openbsd.org>

Fold struct dpme into struct entry. Same reasons as for folding
struct block0 into struct partition_map. Easier to read code.


# 6f012227 29-Jan-2016 krw <krw@openbsd.org>

Fold struct block0 into struct partition map. There can be only one
and read/write_block0() can move the data from/to disk to/from
appropriate fields anywhere. Removes a bunch of dereferencing,
mallo

Fold struct block0 into struct partition map. There can be only one
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.

show more ...


# 8e37d564 29-Jan-2016 krw <krw@openbsd.org>

Tweak printing of partitions. Always show the pblock info in the
'p' command output. And always show the lblock info in the 'P'
command. Showing sometimes one and sometimes another with a subtle
extr

Tweak printing of partitions. Always show the pblock info in the
'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.

show more ...


# cbc59f69 29-Jan-2016 krw <krw@openbsd.org>

Shorter names means a few whitespace adjustments.


# 356b92ce 29-Jan-2016 krw <krw@openbsd.org>

Rename struct partition_map_header to struct partition_map. No change to
.o files.


# f4c16b6b 29-Jan-2016 krw <krw@openbsd.org>

Rename struct partition_map to struct entry. No change to .o files.


# 0392b273 28-Jan-2016 krw <krw@openbsd.org>

Hand rolled lists suck. First, replace disk_order with an LIST.


# d5ffcd0a 28-Jan-2016 krw <krw@openbsd.org>

Since we don't allow maps to be created or opened with an invalid
block0, there is no point in checking later if block0 has magically
become invalid.


# 93e52e22 27-Jan-2016 krw <krw@openbsd.org>

No need to copy dmpe_name to a buffer before printing it.


# 5929fd96 27-Jan-2016 gsoares <gsoares@openbsd.org>

make sure to check malloc(3) return pointer against NULL.
OK krw@


# c579b49f 27-Jan-2016 krw <krw@openbsd.org>

We do not support logical_block != physical_block. Remove logical_block
field and left over code that checks for logical != physical.

Removes confusion with dmpe fields lblock_start and lblocks, whi

We do not support logical_block != physical_block. Remove logical_block
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.

show more ...


# bd45c0ec 27-Jan-2016 krw <krw@openbsd.org>

Nuke another (and I hope final) batch of superfluous '{}' around single
statements.


# 38bdfd73 26-Jan-2016 krw <krw@openbsd.org>

dpme_name and dpme_type are NUL-terminated in Apple code, so use
strlcpy() to fill them.

They are also supposed to be NUL-padded so zap previous contents
before copying in possibly shorter new value

dpme_name and dpme_type are NUL-terminated in Apple code, so use
strlcpy() to fill them.

They are also supposed to be NUL-padded so zap previous contents
before copying in possibly shorter new values.

show more ...


# a8b53b4c 26-Jan-2016 krw <krw@openbsd.org>

Whitespace, line wrapping fixes. Nuke many superfluous '{}' around single
statements. 0 -> NULL for pointer checks.


# 35985165 26-Jan-2016 krw <krw@openbsd.org>

Whitespace, line wrapping fixes.


# f7e12bbc 25-Jan-2016 krw <krw@openbsd.org>

Use new read/write_block0 and read/write_dpme which handle any
endian or alignment issues forcefully. Removes need for convert_*
functions so unhook convert.c from build. read/write_block become
stat

Use new read/write_block0 and read/write_dpme which handle any
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.

show more ...


# 31859932 25-Jan-2016 krw <krw@openbsd.org>

Tweak fields in struct dpme to be more consistent with Apple's info.

Better comments, make all reserved fields uint8_t arrays, don't
claim uint32_t fields are actually pointers.


# 7f7a7963 25-Jan-2016 jsg <jsg@openbsd.org>

remove some uneeded includes
ok krw@


123