summaryrefslogtreecommitdiff
path: root/util-linux/fbset.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-06 17:23:23 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-06 17:23:23 +0000
commitc8c10c57159db40ec34f03652ef8ab96c1848ab6 (patch)
tree19f2c18c5167a38534b65b5c3e894ac10bd294d0 /util-linux/fbset.c
parentf86aee74ce995369a15bfa845d60376a8fc15279 (diff)
downloadbusybox-w32-c8c10c57159db40ec34f03652ef8ab96c1848ab6.tar.gz
busybox-w32-c8c10c57159db40ec34f03652ef8ab96c1848ab6.tar.bz2
busybox-w32-c8c10c57159db40ec34f03652ef8ab96c1848ab6.zip
Added (fixed) the '-n' option to fbset. Renumbered the command parameters to
put a gap between the normal commands and the fancy commands. This makes it cleaner to add normal commands. Patch from Jon McClintock <jonm@bluemug.com>. -Erik
Diffstat (limited to '')
-rw-r--r--util-linux/fbset.c45
1 files changed, 25 insertions, 20 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 0a84dce23..6b6b84c04 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -61,28 +61,29 @@
61/* #define CMD_XCOMPAT 10 */ 61/* #define CMD_XCOMPAT 10 */
62#define CMD_ALL 11 62#define CMD_ALL 11
63#define CMD_INFO 12 63#define CMD_INFO 12
64#define CMD_CHANGE 13
64 65
65#ifdef BB_FEATURE_FBSET_FANCY 66#ifdef BB_FEATURE_FBSET_FANCY
66#define CMD_XRES 13 67#define CMD_XRES 100
67#define CMD_YRES 14 68#define CMD_YRES 101
68#define CMD_VXRES 15 69#define CMD_VXRES 102
69#define CMD_VYRES 16 70#define CMD_VYRES 103
70#define CMD_DEPTH 17 71#define CMD_DEPTH 104
71#define CMD_MATCH 18 72#define CMD_MATCH 105
72#define CMD_PIXCLOCK 19 73#define CMD_PIXCLOCK 106
73#define CMD_LEFT 20 74#define CMD_LEFT 107
74#define CMD_RIGHT 21 75#define CMD_RIGHT 108
75#define CMD_UPPER 22 76#define CMD_UPPER 109
76#define CMD_LOWER 23 77#define CMD_LOWER 110
77#define CMD_HSLEN 24 78#define CMD_HSLEN 111
78#define CMD_VSLEN 25 79#define CMD_VSLEN 112
79#define CMD_CSYNC 26 80#define CMD_CSYNC 113
80#define CMD_GSYNC 27 81#define CMD_GSYNC 114
81#define CMD_EXTSYNC 28 82#define CMD_EXTSYNC 115
82#define CMD_BCAST 29 83#define CMD_BCAST 116
83#define CMD_RGBA 30 84#define CMD_RGBA 117
84#define CMD_STEP 31 85#define CMD_STEP 118
85#define CMD_MOVE 32 86#define CMD_MOVE 119
86#endif 87#endif
87 88
88static unsigned int g_options = 0; 89static unsigned int g_options = 0;
@@ -106,6 +107,7 @@ struct cmdoptions_t {
106 "-laced", 1, CMD_LACED}, { 107 "-laced", 1, CMD_LACED}, {
107 "-double", 1, CMD_DOUBLE}, { 108 "-double", 1, CMD_DOUBLE}, {
108 "-help", 0, CMD_HELP}, { 109 "-help", 0, CMD_HELP}, {
110 "-n", 0, CMD_CHANGE}, {
109#ifdef BB_FEATURE_FBSET_FANCY 111#ifdef BB_FEATURE_FBSET_FANCY
110 "-help", 0, CMD_HELP}, { 112 "-help", 0, CMD_HELP}, {
111 "-all", 0, CMD_ALL}, { 113 "-all", 0, CMD_ALL}, {
@@ -286,6 +288,9 @@ extern int fbset_main(int argc, char **argv)
286 varset.hsync_len = strtoul(argv[6], 0, 0); 288 varset.hsync_len = strtoul(argv[6], 0, 0);
287 varset.vsync_len = strtoul(argv[7], 0, 0); 289 varset.vsync_len = strtoul(argv[7], 0, 0);
288 break; 290 break;
291 case CMD_CHANGE:
292 g_options |= OPT_CHANGE;
293 break;
289#ifdef BB_FEATURE_FBSET_FANCY 294#ifdef BB_FEATURE_FBSET_FANCY
290 case CMD_XRES: 295 case CMD_XRES:
291 varset.xres = strtoul(argv[1], 0, 0); 296 varset.xres = strtoul(argv[1], 0, 0);