]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/mm/slabinfo: fix --partial long option mapping
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>
Mon, 8 Dec 2025 10:52:40 +0000 (16:22 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:24:43 +0000 (19:24 -0800)
The long option "--partial" was incorrectly mapped to lowercase 'p' in the
opts[] array, but the getopt string and switch case handle uppercase 'P'.
This mismatch caused --partial to be rejected.

Fix the long_options mapping to use 'P' so --partial works correctly
alongside the existing -P short option.

Link: https://lkml.kernel.org/r/20251208105240.2719773-1-kaushlendra.kumar@intel.com
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Tested-by: SeongJae Park <sj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/mm/slabinfo.c

index 80cdbd3db82df536a1d15da4f64b6acd5077b122..54c7265ab52d99202c326514a7d5c9c4950871fb 100644 (file)
@@ -1405,7 +1405,7 @@ struct option opts[] = {
        { "numa", no_argument, NULL, 'n' },
        { "lines", required_argument, NULL, 'N'},
        { "ops", no_argument, NULL, 'o' },
-       { "partial", no_argument, NULL, 'p'},
+       { "partial", no_argument, NULL, 'P'},
        { "report", no_argument, NULL, 'r' },
        { "shrink", no_argument, NULL, 's' },
        { "Size", no_argument, NULL, 'S'},