summaryrefslogtreecommitdiffstats
path: root/src/appliance.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-10-18 14:20:54 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-10-18 22:11:49 +0100
commitfa209341f834d1ab00e0d9fa767c8221506285e4 (patch)
treeb255fd9538e0f3b10e6c807006393a0afae1b5b3 /src/appliance.c
parent2e90f4312928f332f8997b52be3fe54f20920242 (diff)
downloadlibguestfs-fa209341f834d1ab00e0d9fa767c8221506285e4.tar.gz
libguestfs-fa209341f834d1ab00e0d9fa767c8221506285e4.tar.xz
libguestfs-fa209341f834d1ab00e0d9fa767c8221506285e4.zip
lib: Change guestfs___remove_tmpdir function to use command mini-library.
Diffstat (limited to 'src/appliance.c')
-rw-r--r--src/appliance.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/appliance.c b/src/appliance.c
index ecbb7afe..9db42cb4 100644
--- a/src/appliance.c
+++ b/src/appliance.c
@@ -500,7 +500,7 @@ build_supermin_appliance (guestfs_h *g,
int r = run_supermin_helper (g, supermin_path, tmpcd, len);
if (r == -1) {
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
@@ -519,7 +519,7 @@ build_supermin_appliance (guestfs_h *g,
int fd = open (filename, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0755);
if (fd == -1) {
perrorf (g, "open: %s", filename);
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
struct flock fl;
@@ -533,7 +533,7 @@ build_supermin_appliance (guestfs_h *g,
goto again;
perrorf (g, "fcntl: F_SETLKW: %s", filename);
close (fd);
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
@@ -545,7 +545,7 @@ build_supermin_appliance (guestfs_h *g,
if (ftruncate (fd, clen) == -1) {
perrorf (g, "ftruncate: %s", filename);
close (fd);
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
@@ -553,13 +553,13 @@ build_supermin_appliance (guestfs_h *g,
if (rr == -1) {
perrorf (g, "write: %s", filename);
close (fd);
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
if ((size_t) rr != clen) {
error (g, "partial write: %s", filename);
close (fd);
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
@@ -569,7 +569,7 @@ build_supermin_appliance (guestfs_h *g,
if (rename (filename, filename2) == -1) {
perrorf (g, "rename: %s %s", filename, filename2);
close (fd);
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
@@ -579,7 +579,7 @@ build_supermin_appliance (guestfs_h *g,
if (rename (filename, filename2) == -1) {
perrorf (g, "rename: %s %s", filename, filename2);
close (fd);
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
@@ -589,11 +589,11 @@ build_supermin_appliance (guestfs_h *g,
if (rename (filename, filename2) == -1) {
perrorf (g, "rename: %s %s", filename, filename2);
close (fd);
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
return -1;
}
- guestfs___remove_tmpdir (tmpcd);
+ guestfs___remove_tmpdir (g, tmpcd);
/* Now finish off by linking to the cached appliance and returning it. */
if (hard_link_to_cached_appliance (g, cachedir,