1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

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>
This commit is contained in:
Amitay Isaacs 2015-10-28 19:37:17 +11:00 committed by Martin Schwenke
parent 417077c8a7
commit c4e9d616ae
8 changed files with 18 additions and 18 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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];
};
/**

View File

@ -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:

View File

@ -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",

View File

@ -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);

View File

@ -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;

View File

@ -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);