summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-08-15 15:41:05 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-08-30 22:05:57 +0100
commit7966e8f6323695130b70fcde493bda505575971c (patch)
treef7cbf72c0235db8e8e65456b4a08184ed508cb70
parent9a176c0276c17bb172edb59551fc408232dd19fd (diff)
downloadlibguestfs-7966e8f6323695130b70fcde493bda505575971c.tar.gz
libguestfs-7966e8f6323695130b70fcde493bda505575971c.tar.xz
libguestfs-7966e8f6323695130b70fcde493bda505575971c.zip
lib: Add 'g->unique' to handle, for making unique IDs.
(cherry picked from commit 22607a97cdf115caabf05c3dc87c5f154a2e914c)
-rw-r--r--src/guestfs-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index e47d9737..d76eac1a 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -223,6 +223,12 @@ struct guestfs_h
* matter for this case because we only care if it is != 0.
*/
int user_cancel;
+
+ /* Used to generate unique numbers, eg for temp files. To use this,
+ * '++g->unique'. Note these are only unique per-handle, not
+ * globally unique.
+ */
+ int unique;
};
/* Per-filesystem data stored for inspect_os. */