ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/pbcdedit/pbcdedit
(Generate patch)

Comparing pbcdedit/pbcdedit (file contents):
Revision 1.43 by root, Sat Aug 17 00:54:43 2019 UTC vs.
Revision 1.44 by root, Sat Aug 17 05:03:57 2019 UTC

291.3 291.3
30 - output of pbcdedit elements --json has changed, as it didn't 30 - output of pbcdedit elements --json has changed, as it didn't
31 take the reorganisation by classes fully into account. 31 take the reorganisation by classes fully into account.
32 - json schema bumped to 3. 32 - json schema bumped to 3.
33 - new "bcd-device" and "bcd-legacy-device" subcommands. 33 - new "bcd-device" and "bcd-legacy-device" subcommands.
34 - implement --json option for lsblk.
34 35
351.2 Fri Aug 16 00:20:41 CEST 2019 361.2 Fri Aug 16 00:20:41 CEST 2019
36 - bcde element names now depend on the bcd object type they are in, 37 - bcde element names now depend on the bcd object type they are in,
37 also affects "elements" output. 38 also affects "elements" output.
38 - json schema bumped to 2. 39 - json schema bumped to 2.
143=item C<parse> F<path> I<instructions...> 144=item C<parse> F<path> I<instructions...>
144 145
145Same as C<edit>, above, except it doesn't save the data store again. Can 146Same as C<edit>, above, except it doesn't save the data store again. Can
146be useful to extract some data from it. 147be useful to extract some data from it.
147 148
148=item C<lsblk> 149=item C<lsblk> [C<--json>]
149 150
150On a GNU/Linux system, you can get a list of partition device descriptors 151On a GNU/Linux system, you can get a list of partition device descriptors
151using this command - the external C<lsblk> command is required, as well as 152using this command - the external C<lsblk> command is required, as well as
152a mounted C</sys> file system. 153a mounted C</sys> file system.
153 154
154The output will be a list of all partitions in the system and C<partition> 155The output will be a list of all partitions in the system and C<partition>
155descriptors for GPT and both C<legacypartition> and C<partition> 156descriptors for GPT and both C<legacypartition> and C<partition>
156descriptors for MBR partitions. 157descriptors for MBR partitions.
158
159With C<--json> it will print similar informationm as C<lsblk --json>, but
160with extra C<bcd_device> and C<bcd_legacy_device> attributes.
157 161
158=item C<bcd-device> F<path> 162=item C<bcd-device> F<path>
159 163
160Tries to find the BCD device element for the given device, which currently 164Tries to find the BCD device element for the given device, which currently
161must be a a partition of some kind. Prints the C<partition=> descriptor as 165must be a a partition of some kind. Prints the C<partition=> descriptor as
2598 "import-regf" => sub { 2602 "import-regf" => sub {
2599 regf_save shift, rdjson; 2603 regf_save shift, rdjson;
2600 }, 2604 },
2601 2605
2602 lsblk => sub { 2606 lsblk => sub {
2607 my $json = $_[0] eq "--json";
2608
2603 my $lsblk = lsblk; 2609 my $lsblk = lsblk;
2604 2610
2611 if ($json) {
2612 prjson $lsblk;
2613 } else {
2605 printf "%-10s %-8.8s %-6.6s %-3s %s\n", "DEVICE", "LABEL", "FSTYPE", "PT", "DEVICE DESCRIPTOR"; 2614 printf "%-10s %-8.8s %-6.6s %-3s %s\n", "DEVICE", "LABEL", "FSTYPE", "PT", "DEVICE DESCRIPTOR";
2606 for my $dev (@$lsblk) { 2615 for my $dev (@$lsblk) {
2607 for my $bcd ($dev->{bcd_device}, $dev->{bcd_legacy_device}) { 2616 for my $bcd ($dev->{bcd_device}, $dev->{bcd_legacy_device}) {
2608 printf "%-10s %-8.8s %-6.6s %-3s %s\n", 2617 printf "%-10s %-8.8s %-6.6s %-3s %s\n",
2609 $dev->{path}, $dev->{label}, $dev->{fstype}, $dev->{pttype}, $bcd 2618 $dev->{path}, $dev->{label}, $dev->{fstype}, $dev->{pttype}, $bcd
2610 if $bcd; 2619 if $bcd;
2620 }
2611 } 2621 }
2612 } 2622 }
2613 }, 2623 },
2614 2624
2615 "bcd-device" => sub { 2625 "bcd-device" => sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines