summaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-29 22:51:44 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-29 22:51:44 +0000
commit06c0a71d2315756db874e98bc4f760ca3283b6a6 (patch)
treedf385c84041f3fd8328e7a50caef4495ef2734a8 /loginutils/getty.c
parentb6aae0f38194cd39960a898606ee65d4be93a895 (diff)
downloadbusybox-w32-06c0a71d2315756db874e98bc4f760ca3283b6a6.tar.gz
busybox-w32-06c0a71d2315756db874e98bc4f760ca3283b6a6.tar.bz2
busybox-w32-06c0a71d2315756db874e98bc4f760ca3283b6a6.zip
preparatory patch for -Wwrite-strings #3
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r--loginutils/getty.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index f2c2b4afb..8f81cafcc 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -33,7 +33,7 @@
33#include <time.h> 33#include <time.h>
34#if ENABLE_FEATURE_WTMP 34#if ENABLE_FEATURE_WTMP
35extern void updwtmp(const char *filename, const struct utmp *ut); 35extern void updwtmp(const char *filename, const struct utmp *ut);
36static void update_utmp(char *line); 36static void update_utmp(const char *line);
37#endif 37#endif
38#endif /* LOGIN_PROCESS */ 38#endif /* LOGIN_PROCESS */
39 39
@@ -85,10 +85,10 @@ static void update_utmp(char *line);
85struct options { 85struct options {
86 int flags; /* toggle switches, see below */ 86 int flags; /* toggle switches, see below */
87 unsigned timeout; /* time-out period */ 87 unsigned timeout; /* time-out period */
88 char *login; /* login program */ 88 const char *login; /* login program */
89 char *tty; /* name of tty */ 89 const char *tty; /* name of tty */
90 char *initstring; /* modem init string */ 90 const char *initstring; /* modem init string */
91 char *issue; /* alternative issue file */ 91 const char *issue; /* alternative issue file */
92 int numspeed; /* number of baud rates to try */ 92 int numspeed; /* number of baud rates to try */
93 int speeds[MAX_SPEED]; /* baud rates to be tried */ 93 int speeds[MAX_SPEED]; /* baud rates to be tried */
94}; 94};
@@ -187,7 +187,7 @@ static void parse_args(int argc, char **argv, struct options *op)
187 const char *p = op->initstring; 187 const char *p = op->initstring;
188 char *q; 188 char *q;
189 189
190 q = op->initstring = xstrdup(op->initstring); 190 op->initstring = q = xstrdup(op->initstring);
191 /* copy optarg into op->initstring decoding \ddd 191 /* copy optarg into op->initstring decoding \ddd
192 octal codes into chars */ 192 octal codes into chars */
193 while (*p) { 193 while (*p) {
@@ -233,7 +233,7 @@ static void xdup2(int srcfd, int dstfd, const char *tty)
233} 233}
234 234
235/* open_tty - set up tty as standard { input, output, error } */ 235/* open_tty - set up tty as standard { input, output, error } */
236static void open_tty(char *tty, struct termios *tp, int local) 236static void open_tty(const char *tty, struct termios *tp, int local)
237{ 237{
238 int chdir_to_root = 0; 238 int chdir_to_root = 0;
239 239
@@ -655,7 +655,7 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat
655#ifdef SYSV_STYLE 655#ifdef SYSV_STYLE
656#if ENABLE_FEATURE_UTMP 656#if ENABLE_FEATURE_UTMP
657/* update_utmp - update our utmp entry */ 657/* update_utmp - update our utmp entry */
658static void update_utmp(char *line) 658static void update_utmp(const char *line)
659{ 659{
660 struct utmp ut; 660 struct utmp ut;
661 struct utmp *utp; 661 struct utmp *utp;