summaryrefslogtreecommitdiffstats
path: root/main/common/cli.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/common/cli.h')
-rw-r--r--main/common/cli.h100
1 files changed, 50 insertions, 50 deletions
diff --git a/main/common/cli.h b/main/common/cli.h
index 9b661c6..ae156a9 100644
--- a/main/common/cli.h
+++ b/main/common/cli.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
* Copyright (c) 2013 Alcatel-Lucent
- *
+ *
* Alcatel Lucent licenses this file to You under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. A copy of the License is contained the
@@ -34,12 +34,12 @@ extern "C" {
/* Command table structure used by the monitor:
*/
-struct monCommand {
- char *name; /* Name of command seen by user. */
- int (*func)(int,char **); /* Called when command is invoked. */
- char **helptxt; /* Help text (see notes below). */
- long flags; /* Single-bit flags for various uses */
- /* (see the CMDFLAG_XXX macros). */
+struct monCommand {
+ char *name; /* Name of command seen by user. */
+ int (*func)(int,char **); /* Called when command is invoked. */
+ char **helptxt; /* Help text (see notes below). */
+ long flags; /* Single-bit flags for various uses */
+ /* (see the CMDFLAG_XXX macros). */
};
#ifdef __cplusplus
@@ -49,17 +49,17 @@ struct monCommand {
/* Bits currently assigned to command flags used in the monCommand
* structure...
*/
-#define CMDFLAG_NOMONRC 1
+#define CMDFLAG_NOMONRC 1
/* Maximum size of a command line:
*/
#ifndef CMDLINESIZE
-#define CMDLINESIZE 256
+#define CMDLINESIZE 256
#endif
/* Maximum number of arguments in a command line:
*/
-#define ARGCNT 24
+#define ARGCNT 24
/* Definitions for docommand() return values:
*
@@ -68,42 +68,42 @@ struct monCommand {
* (CMD_LINE_ERROR, CMD_ULVL_DENIED and CMD_NOT_FOUND) are used only by
# the docommand() function.
*
- * CMD_SUCCESS:
- * Everything worked ok.
- * CMD_FAILURE:
- * Command parameters were valid, but command itself failed for some other
- * reason. The docommand() function does not print a message here, it
- * is assumed that the error message was printed by the local function.
- * CMD_PARAM_ERROR:
- * Command line did not parse properly. Control was passed to a
- * local command function, but argument syntax caused it to choke.
- * In this case docommand() will print out the generic CLI syntax error
- * message.
- * CMD_LINE_ERROR:
- * Command line itself was invalid. Too many args, invalid shell var
- * syntax, etc.. Somekind of command line error prior to checking for
- * the command name-to-function match.
- * CMD_ULVL_DENIED:
- * Command's user level is higher than current user level, so access
- * is denied.
- * CMD_NOT_FOUND:
- * Since these same return values are used for each command function
- * plus the docommand() function, this error indicates that docommand()
- * could not even find the command in the command table.
- * CMD_MONRC_DENIED:
- * The command cannot execute because it is considered illegal
- * when run from within the monrc file.
+ * CMD_SUCCESS:
+ * Everything worked ok.
+ * CMD_FAILURE:
+ * Command parameters were valid, but command itself failed for some other
+ * reason. The docommand() function does not print a message here, it
+ * is assumed that the error message was printed by the local function.
+ * CMD_PARAM_ERROR:
+ * Command line did not parse properly. Control was passed to a
+ * local command function, but argument syntax caused it to choke.
+ * In this case docommand() will print out the generic CLI syntax error
+ * message.
+ * CMD_LINE_ERROR:
+ * Command line itself was invalid. Too many args, invalid shell var
+ * syntax, etc.. Somekind of command line error prior to checking for
+ * the command name-to-function match.
+ * CMD_ULVL_DENIED:
+ * Command's user level is higher than current user level, so access
+ * is denied.
+ * CMD_NOT_FOUND:
+ * Since these same return values are used for each command function
+ * plus the docommand() function, this error indicates that docommand()
+ * could not even find the command in the command table.
+ * CMD_MONRC_DENIED:
+ * The command cannot execute because it is considered illegal
+ * when run from within the monrc file.
*/
-#define CMD_SUCCESS 0
-#define CMD_FAILURE -1
-#define CMD_PARAM_ERROR -2
-#define CMD_LINE_ERROR -3
-#define CMD_ULVL_DENIED -4
-#define CMD_NOT_FOUND -5
-#define CMD_MONRC_DENIED -6
+#define CMD_SUCCESS 0
+#define CMD_FAILURE -1
+#define CMD_PARAM_ERROR -2
+#define CMD_LINE_ERROR -3
+#define CMD_ULVL_DENIED -4
+#define CMD_NOT_FOUND -5
+#define CMD_MONRC_DENIED -6
/* Notes on help text array:
- * The monitor's CLI processor assumes that every command's help text
+ * The monitor's CLI processor assumes that every command's help text
* array abides by a few basic rules...
* First of all, it assumes that every array has AT LEAST two strings.
* The first string in the array of strings is assumed to be a one-line
@@ -118,13 +118,13 @@ struct monCommand {
* know where the end is.
* Following is an example help text array...
*
- * char *HelpHelp[] = {
- * "Display command set",
- * "-[d] [commandname]",
- * "Options:",
- * " -d list commands and descriptions",
- * 0,
- * };
+ * char *HelpHelp[] = {
+ * "Display command set",
+ * "-[d] [commandname]",
+ * "Options:",
+ * " -d list commands and descriptions",
+ * 0,
+ * };
*
*/
#endif