summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/textfile.c4
-rw-r--r--common/textfile.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/common/textfile.c b/common/textfile.c
index 076ec35b..f8b9545e 100644
--- a/common/textfile.c
+++ b/common/textfile.c
@@ -88,9 +88,9 @@ int create_file(const char *filename, const mode_t mode)
return 0;
}
-int create_name(char *buf, size_t size, char *address, char *name)
+int create_name(char *buf, size_t size, const char *path, const char *address, const char *name)
{
- return snprintf(buf, size, "%s/%s/%s", STORAGEDIR, address, name);
+ return snprintf(buf, size, "%s/%s/%s", path, address, name);
}
static inline char *find_key(char *map, const char *key, size_t len)
diff --git a/common/textfile.h b/common/textfile.h
index 21aa023d..74e67eca 100644
--- a/common/textfile.h
+++ b/common/textfile.h
@@ -26,7 +26,8 @@
int create_dirs(const char *filename, const mode_t mode);
int create_file(const char *filename, const mode_t mode);
-int create_name(char *buf, size_t size, char *address, char *name);
+int create_name(char *buf, size_t size, const char *path,
+ const char *address, const char *name);
int textfile_put(const char *pathname, const char *key, const char *value);
int textfile_del(const char *pathname, const char *key);