aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-12-10 11:39:01 +0000
committerKeir Fraser <keir@xen.org>2010-12-10 11:39:01 +0000
commitc0ba4702f351003bd1e7bd695751bcab0d8f71f2 (patch)
treebc9399ca9c0a9dd3621ceac5213ad350d7787f67
parent5eca715050914fa452e4a9defa45ece6b316d6f4 (diff)
downloadxen-c0ba4702f351003bd1e7bd695751bcab0d8f71f2.tar.gz
xen-c0ba4702f351003bd1e7bd695751bcab0d8f71f2.tar.bz2
xen-c0ba4702f351003bd1e7bd695751bcab0d8f71f2.zip
tmem: Use of 'new' clashes with C++ reserved namespace.
Rename to 'creat', which does not conflict. Signed-off-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 22481:0353037c6b95 xen-unstable date: Fri Dec 10 11:01:19 2010 +0000
-rw-r--r--tools/libxc/xc_tmem.c16
-rw-r--r--xen/common/tmem.c12
-rw-r--r--xen/include/public/tmem.h2
-rw-r--r--xen/include/xen/tmem_xen.h6
4 files changed, 18 insertions, 18 deletions
diff --git a/tools/libxc/xc_tmem.c b/tools/libxc/xc_tmem.c
index 0331032147..8bfc25e42e 100644
--- a/tools/libxc/xc_tmem.c
+++ b/tools/libxc/xc_tmem.c
@@ -164,10 +164,10 @@ int xc_tmem_auth(int xc,
op.cmd = TMEM_AUTH;
op.pool_id = 0;
- op.u.new.arg1 = cli_id;
- op.u.new.flags = arg1;
- if ( xc_tmem_uuid_parse(uuid_str, &op.u.new.uuid[0],
- &op.u.new.uuid[1]) < 0 )
+ op.u.creat.arg1 = cli_id;
+ op.u.creat.flags = arg1;
+ if ( xc_tmem_uuid_parse(uuid_str, &op.u.creat.uuid[0],
+ &op.u.creat.uuid[1]) < 0 )
{
PERROR("Can't parse uuid, use xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
return -1;
@@ -356,10 +356,10 @@ static int xc_tmem_restore_new_pool(
op.cmd = TMEM_RESTORE_NEW;
op.pool_id = pool_id;
- op.u.new.arg1 = cli_id;
- op.u.new.flags = flags;
- op.u.new.uuid[0] = uuid_lo;
- op.u.new.uuid[1] = uuid_hi;
+ op.u.creat.arg1 = cli_id;
+ op.u.creat.flags = flags;
+ op.u.creat.uuid[0] = uuid_lo;
+ op.u.creat.uuid[1] = uuid_hi;
return do_tmem_op(xc, &op);
}
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 71c6b3abae..8a5272bf9d 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2669,14 +2669,14 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
} else if ( op.cmd == TMEM_AUTH ) {
tmem_write_lock(&tmem_rwlock);
tmem_write_lock_set = 1;
- rc = tmemc_shared_pool_auth(op.u.new.arg1,op.u.new.uuid[0],
- op.u.new.uuid[1],op.u.new.flags);
+ rc = tmemc_shared_pool_auth(op.u.creat.arg1,op.u.creat.uuid[0],
+ op.u.creat.uuid[1],op.u.creat.flags);
goto out;
} else if ( op.cmd == TMEM_RESTORE_NEW ) {
tmem_write_lock(&tmem_rwlock);
tmem_write_lock_set = 1;
- rc = do_tmem_new_pool(op.u.new.arg1, op.pool_id, op.u.new.flags,
- op.u.new.uuid[0], op.u.new.uuid[1]);
+ rc = do_tmem_new_pool(op.u.creat.arg1, op.pool_id, op.u.creat.flags,
+ op.u.creat.uuid[0], op.u.creat.uuid[1]);
goto out;
}
@@ -2722,8 +2722,8 @@ EXPORT long do_tmem_op(tmem_cli_op_t uops)
switch ( op.cmd )
{
case TMEM_NEW_POOL:
- rc = do_tmem_new_pool(CLI_ID_NULL, 0, op.u.new.flags,
- op.u.new.uuid[0], op.u.new.uuid[1]);
+ rc = do_tmem_new_pool(CLI_ID_NULL, 0, op.u.creat.flags,
+ op.u.creat.uuid[0], op.u.creat.uuid[1]);
break;
case TMEM_NEW_PAGE:
tmem_ensure_avail_pages();
diff --git a/xen/include/public/tmem.h b/xen/include/public/tmem.h
index d1889c7bae..74bd1c65a0 100644
--- a/xen/include/public/tmem.h
+++ b/xen/include/public/tmem.h
@@ -105,7 +105,7 @@ struct tmem_op {
uint64_t uuid[2];
uint32_t flags;
uint32_t arg1;
- } new; /* for cmd == TMEM_NEW_POOL, TMEM_AUTH, TMEM_RESTORE_NEW */
+ } creat; /* for cmd == TMEM_NEW_POOL, TMEM_AUTH, TMEM_RESTORE_NEW */
struct {
uint32_t subop;
uint32_t cli_id;
diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h
index f409cbf1a9..c126088bca 100644
--- a/xen/include/xen/tmem_xen.h
+++ b/xen/include/xen/tmem_xen.h
@@ -469,10 +469,10 @@ static inline int tmh_get_tmemop_from_client(tmem_op_t *op, tmem_cli_op_t uops)
return rc;
switch ( cop.cmd )
{
- case TMEM_NEW_POOL: u = XLAT_tmem_op_u_new; break;
+ case TMEM_NEW_POOL: u = XLAT_tmem_op_u_creat; break;
case TMEM_CONTROL: u = XLAT_tmem_op_u_ctrl; break;
- case TMEM_AUTH: u = XLAT_tmem_op_u_new; break;
- case TMEM_RESTORE_NEW:u = XLAT_tmem_op_u_new; break;
+ case TMEM_AUTH: u = XLAT_tmem_op_u_creat; break;
+ case TMEM_RESTORE_NEW:u = XLAT_tmem_op_u_creat; break;
default: u = XLAT_tmem_op_u_gen ; break;
}
#define XLAT_tmem_op_HNDL_u_ctrl_buf(_d_, _s_) \