diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-14 23:28:47 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-14 23:28:47 +0000 |
commit | 3ab1d8193e335afa74e86a8d8e628158d7e503b9 (patch) | |
tree | 6a217bf17e7c00e98a47f657015535f21b53cedd /chvt.c | |
parent | 28611675ac2c9073639562f4e4477f8e81d01845 (diff) | |
download | busybox-w32-3ab1d8193e335afa74e86a8d8e628158d7e503b9.tar.gz busybox-w32-3ab1d8193e335afa74e86a8d8e628158d7e503b9.tar.bz2 busybox-w32-3ab1d8193e335afa74e86a8d8e628158d7e503b9.zip |
Don't use strings directly in calls to usage(). This is in preparation
for their extraction to a separate file.
git-svn-id: svn://busybox.net/trunk/busybox@863 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'chvt.c')
-rw-r--r-- | chvt.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -15,18 +15,19 @@ | |||
15 | #define VT_ACTIVATE 0x5606 /* make vt active */ | 15 | #define VT_ACTIVATE 0x5606 /* make vt active */ |
16 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ | 16 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ |
17 | 17 | ||
18 | const char chvt_usage[] = | ||
19 | "chvt N\n" | ||
20 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
21 | "\nChanges the foreground virtual terminal to /dev/ttyN\n" | ||
22 | #endif | ||
23 | ; | ||
18 | 24 | ||
19 | int chvt_main(int argc, char **argv) | 25 | int chvt_main(int argc, char **argv) |
20 | { | 26 | { |
21 | int fd, num; | 27 | int fd, num; |
22 | 28 | ||
23 | if ((argc != 2) || (**(argv + 1) == '-')) { | 29 | if ((argc != 2) || (**(argv + 1) == '-')) |
24 | usage ("chvt N\n" | 30 | usage (chvt_usage); |
25 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
26 | "\nChanges the foreground virtual terminal to /dev/ttyN\n" | ||
27 | #endif | ||
28 | ); | ||
29 | } | ||
30 | fd = get_console_fd("/dev/console"); | 31 | fd = get_console_fd("/dev/console"); |
31 | num = atoi(argv[1]); | 32 | num = atoi(argv[1]); |
32 | if (ioctl(fd, VT_ACTIVATE, num)) { | 33 | if (ioctl(fd, VT_ACTIVATE, num)) { |