On Tue, Jan 22, 2008 at 02:14:53PM +0100, Fabian Greffrath wrote: > > We should stay with the '-t drive' option to print the GRUB drive. If no > further option is given, the next item on the command line is expected > to be a path - just like before. > Then, another option, e.g. '-o', should be introduced to specify the > origin of the said item if it is different from "path", e.g.: > > $ grub-probe > Usage: grub-probe [OPTION]... [ORIGIN] > > Probe device information for a given path or, if the -o option is given, > for a given GRUB drive or system device. > > -m, --device-map=FILE use FILE as the device map > [default=/boot/grub/device.map] > -t, --target=(fs|drive|device|partmap|abstraction) > print filesystem module, GRUB drive, system > device, partition map module or abstraction module [default=fs] > -o, --origin=(path|drive|device) > expect to read from path, GRUB drive or > system device [default=path] > -h, --help display this message and exit > -V, --version print version information and exit > -v, --verbose print verbose messages > > This way it will be possible to even convert back and forth between GRUB > drives and system devices. > The conversion that is needed to translate os-prober output to GRUB menu > input will read: > GRUB_DEVICE="`grub-probe -t drive -o device ${PARTITION}`". > > Hope you like this proposal (of course, "origin" is subject to change; > it's just the first word that came to my mind that might be fitting)!
This implies that we'll have to support 6 different kinds of conversions between path, drive and device, some of which might even be impossible. Besides, perhaps it'd be cleaner to split this conversion to a separate tool, so that grub-probe only operates on devices, and the other tool converts paths to devices (but NOT necessarily devices to paths!). What does everyone think about this? -- Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel