2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>

* include/grub/util/getroot.h (grub_util_check_block_device): Export new
        function.
        * util/getroot.c (grub_util_check_block_device): New function that
        returns the given argument if it is a block device and returns NULL else.
        * util/grub-probe.c (argument_is_device): New variable.
        (probe): Promote device_name from a variable to an argument. Receive
        device_name from grub_util_check_block_device() if path is NULL and from
        grub_guess_root_device() else. Do not free() device_name anymore.
        (options): Introduce new parameter '-d, --device'.
        (main): Add description of the new parameter to the help screen.
        Rename path variable to argument. Set argument_is_device if the '-d'
        option is given. Pass argument to probe() depending on
        argument_is_device.
This commit is contained in:
robertmh 2008-02-28 10:11:06 +00:00
parent 0d16e571f1
commit 79ca2d78d4
4 changed files with 58 additions and 12 deletions

View file

@ -29,5 +29,6 @@ char *grub_guess_root_device (const char *dir);
char *grub_get_prefix (const char *dir);
int grub_util_get_dev_abstraction (const char *os_dev);
char *grub_util_get_grub_dev (const char *os_dev);
char *grub_util_check_block_device (const char *blk_dev);
#endif /* ! GRUB_UTIL_GETROOT_HEADER */