chiark / gitweb /
notify,firstboot,analyze,run: trim --help output to 80 lines
[elogind.git] / src / firstboot / firstboot.c
index d8fbd5945f3c80a137e897f96590ae3223fa3ebb..a160c52feee2ba828c2bc446a64fa5783501032e 100644 (file)
@@ -256,7 +256,7 @@ static int process_locale(void) {
         if (arg_copy_locale && arg_root) {
 
                 mkdir_parents(etc_localeconf, 0755);
-                r = copy_file("/etc/locale.conf", etc_localeconf, 0, 0644);
+                r = copy_file("/etc/locale.conf", etc_localeconf, 0, 0644, 0);
                 if (r != -ENOENT) {
                         if (r < 0)
                                 return log_error_errno(r, "Failed to copy %s: %m", etc_localeconf);
@@ -336,10 +336,8 @@ static int process_timezone(void) {
                                 return log_error_errno(r, "Failed to read host timezone: %m");
 
                         mkdir_parents(etc_localtime, 0755);
-                        if (symlink(p, etc_localtime) < 0) {
-                                log_error_errno(errno, "Failed to create %s symlink: %m", etc_localtime);
-                                return -errno;
-                        }
+                        if (symlink(p, etc_localtime) < 0)
+                                return log_error_errno(errno, "Failed to create %s symlink: %m", etc_localtime);
 
                         log_info("%s copied.", etc_localtime);
                         return 0;
@@ -356,10 +354,8 @@ static int process_timezone(void) {
         e = strappenda("../usr/share/zoneinfo/", arg_timezone);
 
         mkdir_parents(etc_localtime, 0755);
-        if (symlink(e, etc_localtime) < 0) {
-                log_error_errno(errno, "Failed to create %s symlink: %m", etc_localtime);
-                return -errno;
-        }
+        if (symlink(e, etc_localtime) < 0)
+                return log_error_errno(errno, "Failed to create %s symlink: %m", etc_localtime);
 
         log_info("%s written", etc_localtime);
         return 0;
@@ -635,7 +631,7 @@ static void help(void) {
                "     --prompt-timezone         Prompt the user for timezone\n"
                "     --prompt-hostname         Prompt the user for hostname\n"
                "     --prompt-root-password    Prompt the user for root password\n"
-               "     --prompt                  Prompt for locale, timezone, hostname, root password\n"
+               "     --prompt                  Prompt for all of the above\n"
                "     --copy-locale             Copy locale from host\n"
                "     --copy-timezone           Copy timezone from host\n"
                "     --copy-root-password      Copy root password from host\n"