return _mesh_param_descrs + i;
}
- print_all_mesh_param_descr();
return NULL;
}
if (!container)
return -ENOBUFS;
- if (!argc)
+ if (!argc) {
+ print_all_mesh_param_descr();
return 1;
+ }
while (argc) {
const char *name;
}
mdescr = find_mesh_param(name);
- if (!mdescr)
+ if (!mdescr) {
+ printf("Could not find the parameter %s.\n", name);
+ print_all_mesh_param_descr();
return 2;
+ }
/* Parse the new value */
ret = mdescr->parse_fn(value, &any);
{
const struct mesh_param_descr *mdescr = NULL;
- if (argc > 1)
+ if (argc == 0) {
+ print_all_mesh_param_descr();
return 1;
-
- if (argc == 1) {
+ } else if (argc == 1) {
mdescr = find_mesh_param(argv[0]);
- if (!mdescr)
+ if (!mdescr) {
+ printf("Could not find the parameter %s.\n", argv[0]);
+ print_all_mesh_param_descr();
return 2;
+ }
+ } else {
+ return 1;
}
register_handler(print_mesh_param_handler, (void *)mdescr);