iproute2: improved error messages
This patch improves many error messages as follows:
- For incorrect parameters, show the value of the offending parameter, rather than just say that it is incorrect
- Rephrased messages for clarity
- Rephrased to more `mainstream' english
Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
diff --git a/ip/iplink_can.c b/ip/iplink_can.c
index c8af4bc..5674358 100644
--- a/ip/iplink_can.c
+++ b/ip/iplink_can.c
@@ -68,8 +68,8 @@
cm->flags |= flags;
} else if (strcmp(arg, "off") != 0) {
fprintf(stderr,
- "Error: argument of \"%s\" must be \"on\" or \"off\"\n",
- name);
+ "Error: argument of \"%s\" must be \"on\" or \"off\", not \"%s\"\n",
+ name, arg);
exit(-1);
}
cm->mask |= flags;
@@ -169,7 +169,7 @@
usage();
return -1;
} else {
- fprintf(stderr, "can: what is \"%s\"?\n", *argv);
+ fprintf(stderr, "can: unknown option \"%s\"\n", *argv);
usage();
return -1;
}