summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-17 01:48:40 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-17 01:48:40 +0200
commit634af5665fda8776d22624d947c8de830e30a874 (patch)
tree731dc8203b1399998306b72bdd7352a4dc85eac7 /src
parentd12b8cad40aa78fc948362340204c3fde778082d (diff)
sd-login: always use "indices" as plural of "index"
So far both "indexes" and "indices" was used. Let's clean this up, and stick to indices, since it appears to be used more frequently.
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/libsystemd.sym.m42
-rw-r--r--src/libsystemd/sd-login/sd-login.c8
-rw-r--r--src/nss-mymachines/nss-mymachines.c12
-rw-r--r--src/systemd/sd-login.h4
4 files changed, 13 insertions, 13 deletions
diff --git a/src/libsystemd/libsystemd.sym.m4 b/src/libsystemd/libsystemd.sym.m4
index 48572cc0b3..1c24cad105 100644
--- a/src/libsystemd/libsystemd.sym.m4
+++ b/src/libsystemd/libsystemd.sym.m4
@@ -150,7 +150,7 @@ global:
LIBSYSTEMD_216 {
global:
- sd_machine_get_ifindexes;
+ sd_machine_get_ifindices;
} LIBSYSTEMD_214;
m4_ifdef(`ENABLE_KDBUS',
diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c
index 83d6449241..38ff944892 100644
--- a/src/libsystemd/sd-login/sd-login.c
+++ b/src/libsystemd/sd-login/sd-login.c
@@ -786,7 +786,7 @@ _public_ int sd_machine_get_class(const char *machine, char **class) {
return 0;
}
-_public_ int sd_machine_get_ifindexes(const char *machine, int **ifindexes) {
+_public_ int sd_machine_get_ifindices(const char *machine, int **ifindices) {
_cleanup_free_ char *netif = NULL;
size_t l, allocated = 0, nr = 0;
char *w, *state;
@@ -795,14 +795,14 @@ _public_ int sd_machine_get_ifindexes(const char *machine, int **ifindexes) {
int r;
assert_return(machine_name_is_valid(machine), -EINVAL);
- assert_return(ifindexes, -EINVAL);
+ assert_return(ifindices, -EINVAL);
p = strappenda("/run/systemd/machines/", machine);
r = parse_env_file(p, NEWLINE, "NETIF", &netif, NULL);
if (r < 0)
return r;
if (!netif) {
- *ifindexes = NULL;
+ *ifindices = NULL;
return 0;
}
@@ -825,7 +825,7 @@ _public_ int sd_machine_get_ifindexes(const char *machine, int **ifindexes) {
ni[nr++] = ifi;
}
- *ifindexes = ni;
+ *ifindices = ni;
return nr;
}
diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
index 5327499957..eb1d2b450b 100644
--- a/src/nss-mymachines/nss-mymachines.c
+++ b/src/nss-mymachines/nss-mymachines.c
@@ -80,12 +80,12 @@ enum nss_status _nss_mymachines_gethostbyname4_r(
struct gaih_addrtuple *r_tuple, *r_tuple_first = NULL;
_cleanup_bus_message_unref_ sd_bus_message* reply = NULL;
_cleanup_bus_unref_ sd_bus *bus = NULL;
- _cleanup_free_ int *ifindexes = NULL;
+ _cleanup_free_ int *ifindices = NULL;
_cleanup_free_ char *class = NULL;
size_t l, ms, idx;
unsigned i = 0, c = 0;
char *r_name;
- int n_ifindexes, r;
+ int n_ifindices, r;
assert(name);
assert(pat);
@@ -101,9 +101,9 @@ enum nss_status _nss_mymachines_gethostbyname4_r(
goto fail;
}
- n_ifindexes = sd_machine_get_ifindexes(name, &ifindexes);
- if (n_ifindexes < 0) {
- r = n_ifindexes;
+ n_ifindices = sd_machine_get_ifindices(name, &ifindices);
+ if (n_ifindices < 0) {
+ r = n_ifindices;
goto fail;
}
@@ -182,7 +182,7 @@ enum nss_status _nss_mymachines_gethostbyname4_r(
r_tuple->next = i == c-1 ? NULL : (struct gaih_addrtuple*) ((char*) r_tuple + ALIGN(sizeof(struct gaih_addrtuple)));
r_tuple->name = r_name;
r_tuple->family = family;
- r_tuple->scopeid = n_ifindexes == 1 ? ifindexes[0] : 0;
+ r_tuple->scopeid = n_ifindices == 1 ? ifindices[0] : 0;
memcpy(r_tuple->addr, a, sz);
idx += ALIGN(sizeof(struct gaih_addrtuple));
diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h
index b289ad2a59..1eb3be30b5 100644
--- a/src/systemd/sd-login.h
+++ b/src/systemd/sd-login.h
@@ -181,8 +181,8 @@ int sd_seat_can_graphical(const char *seat);
/* Return the class of machine */
int sd_machine_get_class(const char *machine, char **clazz);
-/* Return the list if host-side network interface indexes of a machine */
-int sd_machine_get_ifindexes(const char *machine, int **ifindexes);
+/* Return the list if host-side network interface indices of a machine */
+int sd_machine_get_ifindices(const char *machine, int **ifindices);
/* Get all seats, store in *seats. Returns the number of seats. If
* seats is NULL, this only returns the number of seats. */