… | |
… | |
19 | # along with this program. If not, see <https://www.gnu.org/licenses/>. |
19 | # along with this program. If not, see <https://www.gnu.org/licenses/>. |
20 | # |
20 | # |
21 | |
21 | |
22 | use 5.016; # numerous features need 5.14, __SUB__ needs 5.16 |
22 | use 5.016; # numerous features need 5.14, __SUB__ needs 5.16 |
23 | |
23 | |
24 | our $VERSION = '1.4'; |
24 | our $VERSION = '1.5'; |
25 | our $JSON_VERSION = 3; # the version of the json objects generated by this program |
25 | our $JSON_VERSION = 3; # the version of the json objects generated by this program |
26 | |
26 | |
27 | our $CHANGELOG = <<EOF; |
27 | our $CHANGELOG = <<EOF; |
28 | |
28 | |
|
|
29 | 1.5 Mon Nov 25 15:54:34 CET 2019 |
29 | - add "del" edit instruction. |
30 | - add "del" edit instruction. |
30 | - work around lsblk bug sometimes giving "dos" pttype for gpt partitions. |
31 | - work around lsblk bug sometimes giving "dos" pttype for gpt partitions. |
31 | - bootmenupolicy in synopsis must be set to 0 to get the text menu. |
32 | - bootmenupolicy in synopsis must be set to 0 to get the text menu. |
32 | - minor doc fxes. |
33 | - minor doc fxes. |
|
|
34 | - disable use of perldoc for help, doesn't work well. |
33 | |
35 | |
34 | 1.4 Thu Aug 22 10:48:22 CEST 2019 |
36 | 1.4 Thu Aug 22 10:48:22 CEST 2019 |
35 | - new "create" subcommand. |
37 | - new "create" subcommand. |
36 | - "create" and "edit" try to save and restore ownership/permissions |
38 | - "create" and "edit" try to save and restore ownership/permissions |
37 | of bcd hives when writing the new file. |
39 | of bcd hives when writing the new file. |
… | |
… | |
331 | |
333 | |
332 | =head2 The C<meta> key |
334 | =head2 The C<meta> key |
333 | |
335 | |
334 | The C<meta> key is not stored in the BCD data store but is used only |
336 | The C<meta> key is not stored in the BCD data store but is used only |
335 | by PBCDEDIT. It is always generated when exporting, and importing will |
337 | by PBCDEDIT. It is always generated when exporting, and importing will |
336 | be refused when it exists and the version stored inside doesn't store |
338 | be refused when it exists and the version stored inside doesn't match |
337 | the JSON schema version of PBCDEDIT. This ensures that different and |
339 | the JSON schema version of PBCDEDIT. This ensures that different and |
338 | incompatible versions of PBCDEDIT will not read and misinterpret each |
340 | incompatible versions of PBCDEDIT will not read and misinterpret each |
339 | others data. |
341 | others data. |
340 | |
342 | |
341 | =head2 The object keys |
343 | =head2 The object keys |
… | |
… | |
350 | |
352 | |
351 | Some of these GUIDs are fixed well known GUIDs which PBCDEDIT will decode |
353 | Some of these GUIDs are fixed well known GUIDs which PBCDEDIT will decode |
352 | into human-readable strings such as C<{globalsettings}>, which is the same |
354 | into human-readable strings such as C<{globalsettings}>, which is the same |
353 | as C<{7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}>. |
355 | as C<{7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}>. |
354 | |
356 | |
355 | Each BCD, object has an associated type. For example, |
357 | Each BCD object has an associated type. For example, |
356 | C<application::osloader> for objects loading Windows via F<winload.exe>, |
358 | C<application::osloader> for objects loading Windows via F<winload.exe>, |
357 | C<application::bootsector> for real mode applications and so on. |
359 | C<application::bootsector> for real mode applications and so on. |
358 | |
360 | |
359 | The type of a object is stored in the pseudo BCD element C<type> (see next |
361 | The type of a object is stored in the pseudo BCD element C<type> (see next |
360 | section). |
362 | section). |
… | |
… | |
711 | |
713 | |
712 | Probably not yet implemented. Tell me of your needs... |
714 | Probably not yet implemented. Tell me of your needs... |
713 | |
715 | |
714 | =back |
716 | =back |
715 | |
717 | |
|
|
718 | =back |
|
|
719 | |
716 | =head4 Examples |
720 | =head4 Examples |
717 | |
721 | |
718 | This concludes the syntax overview for device elements, but probably |
722 | This concludes the syntax overview for device elements, but probably |
719 | leaves many questions open. I can't help with most of them, as I also have |
723 | leaves many questions open. I can't help with most of them, as I also have |
720 | many questions, but I can walk you through some actual examples using more |
724 | many questions, but I can walk you through some actual examples using more |
721 | complex aspects. |
725 | complex aspects. |
|
|
726 | |
|
|
727 | =over |
722 | |
728 | |
723 | =item C<< locate=<block=vhd,<block=file,<locate=<null>,path,\disk.vhdx>,\disk.vhdx>>,element,path >> |
729 | =item C<< locate=<block=vhd,<block=file,<locate=<null>,path,\disk.vhdx>,\disk.vhdx>>,element,path >> |
724 | |
730 | |
725 | Just like with C declarations, you best treat device descriptors as |
731 | Just like with C declarations, you best treat device descriptors as |
726 | instructions to find your device and work your way from the inside out: |
732 | instructions to find your device and work your way from the inside out: |
… | |
… | |
797 | |
803 | |
798 | I don't know what the purpose of the C<< <1> >> flag value is, but it |
804 | I don't know what the purpose of the C<< <1> >> flag value is, but it |
799 | seems to be always there on this kind of entry. |
805 | seems to be always there on this kind of entry. |
800 | |
806 | |
801 | If you have some good examples to add here, feel free to mail me. |
807 | If you have some good examples to add here, feel free to mail me. |
|
|
808 | |
|
|
809 | =back |
802 | |
810 | |
803 | |
811 | |
804 | =head1 EDITING BCD STORES |
812 | =head1 EDITING BCD STORES |
805 | |
813 | |
806 | The C<edit> and C<parse> subcommands allow you to read a BCD data store |
814 | The C<edit> and C<parse> subcommands allow you to read a BCD data store |
… | |
… | |
2565 | # command line parser |
2573 | # command line parser |
2566 | |
2574 | |
2567 | our %CMD = ( |
2575 | our %CMD = ( |
2568 | help => sub { |
2576 | help => sub { |
2569 | require Pod::Usage; |
2577 | require Pod::Usage; |
2570 | Pod::Usage::pod2usage (-verbose => 2); |
2578 | Pod::Usage::pod2usage (-verbose => 2, -quotes => "none", -noperldoc => 1); |
2571 | }, |
2579 | }, |
2572 | |
2580 | |
2573 | objects => sub { |
2581 | objects => sub { |
2574 | my %rbcd_types = reverse %bcd_types; |
2582 | my %rbcd_types = reverse %bcd_types; |
2575 | $_ = sprintf "%08x", $_ for values %rbcd_types; |
2583 | $_ = sprintf "%08x", $_ for values %rbcd_types; |