OSDN Git Service

lpdump: Refactor how lpdump reads metadata.
authorDavid Anderson <dvander@google.com>
Fri, 6 Sep 2019 00:57:20 +0000 (17:57 -0700)
committerDavid Anderson <dvander@google.com>
Fri, 6 Sep 2019 01:55:53 +0000 (18:55 -0700)
commit674ae9ee88a487f18ec400add8c3d50a1db779e2
treeb59efa389a0818eaa942139cf4cc37690cae1ca4
parent3342738e82b07afeccf0bc9962ff047093335a1f
lpdump: Refactor how lpdump reads metadata.

This patch prepares lpdump for the addition of an "--all" option to dump
all metadata slots.

 - The slot and super partition name are now determined ahead of time,
   rather than as part of reading metadata.
 - The custom IPartitionOpener has been removed as it served no purpose.
 - The -e option has been removed in favor of IsEmptySuperImage().
 - Metadata spew has been factored into a separate function.

Bug: 140204341
Test: manual test
Change-Id: I810a5f042870f7e072a8939bebe99b8707235f43
partition_tools/lpdump.cc