aboutsummaryrefslogtreecommitdiff
path: root/runit/svlogd.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-07-21 13:46:54 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-07-21 13:46:54 +0000
commita53de7f7c2cd3ac46b26642aafb1a573a096a80d (patch)
tree76b95b7a441628b3495f744bec5d862b5250f562 /runit/svlogd.c
parente1e5174942d4624e3abb8b98fe404afdbb4edad1 (diff)
downloadbusybox-w32-a53de7f7c2cd3ac46b26642aafb1a573a096a80d.tar.gz
busybox-w32-a53de7f7c2cd3ac46b26642aafb1a573a096a80d.tar.bz2
busybox-w32-a53de7f7c2cd3ac46b26642aafb1a573a096a80d.zip
- fix spelling
Diffstat (limited to 'runit/svlogd.c')
-rw-r--r--runit/svlogd.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 66b96b8de..960879513 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -145,12 +145,12 @@ static void pause_nomem(void)
145} 145}
146static void pause1cannot(const char *m0) 146static void pause1cannot(const char *m0)
147{ 147{
148 bb_perror_msg(PAUSE"cannot %s", m0); 148 bb_perror_msg(PAUSE"can't %s", m0);
149 sleep(3); 149 sleep(3);
150} 150}
151static void pause2cannot(const char *m0, const char *m1) 151static void pause2cannot(const char *m0, const char *m1)
152{ 152{
153 bb_perror_msg(PAUSE"cannot %s %s", m0, m1); 153 bb_perror_msg(PAUSE"can't %s %s", m0, m1);
154 sleep(3); 154 sleep(3);
155} 155}
156 156
@@ -246,7 +246,7 @@ static void processorstart(struct logdir *ld)
246 fd = open_read("state"); 246 fd = open_read("state");
247 if (fd == -1) { 247 if (fd == -1) {
248 if (errno != ENOENT) 248 if (errno != ENOENT)
249 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "open state for", ld->name); 249 bb_perror_msg_and_die(FATAL"can't %s processor %s", "open state for", ld->name);
250 close(xopen("state", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT)); 250 close(xopen("state", O_WRONLY|O_NDELAY|O_TRUNC|O_CREAT));
251 fd = xopen("state", O_RDONLY|O_NDELAY); 251 fd = xopen("state", O_RDONLY|O_NDELAY);
252 } 252 }
@@ -260,7 +260,7 @@ static void processorstart(struct logdir *ld)
260 prog[2] = ld->processor; 260 prog[2] = ld->processor;
261 prog[3] = NULL; 261 prog[3] = NULL;
262 execv("/bin/sh", prog); 262 execv("/bin/sh", prog);
263 bb_perror_msg_and_die(FATAL"cannot %s processor %s", "run", ld->name); 263 bb_perror_msg_and_die(FATAL"can't %s processor %s", "run", ld->name);
264 } 264 }
265 ld->fnsave[26] = sv_ch; /* ...restore */ 265 ld->fnsave[26] = sv_ch; /* ...restore */
266 ld->ppid = pid; 266 ld->ppid = pid;
@@ -300,7 +300,7 @@ static unsigned processorstop(struct logdir *ld)
300 pause2cannot("set mode of processed", ld->name); 300 pause2cannot("set mode of processed", ld->name);
301 ld->fnsave[26] = 'u'; 301 ld->fnsave[26] = 'u';
302 if (unlink(ld->fnsave) == -1) 302 if (unlink(ld->fnsave) == -1)
303 bb_error_msg(WARNING"cannot unlink: %s/%s", ld->name, ld->fnsave); 303 bb_error_msg(WARNING"can't unlink: %s/%s", ld->name, ld->fnsave);
304 while (rename("newstate", "state") == -1) 304 while (rename("newstate", "state") == -1)
305 pause2cannot("rename state", ld->name); 305 pause2cannot("rename state", ld->name);
306 if (verbose) 306 if (verbose)
@@ -325,7 +325,7 @@ static void rmoldest(struct logdir *ld)
325 if ((f->d_name[0] == '@') && (strlen(f->d_name) == 27)) { 325 if ((f->d_name[0] == '@') && (strlen(f->d_name) == 27)) {
326 if (f->d_name[26] == 't') { 326 if (f->d_name[26] == 't') {
327 if (unlink(f->d_name) == -1) 327 if (unlink(f->d_name) == -1)
328 warn2("cannot unlink processor leftover", f->d_name); 328 warn2("can't unlink processor leftover", f->d_name);
329 } else { 329 } else {
330 ++n; 330 ++n;
331 if (strcmp(f->d_name, oldest) < 0) 331 if (strcmp(f->d_name, oldest) < 0)
@@ -335,14 +335,14 @@ static void rmoldest(struct logdir *ld)
335 } 335 }
336 } 336 }
337 if (errno) 337 if (errno)
338 warn2("cannot read directory", ld->name); 338 warn2("can't read directory", ld->name);
339 closedir(d); 339 closedir(d);
340 340
341 if (ld->nmax && (n > ld->nmax)) { 341 if (ld->nmax && (n > ld->nmax)) {
342 if (verbose) 342 if (verbose)
343 bb_error_msg(INFO"delete: %s/%s", ld->name, oldest); 343 bb_error_msg(INFO"delete: %s/%s", ld->name, oldest);
344 if ((*oldest == '@') && (unlink(oldest) == -1)) 344 if ((*oldest == '@') && (unlink(oldest) == -1))
345 warn2("cannot unlink oldest logfile", ld->name); 345 warn2("can't unlink oldest logfile", ld->name);
346 } 346 }
347} 347}
348 348
@@ -451,7 +451,7 @@ static int buffer_pwrite(int n, char *s, unsigned len)
451 if (strcmp(f->d_name, oldest) < 0) 451 if (strcmp(f->d_name, oldest) < 0)
452 memcpy(oldest, f->d_name, 27); 452 memcpy(oldest, f->d_name, 27);
453 } 453 }
454 if (errno) warn2("cannot read directory, want remove old logfile", 454 if (errno) warn2("can't read directory, want remove old logfile",
455 ld->name); 455 ld->name);
456 closedir(d); 456 closedir(d);
457 errno = ENOSPC; 457 errno = ENOSPC;
@@ -461,7 +461,7 @@ static int buffer_pwrite(int n, char *s, unsigned len)
461 ld->name, oldest); 461 ld->name, oldest);
462 errno = 0; 462 errno = 0;
463 if (unlink(oldest) == -1) { 463 if (unlink(oldest) == -1) {
464 warn2("cannot unlink oldest logfile", ld->name); 464 warn2("can't unlink oldest logfile", ld->name);
465 errno = ENOSPC; 465 errno = ENOSPC;
466 } 466 }
467 while (fchdir(fdwdir) == -1) 467 while (fchdir(fdwdir) == -1)
@@ -518,13 +518,13 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
518 518
519 ld->fddir = open(fn, O_RDONLY|O_NDELAY); 519 ld->fddir = open(fn, O_RDONLY|O_NDELAY);
520 if (ld->fddir == -1) { 520 if (ld->fddir == -1) {
521 warn2("cannot open log directory", (char*)fn); 521 warn2("can't open log directory", (char*)fn);
522 return 0; 522 return 0;
523 } 523 }
524 close_on_exec_on(ld->fddir); 524 close_on_exec_on(ld->fddir);
525 if (fchdir(ld->fddir) == -1) { 525 if (fchdir(ld->fddir) == -1) {
526 logdir_close(ld); 526 logdir_close(ld);
527 warn2("cannot change directory", (char*)fn); 527 warn2("can't change directory", (char*)fn);
528 return 0; 528 return 0;
529 } 529 }
530 ld->fdlock = open("lock", O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0600); 530 ld->fdlock = open("lock", O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0600);
@@ -532,7 +532,7 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
532 || (lock_exnb(ld->fdlock) == -1) 532 || (lock_exnb(ld->fdlock) == -1)
533 ) { 533 ) {
534 logdir_close(ld); 534 logdir_close(ld);
535 warn2("cannot lock directory", (char*)fn); 535 warn2("can't lock directory", (char*)fn);
536 while (fchdir(fdwdir) == -1) 536 while (fchdir(fdwdir) == -1)
537 pause1cannot("change to initial working directory"); 537 pause1cannot("change to initial working directory");
538 return 0; 538 return 0;
@@ -651,7 +651,7 @@ static unsigned logdir_open(struct logdir *ld, const char *fn)
651 } else { 651 } else {
652 if (errno != ENOENT) { 652 if (errno != ENOENT) {
653 logdir_close(ld); 653 logdir_close(ld);
654 warn2("cannot stat current", ld->name); 654 warn2("can't stat current", ld->name);
655 while (fchdir(fdwdir) == -1) 655 while (fchdir(fdwdir) == -1)
656 pause1cannot("change to initial working directory"); 656 pause1cannot("change to initial working directory");
657 return 0; 657 return 0;
@@ -754,7 +754,7 @@ static int buffer_pread(/*int fd, */char *s, unsigned len)
754 if (errno == EINTR) 754 if (errno == EINTR)
755 continue; 755 continue;
756 if (errno != EAGAIN) { 756 if (errno != EAGAIN) {
757 warn("cannot read standard input"); 757 warn("can't read standard input");
758 break; 758 break;
759 } 759 }
760 /* else: EAGAIN - normal, repeat silently */ 760 /* else: EAGAIN - normal, repeat silently */