From ab767dcf7cf79a3411a5199b97b42e97ef80dbfc Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 26 Jul 2006 12:58:09 +0000 Subject: Add create_name() helper function --- common/textfile.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/textfile.c') diff --git a/common/textfile.c b/common/textfile.c index cdb42d13..076ec35b 100644 --- a/common/textfile.c +++ b/common/textfile.c @@ -88,6 +88,11 @@ int create_file(const char *filename, const mode_t mode) return 0; } +int create_name(char *buf, size_t size, char *address, char *name) +{ + return snprintf(buf, size, "%s/%s/%s", STORAGEDIR, address, name); +} + static inline char *find_key(char *map, const char *key, size_t len) { char *off = strstr(map, key); -- cgit