summaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorDan Fandrich2011-02-12 22:26:57 -0800
committerDenys Vlasenko2011-02-13 18:37:12 +0100
commitdc50676cce35cdba3ecba3870c3f752408d6db70 (patch)
treea8c7861c43f656b1013a0e57672446d63ffdb263 /runit
parent4ed3c52ce9b3ce5604c4fa075fda374f8cd01eea (diff)
downloadbusybox-dc50676cce35cdba3ecba3870c3f752408d6db70.zip
busybox-dc50676cce35cdba3ecba3870c3f752408d6db70.tar.gz
Move stpcpy replacement function into libbb
Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'runit')
-rw-r--r--runit/runsv.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/runit/runsv.c b/runit/runsv.c
index ebb0318..e76572d 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -139,16 +139,6 @@ static void s_term(int sig_no UNUSED_PARAM)
write(selfpipe.wr, "", 1); /* XXX */
}
-/* libbb candidate */
-static char *bb_stpcpy(char *p, const char *to_add)
-{
- while ((*p = *to_add) != '\0') {
- p++;
- to_add++;
- }
- return p;
-}
-
static int open_trunc_or_warn(const char *name)
{
/* Why O_NDELAY? */
@@ -192,26 +182,26 @@ static void update_status(struct svdir *s)
char *p = stat_buf;
switch (s->state) {
case S_DOWN:
- p = bb_stpcpy(p, "down");
+ p = stpcpy(p, "down");
break;
case S_RUN:
- p = bb_stpcpy(p, "run");
+ p = stpcpy(p, "run");
break;
case S_FINISH:
- p = bb_stpcpy(p, "finish");
+ p = stpcpy(p, "finish");
break;
}
if (s->ctrl & C_PAUSE)
- p = bb_stpcpy(p, ", paused");
+ p = stpcpy(p, ", paused");
if (s->ctrl & C_TERM)
- p = bb_stpcpy(p, ", got TERM");
+ p = stpcpy(p, ", got TERM");
if (s->state != S_DOWN)
switch (s->sd_want) {
case W_DOWN:
- p = bb_stpcpy(p, ", want down");
+ p = stpcpy(p, ", want down");
break;
case W_EXIT:
- p = bb_stpcpy(p, ", want exit");
+ p = stpcpy(p, ", want exit");
break;
}
*p++ = '\n';