mirror of
https://github.com/troglobit/finit.git
synced 2026-10-19 11:09:35 +00:00
Relocate paste() from helpers.h to util.h, for sharing with initctl
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
5e37f94775
commit
6d4bc670e6
4 files changed
+14
-11
No files matched your search
@@ -103,17 +103,6 @@ static inline int create(char *path, mode_t mode, uid_t uid, gid_t gid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* paste dir/file into buf */
|
||||
static inline int paste(char *buf, size_t len, const char *dir, const char *file)
|
||||
{
|
||||
if (!dir)
|
||||
dir = "";
|
||||
if (!file)
|
||||
file = "";
|
||||
|
||||
return snprintf(buf, len, "%s%s%s", dir, fisslashdir(dir) ? "" : "/", file);
|
||||
}
|
||||
|
||||
int ismnt (char *file, char *dir, char *mode);
|
||||
int fismnt (char *dir);
|
||||
|
||||
|
||||
Reference in new issue
Block a user