summaryrefslogtreecommitdiff
path: root/runit/runit_lib.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-09-05 19:28:29 +0200
committerDenys Vlasenko2010-09-05 19:28:29 +0200
commite09bff33412c150a2c4c80ca7e2d5c6b76f10c9f (patch)
tree0d9530a372348a58acb2a3ff8b515fa21cb506ca /runit/runit_lib.c
parent8d789e419732e860cf89883c0565ff496b3291ee (diff)
downloadbusybox-e09bff33412c150a2c4c80ca7e2d5c6b76f10c9f.zip
busybox-e09bff33412c150a2c4c80ca7e2d5c6b76f10c9f.tar.gz
runit_lib: remove/inline a few more things
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'runit/runit_lib.c')
-rw-r--r--runit/runit_lib.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/runit/runit_lib.c b/runit/runit_lib.c
index ec18b5e..8182a90 100644
--- a/runit/runit_lib.c
+++ b/runit/runit_lib.c
@@ -198,27 +198,29 @@ void iopause(iopause_fd *x, unsigned len, struct taia *deadline, struct taia *st
int lock_ex(int fd)
{
- return flock(fd,LOCK_EX);
+ return flock(fd, LOCK_EX);
}
int lock_exnb(int fd)
{
- return flock(fd,LOCK_EX | LOCK_NB);
+ return flock(fd, LOCK_EX | LOCK_NB);
}
+#ifdef UNUSED
int open_append(const char *fn)
{
- return open(fn, O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0600);
+ return open(fn, O_WRONLY | O_NDELAY | O_APPEND | O_CREAT, 0600);
}
-int open_read(const char *fn)
+int open_trunc(const char *fn)
{
- return open(fn, O_RDONLY|O_NDELAY);
+ return open(fn, O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT, 0644);
}
+#endif
-int open_trunc(const char *fn)
+int open_read(const char *fn)
{
- return open(fn,O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT,0644);
+ return open(fn, O_RDONLY|O_NDELAY);
}
int open_write(const char *fn)
@@ -226,7 +228,7 @@ int open_write(const char *fn)
return open(fn, O_WRONLY|O_NDELAY);
}
-unsigned pmatch(const char *p, const char *s, unsigned len)
+unsigned FAST_FUNC pmatch(const char *p, const char *s, unsigned len)
{
for (;;) {
char c = *p++;