From 63c372cb9df3bee01e3bf8cd7f96f336bddda846 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 3 Feb 2015 02:05:59 +0100 Subject: util: rework strappenda(), and rename it strjoina() After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary. --- src/getty-generator/getty-generator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/getty-generator') diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 931651e161..f8f5fb30c2 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -41,8 +41,8 @@ static int add_symlink(const char *fservice, const char *tservice) { assert(fservice); assert(tservice); - from = strappenda(SYSTEM_DATA_UNIT_PATH "/", fservice); - to = strappenda(arg_dest, "/getty.target.wants/", tservice); + from = strjoina(SYSTEM_DATA_UNIT_PATH "/", fservice); + to = strjoina(arg_dest, "/getty.target.wants/", tservice); mkdir_parents_label(to, 0755); @@ -97,7 +97,7 @@ static int verify_tty(const char *name) { * friends. Let's check that and open the device and run * isatty() on it. */ - p = strappenda("/dev/", name); + p = strjoina("/dev/", name); /* O_NONBLOCK is essential here, to make sure we don't wait * for DCD */ @@ -218,7 +218,7 @@ int main(int argc, char *argv[]) { NULSTR_FOREACH(j, virtualization_consoles) { char *p; - p = strappenda("/sys/class/tty/", j); + p = strjoina("/sys/class/tty/", j); if (access(p, F_OK) < 0) continue; -- cgit v1.2.1