qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 05/10] qemu-ga: build_fs_mount_list(): take an E


From: mdroth
Subject: Re: [Qemu-devel] [PATCH 05/10] qemu-ga: build_fs_mount_list(): take an Error argument
Date: Wed, 28 Nov 2012 13:34:09 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Nov 27, 2012 at 11:01:59AM -0200, Luiz Capitulino wrote:
> Signed-off-by: Luiz Capitulino <address@hidden>
> ---
>  qga/commands-posix.c | 30 ++++++++++++++++--------------
>  1 file changed, 16 insertions(+), 14 deletions(-)
> 
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index b3a3f26..59bb32d 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -371,7 +371,7 @@ static void free_fs_mount_list(FsMountList *mounts)
>  /*
>   * Walk the mount table and build a list of local file systems
>   */
> -static int build_fs_mount_list(FsMountList *mounts)
> +static void build_fs_mount_list(FsMountList *mounts, Error **err)
>  {
>      struct mntent *ment;
>      FsMount *mount;
> @@ -380,8 +380,8 @@ static int build_fs_mount_list(FsMountList *mounts)
> 
>      fp = setmntent(mtab, "r");
>      if (!fp) {
> -        g_warning("fsfreeze: unable to read mtab");
> -        return -1;
> +        error_setg_errno(err, errno, "failed to open mtab file: '%s'", mtab);
> +        return;

I don't see anything about errno getting set in the glibc documentation. Can
we confirm? Otherwise error_setg() is probably sufficient here.

<snip>

> 
> -- 
> 1.8.0
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]