aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_flask.c
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-06 05:03:32 -0800
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-06 05:03:32 -0800
commitde9eedb0d2fec5003e528c8d8b0f772a587c6049 (patch)
treeb3d9016db22e79d1df824a6318abbb4e819cd7b1 /tools/libxc/xc_flask.c
parent52ff92ec89ea79108bf3347b19eb5d35fac9d2e1 (diff)
downloadxen-de9eedb0d2fec5003e528c8d8b0f772a587c6049.tar.gz
xen-de9eedb0d2fec5003e528c8d8b0f772a587c6049.tar.bz2
xen-de9eedb0d2fec5003e528c8d8b0f772a587c6049.zip
tools/flask: remove libflask
This library has been deprecated since July 2010; remove the in-tree users and library. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/libxc/xc_flask.c')
-rw-r--r--tools/libxc/xc_flask.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/tools/libxc/xc_flask.c b/tools/libxc/xc_flask.c
index 27794a82d5..d268098516 100644
--- a/tools/libxc/xc_flask.c
+++ b/tools/libxc/xc_flask.c
@@ -151,6 +151,65 @@ int xc_flask_setenforce(xc_interface *xc_handle, int mode)
return 0;
}
+int xc_flask_getbool_byid(xc_interface *xc_handle, int id, char *name, uint32_t size, int *curr, int *pend)
+{
+ flask_op_t op;
+ char buf[255];
+ int rv;
+
+ op.cmd = FLASK_GETBOOL2;
+ op.buf = buf;
+ op.size = 255;
+
+ snprintf(buf, sizeof buf, "%i", id);
+
+ rv = xc_flask_op(xc_handle, &op);
+
+ if ( rv )
+ return rv;
+
+ sscanf(buf, "%i %i %s", curr, pend, name);
+
+ return rv;
+}
+
+int xc_flask_getbool_byname(xc_interface *xc_handle, char *name, int *curr, int *pend)
+{
+ flask_op_t op;
+ char buf[255];
+ int rv;
+
+ op.cmd = FLASK_GETBOOL_NAMED;
+ op.buf = buf;
+ op.size = 255;
+
+ strncpy(buf, name, op.size);
+
+ rv = xc_flask_op(xc_handle, &op);
+
+ if ( rv )
+ return rv;
+
+ sscanf(buf, "%i %i", curr, pend);
+
+ return rv;
+}
+
+int xc_flask_setbool(xc_interface *xc_handle, char *name, int value, int commit)
+{
+ flask_op_t op;
+ char buf[255];
+ int size = 255;
+
+ op.cmd = FLASK_SETBOOL_NAMED;
+ op.buf = buf;
+ op.size = size;
+
+ snprintf(buf, size, "%s %i %i", name, value, commit);
+
+ return xc_flask_op(xc_handle, &op);
+}
+
static int xc_flask_add(xc_interface *xc_handle, char *cat, char *arg, char *scontext)
{
char buf[512];