summaryrefslogtreecommitdiff
path: root/src/firstboot
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-03 02:05:59 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-03 02:05:59 +0100
commit63c372cb9df3bee01e3bf8cd7f96f336bddda846 (patch)
treebf4d1b6e41f72927a2b58e7dd21daa0c496aaa96 /src/firstboot
parent44de0efc6e406515fc1cf8b95d9655d0d7f7ffff (diff)
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.
Diffstat (limited to 'src/firstboot')
-rw-r--r--src/firstboot/firstboot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index a160c52fee..a765d6d219 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -50,7 +50,7 @@ static bool arg_copy_locale = false;
static bool arg_copy_timezone = false;
static bool arg_copy_root_password = false;
-#define prefix_roota(p) (arg_root ? (const char*) strappenda(arg_root, p) : (const char*) p)
+#define prefix_roota(p) (arg_root ? (const char*) strjoina(arg_root, p) : (const char*) p)
static void clear_string(char *x) {
@@ -271,9 +271,9 @@ static int process_locale(void) {
return r;
if (!isempty(arg_locale))
- locales[i++] = strappenda("LANG=", arg_locale);
+ locales[i++] = strjoina("LANG=", arg_locale);
if (!isempty(arg_locale_messages) && !streq(arg_locale_messages, arg_locale))
- locales[i++] = strappenda("LC_MESSAGES=", arg_locale_messages);
+ locales[i++] = strjoina("LC_MESSAGES=", arg_locale_messages);
if (i == 0)
return 0;
@@ -351,7 +351,7 @@ static int process_timezone(void) {
if (isempty(arg_timezone))
return 0;
- e = strappenda("../usr/share/zoneinfo/", arg_timezone);
+ e = strjoina("../usr/share/zoneinfo/", arg_timezone);
mkdir_parents(etc_localtime, 0755);
if (symlink(e, etc_localtime) < 0)
@@ -460,8 +460,8 @@ static int prompt_root_password(void) {
print_welcome();
putchar('\n');
- msg1 = strappenda(draw_special_char(DRAW_TRIANGULAR_BULLET), " Please enter a new root password (empty to skip): ");
- msg2 = strappenda(draw_special_char(DRAW_TRIANGULAR_BULLET), " Please enter new root password again: ");
+ msg1 = strjoina(draw_special_char(DRAW_TRIANGULAR_BULLET), " Please enter a new root password (empty to skip): ");
+ msg2 = strjoina(draw_special_char(DRAW_TRIANGULAR_BULLET), " Please enter new root password again: ");
for (;;) {
_cleanup_free_ char *a = NULL, *b = NULL;