summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2015-10-28 19:37:17 +1100
committerMartin Schwenke <martins@samba.org>2015-11-04 00:47:15 +0100
commitc4e9d616ae4c87aecbd98a3c4387742bbf44a2e7 (patch)
treef219a5afdc894a25a984fc7c756d542c79bc9f72 /ctdb
parent417077c8a722b628d4db17f0f1799c70639d5d17 (diff)
downloadsamba-c4e9d616ae4c87aecbd98a3c4387742bbf44a2e7.tar.gz
ctdb-daemon: Rename struct ctdb_control_iface_info to ctdb_iface
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/client/ctdb_client.c6
-rw-r--r--ctdb/include/ctdb_client.h2
-rw-r--r--ctdb/include/ctdb_protocol.h6
-rw-r--r--ctdb/server/ctdb_control.c2
-rw-r--r--ctdb/server/ctdb_recoverd.c2
-rw-r--r--ctdb/server/ctdb_takeover.c12
-rw-r--r--ctdb/tests/src/ctdb_test_stubs.c4
-rw-r--r--ctdb/tools/ctdb.c2
8 files changed, 18 insertions, 18 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 7fbb3471cbe..056fba6dd68 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -2844,7 +2844,7 @@ int ctdb_ctrl_get_public_ip_info(struct ctdb_context *ctdb,
}
info = (struct ctdb_control_public_ip_info *)outdata.dptr;
- len += info->num*sizeof(struct ctdb_control_iface_info);
+ len += info->num*sizeof(struct ctdb_iface);
if (len > outdata.dsize) {
DEBUG(DEBUG_ERR,(__location__ " ctdb_control for get public ip info "
@@ -2907,7 +2907,7 @@ int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
}
ifaces = (struct ctdb_control_get_ifaces *)outdata.dptr;
- len += ifaces->num*sizeof(struct ctdb_control_iface_info);
+ len += ifaces->num*sizeof(struct ctdb_iface);
if (len > outdata.dsize) {
DEBUG(DEBUG_ERR,(__location__ " ctdb_control for get ifaces "
@@ -2940,7 +2940,7 @@ int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
int ctdb_ctrl_set_iface_link(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
- const struct ctdb_control_iface_info *info)
+ const struct ctdb_iface *info)
{
int ret;
TDB_DATA indata;
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h
index f04e24e72a4..5401f82c58e 100644
--- a/ctdb/include/ctdb_client.h
+++ b/ctdb/include/ctdb_client.h
@@ -388,7 +388,7 @@ int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
int ctdb_ctrl_set_iface_link(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
- const struct ctdb_control_iface_info *info);
+ const struct ctdb_iface *info);
int ctdb_ctrl_modflags(struct ctdb_context *ctdb,
struct timeval timeout,
diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h
index a850e5c6850..90a9fed98fd 100644
--- a/ctdb/include/ctdb_protocol.h
+++ b/ctdb/include/ctdb_protocol.h
@@ -988,7 +988,7 @@ struct ctdb_transdb {
#define CTDB_PUBLIC_IP_FLAGS_ONLY_AVAILABLE 0x00010000
-struct ctdb_control_iface_info {
+struct ctdb_iface {
char name[CTDB_IFACE_SIZE+2];
uint16_t link_state;
uint32_t references;
@@ -998,12 +998,12 @@ struct ctdb_control_public_ip_info {
struct ctdb_public_ip ip;
uint32_t active_idx;
uint32_t num;
- struct ctdb_control_iface_info ifaces[1];
+ struct ctdb_iface ifaces[1];
};
struct ctdb_control_get_ifaces {
uint32_t num;
- struct ctdb_control_iface_info ifaces[1];
+ struct ctdb_iface ifaces[1];
};
/**
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index 3b0c24794fc..7122676559e 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -664,7 +664,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
return ctdb_control_get_ifaces(ctdb, c, outdata);
case CTDB_CONTROL_SET_IFACE_LINK_STATE:
- CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_control_iface_info));
+ CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_iface));
return ctdb_control_set_iface_link(ctdb, c, indata);
case CTDB_CONTROL_GET_STAT_HISTORY:
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index fcfc04ec15b..e178b8bc0a6 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -3286,7 +3286,7 @@ static bool interfaces_have_changed(struct ctdb_context *ctdb,
/* See if interface names or link states have changed */
int i;
for (i = 0; i < rec->ifaces->num; i++) {
- struct ctdb_control_iface_info * iface = &rec->ifaces->ifaces[i];
+ struct ctdb_iface * iface = &rec->ifaces->ifaces[i];
if (strcmp(iface->name, ifaces->ifaces[i].name) != 0) {
DEBUG(DEBUG_NOTICE,
("Interface in slot %d changed: %s => %s\n",
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index 7f72116f2d0..79bd8740a74 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -3273,7 +3273,7 @@ int32_t ctdb_control_get_public_ip_info(struct ctdb_context *ctdb,
}
len = offsetof(struct ctdb_control_public_ip_info, ifaces) +
- num*sizeof(struct ctdb_control_iface_info);
+ num*sizeof(struct ctdb_iface);
info = talloc_zero_size(outdata, len);
CTDB_NO_MEMORY(ctdb, info);
@@ -3299,7 +3299,7 @@ int32_t ctdb_control_get_public_ip_info(struct ctdb_context *ctdb,
}
info->num = i;
len = offsetof(struct ctdb_control_public_ip_info, ifaces) +
- i*sizeof(struct ctdb_control_iface_info);
+ i*sizeof(struct ctdb_iface);
outdata->dsize = len;
outdata->dptr = (uint8_t *)info;
@@ -3322,7 +3322,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
}
len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
- num*sizeof(struct ctdb_control_iface_info);
+ num*sizeof(struct ctdb_iface);
ifaces = talloc_zero_size(outdata, len);
CTDB_NO_MEMORY(ctdb, ifaces);
@@ -3335,7 +3335,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
}
ifaces->num = i;
len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
- i*sizeof(struct ctdb_control_iface_info);
+ i*sizeof(struct ctdb_iface);
outdata->dsize = len;
outdata->dptr = (uint8_t *)ifaces;
@@ -3347,11 +3347,11 @@ int32_t ctdb_control_set_iface_link(struct ctdb_context *ctdb,
struct ctdb_req_control_old *c,
TDB_DATA indata)
{
- struct ctdb_control_iface_info *info;
+ struct ctdb_iface *info;
struct ctdb_interface *iface;
bool link_up = false;
- info = (struct ctdb_control_iface_info *)indata.dptr;
+ info = (struct ctdb_iface *)indata.dptr;
if (info->name[CTDB_IFACE_SIZE] != '\0') {
int len = strnlen(info->name, CTDB_IFACE_SIZE);
diff --git a/ctdb/tests/src/ctdb_test_stubs.c b/ctdb/tests/src/ctdb_test_stubs.c
index b5c998339de..ff01f88483f 100644
--- a/ctdb/tests/src/ctdb_test_stubs.c
+++ b/ctdb/tests/src/ctdb_test_stubs.c
@@ -556,7 +556,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
}
len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
- num*sizeof(struct ctdb_control_iface_info);
+ num*sizeof(struct ctdb_iface);
ifaces = talloc_zero_size(outdata, len);
CTDB_NO_MEMORY(ctdb, ifaces);
@@ -574,7 +574,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
}
ifaces->num = i;
len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
- i*sizeof(struct ctdb_control_iface_info);
+ i*sizeof(struct ctdb_iface);
outdata->dsize = len;
outdata->dptr = (uint8_t *)ifaces;
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 9788d29d886..9e9c2a81c2a 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -3182,7 +3182,7 @@ static int control_setifacelink(struct ctdb_context *ctdb, int argc, const char
{
int ret;
TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
- struct ctdb_control_iface_info info;
+ struct ctdb_iface info;
ZERO_STRUCT(info);