# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1217613773 25200
# Node ID ca56c48f31038a8dc718e09ef8bf68a8917408fa
# Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458
(#2) When saving out the infostore, clear any previous data.
Updates:
-Replace additional open call with ftruncate()
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 9f2f9b117797 -r ca56c48f3103 libxkutil/infostore.c
--- a/libxkutil/infostore.c Mon Aug 04 11:57:27 2008 -0700
+++ b/libxkutil/infostore.c Fri Aug 01 11:02:53 2008 -0700
@@ -150,6 +150,9 @@
long size = 0;
lseek(ctx->fd, 0, SEEK_SET);
+
+ if (ftruncate(ctx->fd, 0) != 0)
+ CU_DEBUG("Unable to truncate infostore");
save = xmlSaveToFd(ctx->fd, NULL, 0);
if (save == NULL) {
Show replies by date