batctl: isolation_mark: fix error message for invalid mark/mask values
PATCH 1/1 batctl: isolation_mark: fix error message for invalid mark/mask values
When the mark or mask argument fails to parse, error message claims "incorrect number of arguments (expected 1)" even though exactly one argument was given.
Print the offending value and say that the format is invalid instead.
Fixes a319ec4dcbff ("batctl: Support generic netlink for isolation_mark command")
Signed-off-by Sven Eckelmann <[email protected]>
--- isolation_mark.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
isolation_mark.c +2 -1
@@ -67,7 +67,8 @@ static int parse_isolation_mark(struct state *state, int argc, char *argv[])return 0 ; inval_format: -fprintf (stderr,"Error - incorrect number of arguments (expected 1)\n" ); +fprintf (stderr,"Error - invalid isolation mark/mask format: %s\n" , + argv[1 ]);fprintf (stderr,"The following formats for mark(/mask) are allowed:\n" );fprintf (stderr," * 0x12345678\n" );fprintf (stderr," * 0x12345678/0xabcdef09\n" );
---
base-commit: e93995999e80513db80eba200ea682b5b15556af
change-id: 20260704-bugfixes-isolation-5f03fe9743ac
Best regards,
Signature · 1 line
Sven Eckelmann <[email protected]>