Bug#462218: Bug#461442: detection of other OSes in update-grub
Fabian Greffrath
greffrath at leat.rub.de
Mon Feb 4 08:43:58 UTC 2008
Hi there,
Robert Millan schrieb:
> If you want the former, feel free to send a patch to grub-devel. For the
> latter, look at my questions and send some feedback.
please find attached a patch that adds a new parameter '--device, -d' to
grub-probe. If this parameter is set, grub-probe expects the given
argument to be a block device. All of the '--target' parameters work
with this option as well. If the '--device' parameter is not set,
grub-probe will work as before.
Furthermore I had to add a new public function to getroot.c that returns
the given argument if it is a block device and returns NULL else. This
was necessary, because else you could force grub-probe to print 'foobar'
if run as 'grub-probe --target=device --device foobar'.
I consider this (i.e. adding a new option to grub-probe) a better
solution than writing a separate tool only for this purpose.
The second file that I attached is the 30_os-prober script making use of
the new grub-probe feature. Please note that the 'case ... in' part is
only run if 'grub-probe --device' actually returns something usefull.
I am looking forward to your feedback.
Cheers,
Fabian
--
Dipl.-Phys. Fabian Greffrath
Ruhr-Universität Bochum
Lehrstuhl für Energieanlagen und Energieprozesstechnik (LEAT)
Universitätsstr. 150, IB 3/134
D-44780 Bochum
Telefon: +49 (0)234 / 32-26334
Fax: +49 (0)234 / 32-14227
E-Mail: greffrath at leat.ruhr-uni-bochum.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grub-probe.diff
Type: text/x-patch
Size: 3302 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080204/8b2e6880/attachment.bin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 30_os-prober
Url: http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080204/8b2e6880/attachment.txt
More information about the Pkg-grub-devel
mailing list