Hi Vladimir, On Mon, May 13, 2019 at 10:11 PM Vladimir 'phcoder' Serbinenko <phco...@gmail.com> wrote: > > Ideally the option shouldn't be specific to GPT as other partmaps also have > stable IDs. I think it's better not to have short option at all >
Ok, I have some questions below. > On Mon, 13 May 2019, 20:33 Jacob Kroon, <jacob.kr...@gmail.com> wrote: >> >> Linux supports root=PARTUUID=<partuuid> boot argument, so add >> support for probing it. Compared to the fs UUID, the partition >> UUID does not change when reformatting a partition. >> >> Signed-off-by: Jacob Kroon <jacob.kr...@gmail.com> >> --- >> docs/grub.texi | 2 +- >> grub-core/commands/probe.c | 34 ++++++++++++++++++++++++++++++++++ >> 2 files changed, 35 insertions(+), 1 deletion(-) >> >> Changes since v4: >> * Do endianess byte-swapping on the fly when formatting string >> >> diff --git a/docs/grub.texi b/docs/grub.texi >> index 308b25074..d85818744 100644 >> --- a/docs/grub.texi >> +++ b/docs/grub.texi >> @@ -4771,7 +4771,7 @@ a rest. >> @node probe >> @subsection probe >> >> -@deffn Command probe [@option{--set} var] >> @option{--driver}|@option{--partmap}|@option{--fs}|@option{--fs-uuid}|@option{--label} >> device >> +@deffn Command probe [@option{--set} var] >> @option{--driver}|@option{--partmap}|@option{--fs}|@option{--fs-uuid}|@option{--label}|@option{--part-uuid} >> device >> Retrieve device information. If option @option{--set} is given, assign >> result >> to variable @var{var}, otherwise print information on the screen. >> @end deffn >> diff --git a/grub-core/commands/probe.c b/grub-core/commands/probe.c >> index 95d272287..b26cbe2cc 100644 >> --- a/grub-core/commands/probe.c >> +++ b/grub-core/commands/probe.c >> @@ -24,6 +24,7 @@ >> #include <grub/device.h> >> #include <grub/disk.h> >> #include <grub/partition.h> >> +#include <grub/gpt_partition.h> >> #include <grub/net.h> >> #include <grub/fs.h> >> #include <grub/file.h> >> @@ -45,6 +46,7 @@ static const struct grub_arg_option options[] = >> {"fs", 'f', 0, N_("Determine filesystem type."), 0, 0}, >> {"fs-uuid", 'u', 0, N_("Determine filesystem UUID."), 0, >> 0}, >> {"label", 'l', 0, N_("Determine filesystem label."), 0, 0}, >> + {"part-uuid", 'g', 0, N_("Determine GPT partition UUID."), 0, 0}, Is "part-uuid" ok ? I guess I should remove "GPT" from the help text ? I've seen both 0 and -1 being passed as short option, do they both mean "no short option", or is there a preference which to use in this case ? /Jacob _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel