diff options
author | Amitay Isaacs <amitay@samba.org> | 2019-03-15 12:14:27 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2019-03-15 06:31:50 +0000 |
commit | edd4a23d7632af51f4d7b4287917b7fa0dced963 (patch) | |
tree | e171ff22f7840cec275813be06aedb2f7e709402 /ctdb | |
parent | 148306674d0e4706adca3e5dcbb779c51a2c03da (diff) | |
download | samba-edd4a23d7632af51f4d7b4287917b7fa0dced963.tar.gz |
ctdb-version: Simplify version string usage
There is no need to write SAMBA_VERSION_STRING as CTDB_VERSION_STRING.
Wherever required use SAMBA_VERSION_STRING directly.
Avoids the confusion with two version.h files.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789
Signed-off-by: Amitay Isaacs <amitay@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Mar 15 06:31:50 UTC 2019 on sn-devel-144
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/common/version.c | 20 | ||||
-rw-r--r-- | ctdb/common/version.h | 18 | ||||
-rw-r--r-- | ctdb/include/ctdb_version.h | 3 | ||||
-rw-r--r-- | ctdb/server/ctdb_daemon.c | 4 | ||||
-rw-r--r-- | ctdb/tools/ctdb.c | 4 | ||||
-rw-r--r-- | ctdb/wscript | 2 |
6 files changed, 5 insertions, 46 deletions
diff --git a/ctdb/common/version.c b/ctdb/common/version.c deleted file mode 100644 index e34e98c09ef..00000000000 --- a/ctdb/common/version.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - CTDB version string - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. -*/ - -#include "ctdb_version.h" - -const char ctdb_version_string[] = CTDB_VERSION_STRING; diff --git a/ctdb/common/version.h b/ctdb/common/version.h deleted file mode 100644 index 1cf1c5d0cab..00000000000 --- a/ctdb/common/version.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - CTDB version string - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. -*/ - -extern const char ctdb_version_string[]; diff --git a/ctdb/include/ctdb_version.h b/ctdb/include/ctdb_version.h deleted file mode 100644 index cf27179aff8..00000000000 --- a/ctdb/include/ctdb_version.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "version.h" - -#define CTDB_VERSION_STRING SAMBA_VERSION_STRING diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index aac331dd1dd..a8691388d4a 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -36,7 +36,7 @@ #include "lib/util/blocking.h" #include "lib/util/become_daemon.h" -#include "common/version.h" +#include "version.h" #include "ctdb_private.h" #include "ctdb_client.h" @@ -1237,7 +1237,7 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork) ctdb->ctdbd_pid = getpid(); DEBUG(DEBUG_ERR, ("Starting CTDBD (Version %s) as PID: %u\n", - ctdb_version_string, ctdb->ctdbd_pid)); + SAMBA_VERSION_STRING, ctdb->ctdbd_pid)); ctdb_create_pidfile(ctdb); /* create a unix domain stream socket to listen to */ diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 8140d7337c5..6b82bf779a9 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -30,7 +30,7 @@ #include <tevent.h> #include <tdb.h> -#include "common/version.h" +#include "version.h" #include "lib/util/debug.h" #include "lib/util/samba_util.h" #include "lib/util/sys_rw.h" @@ -723,7 +723,7 @@ static int run_helper(TALLOC_CTX *mem_ctx, const char *command, static int control_version(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, int argc, const char **argv) { - printf("%s\n", ctdb_version_string); + printf("%s\n", SAMBA_VERSION_STRING); return 0; } diff --git a/ctdb/wscript b/ctdb/wscript index 3c162e1a39c..4adf60046c3 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -412,7 +412,7 @@ def build(bld): pidfile.c run_proc.c hash_count.c run_event.c event_script.c - sock_client.c version.c + sock_client.c cmdline.c path.c conf.c line.c '''), deps='''samba-util sys_rw tevent-util |