From: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Subject: [PATCH v2] tools/mm/slabinfo: Fix --partial long option mapping
Date: Mon, 8 Dec 2025 16:22:40 +0530 [thread overview]
Message-ID: <20251208105240.2719773-1-kaushlendra.kumar@intel.com> (raw)
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.
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
---
v2: Keep existing -P behavior instead of changing to -p per review
feedback
tools/mm/slabinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
index 7c51d283504d..39f7eae7eecd 100644
--- a/tools/mm/slabinfo.c
+++ b/tools/mm/slabinfo.c
@@ -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'},
--
2.34.1
next reply other threads:[~2025-12-08 10:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 10:52 Kaushlendra Kumar [this message]
2025-12-10 3:17 ` [PATCH v2] tools/mm/slabinfo: Fix --partial long option mapping SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251208105240.2719773-1-kaushlendra.kumar@intel.com \
--to=kaushlendra.kumar@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).