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-15 17:49:48 +0100
commit22607a97cdf115caabf05c3dc87c5f154a2e914c (patch)
tree32f1543eb6802ccbd042332102085b4fc9abbee9
parent8fd6f1bebef11d1c4eb77ac2b7d95fd5a7e82be9 (diff)
downloadlibguestfs-22607a97cdf115caabf05c3dc87c5f154a2e914c.tar.gz
libguestfs-22607a97cdf115caabf05c3dc87c5f154a2e914c.tar.xz
libguestfs-22607a97cdf115caabf05c3dc87c5f154a2e914c.zip
lib: Add 'g->unique' to handle, for making unique IDs.
-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 dc6f01a2..a279524b 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -248,6 +248,12 @@ struct guestfs_h
/* Used by bindtests. */
FILE *test_fp;
+ /* 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;
+
/*** Protocol. ***/
int fd[2]; /* Stdin/stdout of qemu. */
int sock; /* Daemon communications socket. */