[Pkg-libvirt-commits] [libguestfs] 234/384: btrfs: Proper error when output of 'btrfs qgroup show' command cannot be parsed.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:57:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 8fd42310514166d287b9149bc8747e6a058433bf
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Feb 3 08:53:43 2015 +0000

    btrfs: Proper error when output of 'btrfs qgroup show' command cannot be parsed.
    
    sscanf doesn't set errno in these cases so it's wrong to call perror
    here.
    
    This fixes commit 2b7f7810ed801edf811c5ba43fefe6cf350def7f.
---
 daemon/btrfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 796eaff..5cab52a 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -1275,7 +1275,7 @@ do_btrfs_qgroup_show (const char *path)
     if (sscanf (line, "%" SCNu64 "/%" SCNu64 " %" SCNu64 " %" SCNu64,
                 &dummy1, &dummy2, &this->btrfsqgroup_rfer,
                 &this->btrfsqgroup_excl) != 4) {
-      reply_with_perror ("sscanf");
+      reply_with_error ("cannot parse output of qgroup show command: %s", line);
       goto error;
     }
     p = strchr(line, ' ');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list