]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpd: Remove the '-N' command-line flag 60/head
authorJonas Johansson <jonasj76@gmail.com>
Wed, 9 Apr 2014 06:02:48 +0000 (08:02 +0200)
committerJonas Johansson <jonasj76@gmail.com>
Wed, 9 Apr 2014 06:03:46 +0000 (08:03 +0200)
Too many flags being added, use of configuration file is prefered.

Signed-off-by: Jonas Johansson <jonasj76@gmail.com>
src/daemon/lldpd.c

index fd09a7c236b2d638ba8d65b0d0353527488a4217..2fe8383d815b06a1103bad9f51acc08637357316 100644 (file)
@@ -88,7 +88,6 @@ usage(void)
        fprintf(stderr, "-k       Disable advertising of kernel release, version, machine.\n");
        fprintf(stderr, "-S descr Override the default system description.\n");
        fprintf(stderr, "-P name  Override the default hardware platform.\n");
-       fprintf(stderr, "-N name  Override the default system name.\n");
        fprintf(stderr, "-m IP    Specify the IPv4 management addresses of this system.\n");
        fprintf(stderr, "-u file  Specify the Unix-domain socket used for communication with lldpctl(8).\n");
        fprintf(stderr, "-H mode  Specify the behaviour when detecting multiple neighbors.\n");
@@ -1275,7 +1274,7 @@ lldpd_main(int argc, char *argv[], char *envp[])
        char *cidp = NULL;
        char *interfaces = NULL;
        char *popt, opts[] =
-               "H:vhkrdD:xX:m:u:4:6:I:C:p:M:P:N:S:iL:@                    ";
+               "H:vhkrdD:xX:m:u:4:6:I:C:p:M:P:S:iL:@                    ";
        int i, found, advertise_version = 1;
 #ifdef ENABLE_LLDPMED
        int lldpmed = 0, noinventory = 0;
@@ -1283,7 +1282,6 @@ lldpd_main(int argc, char *argv[], char *envp[])
 #endif
        char *descr_override = NULL;
        char *platform_override = NULL;
-       char *hostname_override = NULL;
        char *lsb_release = NULL;
        const char *lldpcli = LLDPCLI_PATH;
        int smart = 15;
@@ -1390,9 +1388,6 @@ lldpd_main(int argc, char *argv[], char *envp[])
                        free(platform_override);
                        platform_override = strdup(optarg);
                        break;
-               case 'N':
-                       hostname_override = strdup(optarg);
-                       break;
                case 'H':
                        smart = atoi(optarg);
                        break;
@@ -1553,9 +1548,6 @@ lldpd_main(int argc, char *argv[], char *envp[])
        if (platform_override)
                cfg->g_config.c_platform = platform_override;
 
-       if (hostname_override)
-               cfg->g_config.c_hostname = hostname_override;
-
        /* Set system capabilities */
        log_debug("main", "set system capabilities");
        if ((lchassis = (struct lldpd_chassis*)