Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/mm/slabinfo: fix --partial long option mapping

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>

authored by

Kaushlendra Kumar and committed by
Andrew Morton
8b8017d7 9f5edd78

+1 -1
+1 -1
tools/mm/slabinfo.c
··· 1405 1405 { "numa", no_argument, NULL, 'n' }, 1406 1406 { "lines", required_argument, NULL, 'N'}, 1407 1407 { "ops", no_argument, NULL, 'o' }, 1408 - { "partial", no_argument, NULL, 'p'}, 1408 + { "partial", no_argument, NULL, 'P'}, 1409 1409 { "report", no_argument, NULL, 'r' }, 1410 1410 { "shrink", no_argument, NULL, 's' }, 1411 1411 { "Size", no_argument, NULL, 'S'},