summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2021-05-24 17:49:10 +0300
committerGitHub <noreply@github.com>2021-05-24 17:49:10 +0300
commiteaf1d76ca1597f9c4f96c9639df143801569941e (patch)
tree740393e509f28234f1d2150c089eedbe12b2c346
parentb8cd2bdc50fd8d10eb38c173b97b5918012271e7 (diff)
Remove deprecated options. (#11149)
These options have been deprecated for a long time and they are probably not used anywhere any more.
-rw-r--r--daemon/main.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/daemon/main.c b/daemon/main.c
index 61041f5407..bc8fd954b7 100644
--- a/daemon/main.c
+++ b/daemon/main.c
@@ -388,20 +388,6 @@ int help(int exitcode) {
return exitcode;
}
-// TODO: Remove this function with the nix major release.
-void remove_option(int opt_index, int *argc, char **argv) {
- int i;
-
- // remove the options.
- do {
- *argc = *argc - 1;
- for(i = opt_index; i < *argc; i++) {
- argv[i] = argv[i+1];
- }
- i = opt_index;
- } while(argv[i][0] != '-' && opt_index >= *argc);
-}
-
#ifdef ENABLE_HTTPS
static void security_init(){
char filename[FILENAME_MAX + 1];
@@ -733,34 +719,6 @@ int main(int argc, char **argv) {
// set the name for logging
program_name = "netdata";
- // parse deprecated options
- // TODO: Remove this block with the next major release.
- {
- i = 1;
- while(i < argc) {
- if(strcmp(argv[i], "-pidfile") == 0 && (i+1) < argc) {
- strncpyz(pidfile, argv[i+1], FILENAME_MAX);
- fprintf(stderr, "%s: deprecated option -- %s -- please use -P instead.\n", argv[0], argv[i]);
- remove_option(i, &argc, argv);
- }
- else if(strcmp(argv[i], "-nodaemon") == 0 || strcmp(argv[i], "-nd") == 0) {
- dont_fork = 1;
- fprintf(stderr, "%s: deprecated option -- %s -- please use -D instead.\n ", argv[0], argv[i]);
- remove_option(i, &argc, argv);
- }
- else if(strcmp(argv[i], "-ch") == 0 && (i+1) < argc) {
- config_set(CONFIG_SECTION_GLOBAL, "host access prefix", argv[i+1]);
- fprintf(stderr, "%s: deprecated option -- %s -- please use -s instead.\n", argv[0], argv[i]);
- remove_option(i, &argc, argv);
- }
- else if(strcmp(argv[i], "-l") == 0 && (i+1) < argc) {
- config_set(CONFIG_SECTION_GLOBAL, "history", argv[i+1]);
- fprintf(stderr, "%s: deprecated option -- %s -- This option will be removed with V2.*.\n", argv[0], argv[i]);
- remove_option(i, &argc, argv);
- }
- else i++;
- }
- }
if (argc > 1 && strcmp(argv[1], SPAWN_SERVER_COMMAND_LINE_ARGUMENT) == 0) {
// don't run netdata, this is the spawn server
spawn_server();