[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] inspect: Fix bogus warning for partitions without /boot.ini



On Fri, Jun 07, 2013 at 12:18:51PM +0100, Matthew Booth wrote:
> Fix a bogus warning introduced by
> 5abb196de869cd27a6fa2377d79b9a267120f48e. If a non-windows partition
> hasn't been detected as something else and falls through to windows
> detection, inspection would display a bogus warning about missing
> /boot.ini.
> ---
>  src/inspect-fs-windows.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c
> index 4eea6a3..c67f164 100644
> --- a/src/inspect-fs-windows.c
> +++ b/src/inspect-fs-windows.c
> @@ -154,7 +154,7 @@ guestfs___get_windows_systemroot (guestfs_h *g)
>     * systemroot locations */
>    CLEANUP_FREE char *boot_ini_path =
>      guestfs___case_sensitive_path_silently (g, "/boot.ini");
> -  if (boot_ini_path) {
> +  if (boot_ini_path && guestfs_is_file (g, boot_ini_path)) {
>      CLEANUP_FREE_STRING_LIST char **boot_ini =
>        guestfs_read_lines (g, boot_ini_path);
>      if (!boot_ini) {

Thanks.  I pushed it, but I changed the test to guestfs_is_file > 0.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]