mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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 2b7f7810ed.
This commit is contained in:
@@ -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, ' ');
|
||||
|
||||
Reference in New Issue
Block a user