* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
ignore_errors = ignore;
}
+/* Returns:
+ 0 on success
+ >0 CMD_* values
+ <0 errnos
+*/
int Parser_execarg(int argc, char **argv, command_t cmds[])
{
command_t *cmd;
fprintf(stderr, "%s\n", cmd->pc_help);
return rc;
} else {
- printf("Try interactive use without arguments or use one of:\n");
+ printf("Try interactive use without arguments or use one of:\n");
for (cmd = cmds; cmd->pc_name; cmd++)
printf("\"%s\"\n", cmd->pc_name);
printf("as argument.\n");
}
- return -1;
+ return -EINVAL;
}
/* returns the command_t * (NULL if not found) corresponding to a
char * pos;
match_tbl = top_level;
-
+
for (table = find_cmd(rl_line_buffer, match_tbl, &pos);
- table; table = find_cmd(pos, match_tbl, &pos))
+ table; table = find_cmd(pos, match_tbl, &pos))
{
if (*(pos - 1) == ' ') match_tbl = table->pc_sub_cmd;