]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: remove unused --sysroot
authorKarel Zak <kzak@redhat.com>
Tue, 2 Nov 2021 08:15:13 +0000 (09:15 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Nov 2021 08:15:13 +0000 (09:15 +0100)
It's unnecessary to redirect to any /proc dump if we can use 'test_mkfds'.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsfd.1.adoc
misc-utils/lsfd.c

index e6a72d302f1db1496ff55f5587996f1a7b6b02e8..55f292d5393a46558f29e18f5e41965263a53f30 100644 (file)
@@ -51,9 +51,6 @@ the format _+list_ (e.g., *lsfd -o +DELETED*).
 *-r*, *--raw*::
 Use raw output format.
 
-*--sysroot* _dir_::
-Use specified directory as system root.
-
 *--notruncate*::
 Don't truncate text in columns.
 
index 78e44b6e4ff92edb6b99482a85db4f14d5c2fb89..fc721982e6bf11ea097849b7ed56898d50f4f0b7 100644 (file)
@@ -192,7 +192,6 @@ static size_t nspaces;
 struct lsfd_control {
        struct libscols_table *tb;              /* output */
        struct list_head procs;                 /* list of all processes */
-       const char *sysroot;                    /* default is NULL */
 
        unsigned int    noheadings : 1,
                        raw : 1,
@@ -1041,7 +1040,6 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -n, --noheadings      don't print headings\n"), out);
        fputs(_(" -o, --output <list>   output columns\n"), out);
        fputs(_(" -r, --raw             use raw output format\n"), out);
-       fputs(_("     --sysroot <dir>   use specified directory as system root\n"), out);
        fputs(_(" -u, --notruncate      don't truncate text in columns\n"), out);
        fputs(_(" -p, --pid  <pid(s)>   collect information only specified processes\n"), out);
        fputs(_(" -Q, --filter <expr>   apply display filter\n"), out);
@@ -1109,8 +1107,7 @@ int main(int argc, char *argv[])
        int n_pids = 0;
 
        enum {
-               OPT_SYSROOT = CHAR_MAX + 1,
-               OPT_DEBUG_FILTER,
+               OPT_DEBUG_FILTER = CHAR_MAX + 1
        };
        static const struct option longopts[] = {
                { "noheadings", no_argument, NULL, 'n' },
@@ -1121,7 +1118,6 @@ int main(int argc, char *argv[])
                { "raw",        no_argument, NULL, 'r' },
                { "threads",    no_argument, NULL, 'l' },
                { "notruncate", no_argument, NULL, 'u' },
-               { "sysroot",    required_argument, NULL, OPT_SYSROOT },
                { "pid",        required_argument, NULL, 'p' },
                { "filter",     required_argument, NULL, 'Q' },
                { "debug-filter",no_argument, NULL, OPT_DEBUG_FILTER },
@@ -1153,9 +1149,6 @@ int main(int argc, char *argv[])
                case 'u':
                        ctl.notrunc = 1;
                        break;
-               case OPT_SYSROOT:
-                       ctl.sysroot = optarg;
-                       break;
                case 'p':
                        parse_pids(optarg, &pids, &n_pids);
                        break;