diff options
Diffstat (limited to 'libcons/opts-std-startup.c')
-rw-r--r-- | libcons/opts-std-startup.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libcons/opts-std-startup.c b/libcons/opts-std-startup.c index c4a7d7bd..f64f60fc 100644 --- a/libcons/opts-std-startup.c +++ b/libcons/opts-std-startup.c @@ -25,7 +25,9 @@ /* Option keys for long-only options in diskfs_common_options. */ -#define OPT_SLACK 600 /* --slack */ +#define OPT_SLACK 600 /* --slack */ +#define OPT_JUMP_DOWN_AT_INPUT 601 /* --jump-down-at-input */ +#define OPT_JUMP_DOWN_AT_OUTPUT 602 /* --jump-down-at-output */ /* Common value for diskfs_common_options and diskfs_default_sync_interval. */ #define DEFAULT_SLACK 100 @@ -37,6 +39,12 @@ server. */ int _cons_slack = DEFAULT_SLACK; +/* If we jump down at input. */ +int _cons_jump_down_at_input; + +/* If we jump down at output. */ +int _cons_jump_down_at_output; + /* The filename of the console server. */ char *_cons_file; @@ -45,6 +53,10 @@ startup_options[] = { { "slack", OPT_SLACK, "RECORDS", 0, "Max number of records the client is" " allowed to lag behind the server (default " DEFAULT_SLACK_STRING ")" }, + { "jump-down-at-input", OPT_JUMP_DOWN_AT_INPUT, NULL, 0, + "End scrollback when something is entered" }, + { "jump-down-at-output", OPT_JUMP_DOWN_AT_OUTPUT, NULL, 0, + "End scrollback when something is printed" }, { 0, 0 } }; @@ -61,6 +73,14 @@ parse_startup_opt (int opt, char *arg, struct argp_state *state) _cons_slack = atoi (arg); break; + case OPT_JUMP_DOWN_AT_INPUT: + _cons_jump_down_at_input = 1; + break; + + case OPT_JUMP_DOWN_AT_OUTPUT: + _cons_jump_down_at_output = 1; + break; + case ARGP_KEY_ARG: if (state->arg_num > 0) /* Too many arguments. */ |