summaryrefslogtreecommitdiffstats
path: root/src/dbdump.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-08-23 18:56:12 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-08-23 18:56:12 +0100
commit631faad97171d7c1238b2e413c663cf61476f440 (patch)
tree294ffff6783308317aa1422e594068654fe41219 /src/dbdump.c
parentf15961911316460f7d45342d63c2d784a483f0d1 (diff)
downloadlibguestfs-631faad97171d7c1238b2e413c663cf61476f440.tar.gz
libguestfs-631faad97171d7c1238b2e413c663cf61476f440.tar.xz
libguestfs-631faad97171d7c1238b2e413c663cf61476f440.zip
pclose: Fix other places where we only tested pclose == -1.
pclose can return > 0 when the status of the command was non-zero.
Diffstat (limited to 'src/dbdump.c')
-rw-r--r--src/dbdump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbdump.c b/src/dbdump.c
index caf63768..45c67c62 100644
--- a/src/dbdump.c
+++ b/src/dbdump.c
@@ -129,7 +129,7 @@ guestfs___read_db_dump (guestfs_h *g,
}
/* Catch errors from the db_dump command. */
- if (pclose (pp) == -1) {
+ if (pclose (pp) != 0) {
perrorf (g, "pclose: %s", cmd);
goto out;
}