summaryrefslogtreecommitdiffstats
path: root/src/guestfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/guestfs.c')
-rw-r--r--src/guestfs.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/guestfs.c b/src/guestfs.c
index 002418a4..f7ad9674 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -144,6 +144,9 @@ guestfs_create (void)
*/
g->msg_next_serial = 0x00123400;
+ /* Default is uniprocessor appliance. */
+ g->smp = 1;
+
/* Link the handles onto a global list. */
gl_lock_lock (handles_lock);
g->next = handles;
@@ -814,6 +817,24 @@ guestfs__get_pgroup (guestfs_h *g)
return g->pgroup;
}
+int
+guestfs__set_smp (guestfs_h *g, int v)
+{
+ if (v >= 1) {
+ g->smp = v;
+ return 0;
+ } else {
+ error (g, "invalid smp parameter: %d", v);
+ return -1;
+ }
+}
+
+int
+guestfs__get_smp (guestfs_h *g)
+{
+ return g->smp;
+}
+
/* Note the private data area is allocated lazily, since the vast
* majority of callers will never use it. This means g->pda is
* likely to be NULL.