From: Kay Sievers Date: Thu, 31 Jul 2014 14:51:08 +0000 (+0200) Subject: test: do not use __ prefix for ordinary functions X-Git-Tag: upstream/0.20140911.160207utc~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bcf31b7d68711ee2ebf4fe8c840b193b4155dbf7;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git test: do not use __ prefix for ordinary functions --- diff --git a/test/kdbus-util.c b/test/kdbus-util.c index 6bb3bbf..298d1ec 100644 --- a/test/kdbus-util.c +++ b/test/kdbus-util.c @@ -29,9 +29,9 @@ #include "kdbus-enum.h" #define POOL_SIZE (16 * 1024LU * 1024LU) -static struct conn * -__kdbus_hello(const char *path, uint64_t flags, - const struct kdbus_item *item, size_t item_size) +struct conn * +kdbus_hello(const char *path, uint64_t flags, + const struct kdbus_item *item, size_t item_size) { int fd, ret; struct { @@ -106,11 +106,6 @@ __kdbus_hello(const char *path, uint64_t flags, return conn; } -struct conn *kdbus_hello(const char *path, uint64_t flags) -{ - return __kdbus_hello(path, flags, NULL, 0); -} - struct conn * kdbus_hello_registrar(const char *path, const char *name, const struct kdbus_policy_access *access, @@ -142,7 +137,7 @@ kdbus_hello_registrar(const char *path, const char *name, item = KDBUS_ITEM_NEXT(item); } - return __kdbus_hello(path, flags, items, size); + return kdbus_hello(path, flags, items, size); } struct conn *kdbus_hello_activator(const char *path, const char *name, diff --git a/test/kdbus-util.h b/test/kdbus-util.h index 0fcfb72..615f318 100644 --- a/test/kdbus-util.h +++ b/test/kdbus-util.h @@ -44,7 +44,9 @@ void msg_dump(const struct conn *conn, const struct kdbus_msg *msg); char *msg_id(uint64_t id, char *buf); int msg_send(const struct conn *conn, const char *name, uint64_t cookie, uint64_t flags, uint64_t timeout, int64_t priority, uint64_t dst_id); -struct conn *kdbus_hello(const char *path, uint64_t hello_flags); +struct conn *kdbus_hello(const char *path, uint64_t hello_flags, + const struct kdbus_item *item, size_t item_size); + struct conn *kdbus_hello_registrar(const char *path, const char *name, const struct kdbus_policy_access *access, size_t num_access, uint64_t flags); diff --git a/test/test-kdbus-activator.c b/test/test-kdbus-activator.c index b24ce32..167018b 100644 --- a/test/test-kdbus-activator.c +++ b/test/test-kdbus-activator.c @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) if (!activator) return EXIT_FAILURE; - conn_a = kdbus_hello(bus, 0); + conn_a = kdbus_hello(bus, 0, NULL, 0); if (!conn_a) return EXIT_FAILURE; diff --git a/test/test-kdbus-benchmark.c b/test/test-kdbus-benchmark.c index f3b49e1..c56e778 100644 --- a/test/test-kdbus-benchmark.c +++ b/test/test-kdbus-benchmark.c @@ -264,11 +264,11 @@ int main(int argc, char *argv[]) if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0) return EXIT_FAILURE; - conn_a = kdbus_hello(bus, 0); + conn_a = kdbus_hello(bus, 0, NULL, 0); if (!conn_a) return EXIT_FAILURE; - conn_b = kdbus_hello(bus, 0); + conn_b = kdbus_hello(bus, 0, NULL, 0); if (!conn_b) return EXIT_FAILURE; diff --git a/test/test-kdbus-chat.c b/test/test-kdbus-chat.c index 7adf6fd..ce0d83a 100644 --- a/test/test-kdbus-chat.c +++ b/test/test-kdbus-chat.c @@ -69,8 +69,8 @@ int main(int argc, char *argv[]) if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0) return EXIT_FAILURE; - conn_a = kdbus_hello(bus, 0); - conn_b = kdbus_hello(bus, 0); + conn_a = kdbus_hello(bus, 0, NULL, 0); + conn_b = kdbus_hello(bus, 0, NULL, 0); if (!conn_a || !conn_b) return EXIT_FAILURE; diff --git a/test/test-kdbus-daemon.c b/test/test-kdbus-daemon.c index 12662fb..2b2b91c 100644 --- a/test/test-kdbus-daemon.c +++ b/test/test-kdbus-daemon.c @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0) return EXIT_FAILURE; - conn = kdbus_hello(bus, 0); + conn = kdbus_hello(bus, 0, NULL, 0); if (!conn) return EXIT_FAILURE; printf(" Created connection %llu on bus '%s'\n", (unsigned long long)conn->id, bus_make.name); diff --git a/test/test-kdbus-fuzz.c b/test/test-kdbus-fuzz.c index c260f8f..c67f759 100644 --- a/test/test-kdbus-fuzz.c +++ b/test/test-kdbus-fuzz.c @@ -131,7 +131,7 @@ static int make_bus(void) return EXIT_FAILURE; for (ret = 0; ret < random() % 20; ret++) { - struct conn *conn = kdbus_hello(bus, 0); + struct conn *conn = kdbus_hello(bus, 0, NULL, 0); if (conn) add_fd(conn->fd); } diff --git a/test/test-kdbus-monitor.c b/test/test-kdbus-monitor.c index 1b38383..b81e9ed 100644 --- a/test/test-kdbus-monitor.c +++ b/test/test-kdbus-monitor.c @@ -156,7 +156,7 @@ int main(int argc, char **argv) return EXIT_FAILURE; } - conn = kdbus_hello(bus, KDBUS_HELLO_MONITOR); + conn = kdbus_hello(bus, KDBUS_HELLO_MONITOR, NULL, 0); if (!conn) { fprintf(stderr, "Unable to connect as monitor: %m\n"); return EXIT_FAILURE; diff --git a/test/test-kdbus-policy.c b/test/test-kdbus-policy.c index 6a39040..a2430f2 100644 --- a/test/test-kdbus-policy.c +++ b/test/test-kdbus-policy.c @@ -171,7 +171,7 @@ static int kdbus_normal_test(const char *bus, const char *name, conn_db[i] = NULL; /* We need to create connections here */ - conn_db[i] = kdbus_hello(bus, 0); + conn_db[i] = kdbus_hello(bus, 0, NULL, 0); if (!conn_db[i]) { ret = -errno; break; diff --git a/test/test-kdbus-prio.c b/test/test-kdbus-prio.c index 3c64f58..bbb48b8 100644 --- a/test/test-kdbus-prio.c +++ b/test/test-kdbus-prio.c @@ -97,8 +97,8 @@ static int run_test(void) if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0) return EXIT_FAILURE; - conn_a = kdbus_hello(bus, 0); - conn_b = kdbus_hello(bus, 0); + conn_a = kdbus_hello(bus, 0, NULL, 0); + conn_b = kdbus_hello(bus, 0, NULL, 0); if (!conn_a || !conn_b) return EXIT_FAILURE; diff --git a/test/test-kdbus-sync.c b/test/test-kdbus-sync.c index 1c17989..bb73b39 100644 --- a/test/test-kdbus-sync.c +++ b/test/test-kdbus-sync.c @@ -92,8 +92,8 @@ int main(int argc, char *argv[]) if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0) return EXIT_FAILURE; - conn_a = kdbus_hello(bus, 0); - conn_b = kdbus_hello(bus, 0); + conn_a = kdbus_hello(bus, 0, NULL, 0); + conn_b = kdbus_hello(bus, 0, NULL, 0); if (!conn_a || !conn_b) return EXIT_FAILURE; diff --git a/test/test-kdbus-timeout.c b/test/test-kdbus-timeout.c index 518051d..22246ee 100644 --- a/test/test-kdbus-timeout.c +++ b/test/test-kdbus-timeout.c @@ -94,8 +94,8 @@ static int run_test(void) if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0) return EXIT_FAILURE; - conn_a = kdbus_hello(bus, 0); - conn_b = kdbus_hello(bus, 0); + conn_a = kdbus_hello(bus, 0, NULL, 0); + conn_b = kdbus_hello(bus, 0, NULL, 0); if (!conn_a || !conn_b) return EXIT_FAILURE;