diff options
| author | Ye Liu <liuye@kylinos.cn> | 2026-05-13 10:21:18 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-05-28 21:31:04 -0700 |
| commit | 0cc6f673d636a5b521971998af0f89d95943ffb4 (patch) | |
| tree | c28909288e56d238f26c0482f0119f2c0aa79f8c /tools | |
| parent | d24292fe020ad9e969191e6505090238561ef83c (diff) | |
| download | linux-next-history-0cc6f673d636a5b521971998af0f89d95943ffb4.tar.gz | |
tools/mm/page-types: fix kpageflags option argument in getopt_long
The --kpageflags option requires an argument to specify the kpageflags
file path, but has_arg was set to 0 (no_argument) in the long options
table. Change it to 1 (required_argument) so getopt_long correctly parses
the argument.
Link: https://lore.kernel.org/20260513022120.58033-4-ye.liu@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mm/page-types.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c index 66f429f2b6987..7fc5a8be5997f 100644 --- a/tools/mm/page-types.c +++ b/tools/mm/page-types.c @@ -1261,7 +1261,7 @@ static const struct option opts[] = { { "no-summary", 0, NULL, 'N' }, { "hwpoison" , 0, NULL, 'X' }, { "unpoison" , 0, NULL, 'x' }, - { "kpageflags", 0, NULL, 'F' }, + { "kpageflags", 1, NULL, 'F' }, { "help" , 0, NULL, 'h' }, { NULL , 0, NULL, 0 } }; |
