aboutsummaryrefslogtreecommitdiff
path: root/console-tools
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-01-31 19:00:21 +0000
committerMatt Kraai <kraai@debian.org>2001-01-31 19:00:21 +0000
commitdd19c6990496023fe23fefef8f1798740f7d39c6 (patch)
tree3933adefa4171173db78fa2389146ac89f4edb86 /console-tools
parent63ec2732454a0c973305794e185e488106f6b282 (diff)
downloadbusybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.gz
busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.bz2
busybox-w32-dd19c6990496023fe23fefef8f1798740f7d39c6.zip
Removed trailing \n from error_msg{,_and_die} messages.
Diffstat (limited to 'console-tools')
-rw-r--r--console-tools/deallocvt.c4
-rw-r--r--console-tools/dumpkmap.c2
-rw-r--r--console-tools/loadacm.c12
-rw-r--r--console-tools/loadfont.c14
-rw-r--r--console-tools/loadkmap.c2
-rw-r--r--console-tools/setkeycodes.c6
6 files changed, 20 insertions, 20 deletions
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index fad7a2bb2..b51fbaef4 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -31,9 +31,9 @@ int deallocvt_main(int argc, char *argv[])
31 for (i = 1; i < argc; i++) { 31 for (i = 1; i < argc; i++) {
32 num = atoi(argv[i]); 32 num = atoi(argv[i]);
33 if (num == 0) 33 if (num == 0)
34 error_msg("0: illegal VT number\n"); 34 error_msg("0: illegal VT number");
35 else if (num == 1) 35 else if (num == 1)
36 error_msg("VT 1 cannot be deallocated\n"); 36 error_msg("VT 1 cannot be deallocated");
37 else if (ioctl(fd, VT_DISALLOCATE, num)) 37 else if (ioctl(fd, VT_DISALLOCATE, num))
38 perror_msg_and_die("VT_DISALLOCATE"); 38 perror_msg_and_die("VT_DISALLOCATE");
39 } 39 }
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c
index b2067b30c..4ab711e55 100644
--- a/console-tools/dumpkmap.c
+++ b/console-tools/dumpkmap.c
@@ -81,7 +81,7 @@ int dumpkmap_main(int argc, char **argv)
81 ke.kb_table = i; 81 ke.kb_table = i;
82 if (ioctl(fd, KDGKBENT, &ke) < 0) { 82 if (ioctl(fd, KDGKBENT, &ke) < 0) {
83 83
84 error_msg("ioctl returned: %s, %s, %s, %xqq\n",strerror(errno),(char *)&ke.kb_index,(char *)&ke.kb_table,(int)&ke.kb_value); 84 error_msg("ioctl returned: %s, %s, %s, %xqq", strerror(errno),(char *)&ke.kb_index,(char *)&ke.kb_table,(int)&ke.kb_value);
85 } 85 }
86 else { 86 else {
87 write(1,(void*)&ke.kb_value,2); 87 write(1,(void*)&ke.kb_value,2);
diff --git a/console-tools/loadacm.c b/console-tools/loadacm.c
index 040062cf8..345a2773c 100644
--- a/console-tools/loadacm.c
+++ b/console-tools/loadacm.c
@@ -70,7 +70,7 @@ int screen_map_load(int fd, FILE * fp)
70 if (parse_failed) { 70 if (parse_failed) {
71 if (-1 == fseek(fp, 0, SEEK_SET)) { 71 if (-1 == fseek(fp, 0, SEEK_SET)) {
72 if (errno == ESPIPE) 72 if (errno == ESPIPE)
73 error_msg_and_die("16bit screen-map MUST be a regular file.\n"); 73 error_msg_and_die("16bit screen-map MUST be a regular file.");
74 else 74 else
75 perror_msg_and_die("fseek failed reading binary 16bit screen-map"); 75 perror_msg_and_die("fseek failed reading binary 16bit screen-map");
76 } 76 }
@@ -79,7 +79,7 @@ int screen_map_load(int fd, FILE * fp)
79 perror_msg_and_die("Cannot read [new] map from file"); 79 perror_msg_and_die("Cannot read [new] map from file");
80#if 0 80#if 0
81 else 81 else
82 error_msg("Input screen-map is binary.\n"); 82 error_msg("Input screen-map is binary.");
83#endif 83#endif
84 } 84 }
85 85
@@ -96,7 +96,7 @@ int screen_map_load(int fd, FILE * fp)
96 /* rewind... */ 96 /* rewind... */
97 if (-1 == fseek(fp, 0, SEEK_SET)) { 97 if (-1 == fseek(fp, 0, SEEK_SET)) {
98 if (errno == ESPIPE) 98 if (errno == ESPIPE)
99 error_msg("Assuming 8bit screen-map - MUST be a regular file.\n"), 99 error_msg("Assuming 8bit screen-map - MUST be a regular file."),
100 exit(1); 100 exit(1);
101 else 101 else
102 perror_msg_and_die("fseek failed assuming 8bit screen-map"); 102 perror_msg_and_die("fseek failed assuming 8bit screen-map");
@@ -109,7 +109,7 @@ int screen_map_load(int fd, FILE * fp)
109 if (-1 == fseek(fp, 0, SEEK_SET)) { 109 if (-1 == fseek(fp, 0, SEEK_SET)) {
110 if (errno == ESPIPE) 110 if (errno == ESPIPE)
111 /* should not - it succedeed above */ 111 /* should not - it succedeed above */
112 error_msg_and_die("fseek() returned ESPIPE !\n"); 112 error_msg_and_die("fseek() returned ESPIPE !");
113 else 113 else
114 perror_msg_and_die("fseek for binary 8bit screen-map"); 114 perror_msg_and_die("fseek for binary 8bit screen-map");
115 } 115 }
@@ -118,7 +118,7 @@ int screen_map_load(int fd, FILE * fp)
118 perror_msg_and_die("Cannot read [old] map from file"); 118 perror_msg_and_die("Cannot read [old] map from file");
119#if 0 119#if 0
120 else 120 else
121 error_msg("Input screen-map is binary.\n"); 121 error_msg("Input screen-map is binary.");
122#endif 122#endif
123 } 123 }
124 124
@@ -127,7 +127,7 @@ int screen_map_load(int fd, FILE * fp)
127 else 127 else
128 return 0; 128 return 0;
129 } 129 }
130 error_msg("Error parsing symbolic map\n"); 130 error_msg("Error parsing symbolic map");
131 return(1); 131 return(1);
132} 132}
133 133
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c
index 08e07618e..ec3e50560 100644
--- a/console-tools/loadfont.c
+++ b/console-tools/loadfont.c
@@ -62,7 +62,7 @@ static void do_loadfont(int fd, char *inbuf, int unit, int fontsize)
62 memset(buf, 0, sizeof(buf)); 62 memset(buf, 0, sizeof(buf));
63 63
64 if (unit < 1 || unit > 32) 64 if (unit < 1 || unit > 32)
65 error_msg_and_die("Bad character size %d\n", unit); 65 error_msg_and_die("Bad character size %d", unit);
66 66
67 for (i = 0; i < fontsize; i++) 67 for (i = 0; i < fontsize; i++)
68 memcpy(buf + (32 * i), inbuf + (unit * i), unit); 68 memcpy(buf + (32 * i), inbuf + (unit * i), unit);
@@ -119,8 +119,8 @@ do_loadtable(int fd, unsigned char *inbuf, int tailsz, int fontsize)
119 if (ioctl(fd, PIO_UNIMAPCLR, &advice)) { 119 if (ioctl(fd, PIO_UNIMAPCLR, &advice)) {
120#ifdef ENOIOCTLCMD 120#ifdef ENOIOCTLCMD
121 if (errno == ENOIOCTLCMD) { 121 if (errno == ENOIOCTLCMD) {
122 error_msg("It seems this kernel is older than 1.1.92\n"); 122 error_msg("It seems this kernel is older than 1.1.92");
123 error_msg_and_die("No Unicode mapping table loaded.\n"); 123 error_msg_and_die("No Unicode mapping table loaded.");
124 } else 124 } else
125#endif 125#endif
126 perror_msg_and_die("PIO_UNIMAPCLR"); 126 perror_msg_and_die("PIO_UNIMAPCLR");
@@ -174,11 +174,11 @@ static void loadnewfont(int fd)
174 goto no_psf; 174 goto no_psf;
175 175
176 if (psfhdr.mode > PSF_MAXMODE) 176 if (psfhdr.mode > PSF_MAXMODE)
177 error_msg_and_die("Unsupported psf file mode\n"); 177 error_msg_and_die("Unsupported psf file mode");
178 fontsize = ((psfhdr.mode & PSF_MODE512) ? 512 : 256); 178 fontsize = ((psfhdr.mode & PSF_MODE512) ? 512 : 256);
179#if !defined( PIO_FONTX ) || defined( __sparc__ ) 179#if !defined( PIO_FONTX ) || defined( __sparc__ )
180 if (fontsize != 256) 180 if (fontsize != 256)
181 error_msg_and_die("Only fontsize 256 supported\n"); 181 error_msg_and_die("Only fontsize 256 supported");
182#endif 182#endif
183 hastable = (psfhdr.mode & PSF_MODEHASTAB); 183 hastable = (psfhdr.mode & PSF_MODEHASTAB);
184 unit = psfhdr.charsize; 184 unit = psfhdr.charsize;
@@ -186,7 +186,7 @@ static void loadnewfont(int fd)
186 186
187 head = head0 + fontsize * unit; 187 head = head0 + fontsize * unit;
188 if (head > inputlth || (!hastable && head != inputlth)) 188 if (head > inputlth || (!hastable && head != inputlth))
189 error_msg_and_die("Input file: bad length\n"); 189 error_msg_and_die("Input file: bad length");
190 do_loadfont(fd, inbuf + head0, unit, fontsize); 190 do_loadfont(fd, inbuf + head0, unit, fontsize);
191 if (hastable) 191 if (hastable)
192 do_loadtable(fd, inbuf + head, inputlth - head, fontsize); 192 do_loadtable(fd, inbuf + head, inputlth - head, fontsize);
@@ -201,7 +201,7 @@ static void loadnewfont(int fd)
201 } else { 201 } else {
202 /* bare font */ 202 /* bare font */
203 if (inputlth & 0377) 203 if (inputlth & 0377)
204 error_msg_and_die("Bad input file size\n"); 204 error_msg_and_die("Bad input file size");
205 offset = 0; 205 offset = 0;
206 unit = inputlth / 256; 206 unit = inputlth / 256;
207 } 207 }
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c
index 75b40da9a..a98601aec 100644
--- a/console-tools/loadkmap.c
+++ b/console-tools/loadkmap.c
@@ -59,7 +59,7 @@ int loadkmap_main(int argc, char **argv)
59 59
60 read(0, buff, 7); 60 read(0, buff, 7);
61 if (0 != strncmp(buff, BINARY_KEYMAP_MAGIC, 7)) 61 if (0 != strncmp(buff, BINARY_KEYMAP_MAGIC, 7))
62 error_msg_and_die("This is not a valid binary keymap.\n"); 62 error_msg_and_die("This is not a valid binary keymap.");
63 63
64 if (MAX_NR_KEYMAPS != read(0, flags, MAX_NR_KEYMAPS)) 64 if (MAX_NR_KEYMAPS != read(0, flags, MAX_NR_KEYMAPS))
65 perror_msg_and_die("Error reading keymap flags"); 65 perror_msg_and_die("Error reading keymap flags");
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c
index be9b1b797..3e511ad00 100644
--- a/console-tools/setkeycodes.c
+++ b/console-tools/setkeycodes.c
@@ -52,18 +52,18 @@ setkeycodes_main(int argc, char** argv)
52 a.keycode = atoi(argv[2]); 52 a.keycode = atoi(argv[2]);
53 a.scancode = sc = strtol(argv[1], &ep, 16); 53 a.scancode = sc = strtol(argv[1], &ep, 16);
54 if (*ep) { 54 if (*ep) {
55 error_msg_and_die("error reading SCANCODE: '%s'\n", argv[1]); 55 error_msg_and_die("error reading SCANCODE: '%s'", argv[1]);
56 } 56 }
57 if (a.scancode > 127) { 57 if (a.scancode > 127) {
58 a.scancode -= 0xe000; 58 a.scancode -= 0xe000;
59 a.scancode += 128; 59 a.scancode += 128;
60 } 60 }
61 if (a.scancode > 255 || a.keycode > 127) { 61 if (a.scancode > 255 || a.keycode > 127) {
62 error_msg_and_die("SCANCODE or KEYCODE outside bounds\n"); 62 error_msg_and_die("SCANCODE or KEYCODE outside bounds");
63 } 63 }
64 if (ioctl(fd,KDSETKEYCODE,&a)) { 64 if (ioctl(fd,KDSETKEYCODE,&a)) {
65 perror("KDSETKEYCODE"); 65 perror("KDSETKEYCODE");
66 error_msg_and_die("failed to set SCANCODE %x to KEYCODE %d\n", sc, a.keycode); 66 error_msg_and_die("failed to set SCANCODE %x to KEYCODE %d", sc, a.keycode);
67 } 67 }
68 argc -= 2; 68 argc -= 2;
69 argv += 2; 69 argv += 2;