]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
use "Out of memory." consistantly (or with "\n")
authorShawn Landden <shawnlandden@gmail.com>
Wed, 25 Jul 2012 04:12:43 +0000 (21:12 -0700)
committerKay Sievers <kay@vrfy.org>
Wed, 25 Jul 2012 09:23:57 +0000 (11:23 +0200)
glibc/glib both use "out of memory" consistantly so maybe we should
consider that instead of this.

Eliminates one string out of a number of binaries. Also fixes extra newline
in udev/scsi_id

36 files changed:
src/cgtop/cgtop.c
src/core/cgroup.c
src/core/dbus.c
src/core/manager.c
src/cryptsetup/cryptsetup-generator.c
src/cryptsetup/cryptsetup.c
src/fsck/fsck.c
src/fstab-generator/fstab-generator.c
src/getty-generator/getty-generator.c
src/hostname/hostnamed.c
src/journal/coredump.c
src/journal/journalctl.c
src/journal/journald.c
src/locale/localed.c
src/login/logind-button.c
src/login/logind-session.c
src/login/logind-user.c
src/login/logind.c
src/login/multi-seat-x.c
src/modules-load/modules-load.c
src/nspawn/nspawn.c
src/rc-local-generator/rc-local-generator.c
src/readahead/readahead-collect.c
src/readahead/readahead-replay.c
src/shared/ask-password-api.c
src/shared/dbus-common.c
src/shared/logs-show.c
src/shared/util.c
src/shutdownd/shutdownd.c
src/sysctl/sysctl.c
src/systemctl/systemctl.c
src/timedate/timedated.c
src/tmpfiles/tmpfiles.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/collect/collect.c
src/udev/scsi_id/scsi_id.c

index 5557094a4f8bfb3ba5678a9731eb4dfd57c61401..c3824c79798eb941e56c8e5a20a5c9272a2247ec 100644 (file)
@@ -608,7 +608,7 @@ int main(int argc, char *argv[]) {
         a = hashmap_new(string_hash_func, string_compare_func);
         b = hashmap_new(string_hash_func, string_compare_func);
         if (!a || !b) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
index aaea96b820a595069e26d96195d9a2b0785a63ec..1322f63eeef3647c9f361b6b597c0025a818d7d6 100644 (file)
@@ -330,7 +330,7 @@ int manager_setup_cgroup(Manager *m) {
                 /* We need a new root cgroup */
                 m->cgroup_hierarchy = NULL;
                 if (asprintf(&m->cgroup_hierarchy, "%s%s", streq(current, "/") ? "" : current, suffix) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
index 1bc83a2c2aa98e1423cd91922f6506e156e3e7de..0c1351714336e4120a0b2b098a659b836b397eeb 100644 (file)
@@ -724,12 +724,12 @@ static int bus_setup_loop(Manager *m, DBusConnection *bus) {
 
         if (!dbus_connection_set_watch_functions(bus, bus_add_watch, bus_remove_watch, bus_toggle_watch, m, NULL) ||
             !dbus_connection_set_timeout_functions(bus, bus_add_timeout, bus_remove_timeout, bus_toggle_timeout, m, NULL)) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
         if (set_put(m->bus_connections_for_dispatch, bus) < 0) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -764,7 +764,7 @@ static void bus_new_connection(
             !dbus_connection_register_fallback(new_connection, "/org/freedesktop/systemd1/unit", &bus_unit_vtable, m) ||
             !dbus_connection_register_fallback(new_connection, "/org/freedesktop/systemd1/job", &bus_job_vtable, m) ||
             !dbus_connection_add_filter(new_connection, private_bus_message_filter, m, NULL)) {
-                log_error("Not enough memory.");
+                log_error("Out of memory.");
                 return;
         }
 
@@ -777,7 +777,7 @@ static int init_registered_system_bus(Manager *m) {
         char *id;
 
         if (!dbus_connection_add_filter(m->system_bus, system_bus_message_filter, m, NULL)) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -815,7 +815,7 @@ static int init_registered_api_bus(Manager *m) {
             !dbus_connection_register_fallback(m->api_bus, "/org/freedesktop/systemd1/unit", &bus_unit_vtable, m) ||
             !dbus_connection_register_fallback(m->api_bus, "/org/freedesktop/systemd1/job", &bus_job_vtable, m) ||
             !dbus_connection_add_filter(m->api_bus, api_bus_message_filter, m, NULL)) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -1090,7 +1090,7 @@ static int bus_init_private(Manager *m) {
                         return 0;
 
                 if (asprintf(&p, "unix:path=%s/systemd/private", e) < 0) {
-                        log_error("Not enough memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto fail;
                 }
@@ -1110,7 +1110,7 @@ static int bus_init_private(Manager *m) {
         if (!dbus_server_set_auth_mechanisms(m->private_bus, (const char**) external_only) ||
             !dbus_server_set_watch_functions(m->private_bus, bus_add_watch, bus_remove_watch, bus_toggle_watch, m, NULL) ||
             !dbus_server_set_timeout_functions(m->private_bus, bus_add_timeout, bus_remove_timeout, bus_toggle_timeout, m, NULL)) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto fail;
         }
@@ -1158,7 +1158,7 @@ int bus_init(Manager *m, bool try_bus_connect) {
 
         return 0;
 oom:
-        log_error("Not enough memory");
+        log_error("Out of memory.");
         return -ENOMEM;
 }
 
index 48305e373a5d8864f3bf06ff6f7c4328ac9b7d78..42a9490242abfaae21d2eaec82e50f0747e72f2b 100644 (file)
@@ -1625,7 +1625,7 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) {
         }
 
         if (asprintf(&message, "U\002%c%s%n", (int) (strlen(u->id) + 1), u->id, &n) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 goto finish;
         }
 
@@ -2074,7 +2074,7 @@ static int create_generator_dir(Manager *m, char **generator, const char *name)
 
                 p = strappend("/run/systemd/", name);
                 if (!p) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
 
@@ -2087,7 +2087,7 @@ static int create_generator_dir(Manager *m, char **generator, const char *name)
         } else {
                 p = strjoin("/tmp/systemd-", name, ".XXXXXX", NULL);
                 if (!p) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
 
index d0984242c803c53b52670014c5ae04799a6b7862..fb6b4d25c03cdaf21042214e469a4485b0132de1 100644 (file)
@@ -303,7 +303,7 @@ static int parse_proc_cmdline(void) {
 
                         t = strv_append(arg_proc_cmdline_disks, word + 10);
                         if (!t) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 r = -ENOMEM;
                                 goto finish;
                         }
@@ -317,7 +317,7 @@ static int parse_proc_cmdline(void) {
 
                                 t = strv_append(arg_proc_cmdline_disks, word + 13);
                                 if (!t) {
-                                        log_error("Out of memory");
+                                        log_error("Out of memory.");
                                         r = -ENOMEM;
                                         goto finish;
                                 }
@@ -380,7 +380,7 @@ int main(int argc, char *argv[]) {
                 device = strappend("UUID=", *i);
 
                 if (!name || !device) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = EXIT_FAILURE;
                         free(name);
                         free(device);
index f570724b9d8c0105d26c12715e0a3521c42b55b4..9d4e77364d072550493a1e1b2a707720c3587468 100644 (file)
@@ -343,7 +343,7 @@ int main(int argc, char *argv[]) {
                         l = strcspn(opt_cipher, "-");
 
                         if (!(truncated_cipher = strndup(opt_cipher, l))) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 goto finish;
                         }
 
@@ -365,7 +365,7 @@ int main(int argc, char *argv[]) {
                                 char **p;
 
                                 if (asprintf(&text, "Please enter passphrase for disk %s!", name) < 0) {
-                                        log_error("Out of memory");
+                                        log_error("Out of memory.");
                                         goto finish;
                                 }
 
@@ -383,7 +383,7 @@ int main(int argc, char *argv[]) {
                                         assert(strv_length(passwords) == 1);
 
                                         if (asprintf(&text, "Please enter passphrase for disk %s! (verification)", name) < 0) {
-                                                log_error("Out of memory");
+                                                log_error("Out of memory.");
                                                 goto finish;
                                         }
 
index 833f3f74a66718905635e0a4a8f6013ceb29793f..036d3c5b414cb1dbab1e9295589e5b5be78749b6 100644 (file)
@@ -297,7 +297,7 @@ int main(int argc, char *argv[]) {
                 }
 
                 if (!(udev = udev_new())) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         goto finish;
                 }
 
index 3a59b85d665b5884cbcabc801c91e4bde7e9243c..89a4d13504fb67d32b66ff497fde58b541a74016 100644 (file)
@@ -98,14 +98,14 @@ static int add_swap(const char *what, struct mntent *me) {
 
         name = unit_name_from_path(what, ".swap");
         if (!name) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
 
         unit = strjoin(arg_dest, "/", name, NULL);
         if (!unit) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -148,7 +148,7 @@ static int add_swap(const char *what, struct mntent *me) {
         if (!noauto) {
                 lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL);
                 if (!lnk) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -162,7 +162,7 @@ static int add_swap(const char *what, struct mntent *me) {
 
                 r = device_name(what, &device);
                 if (r < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -171,7 +171,7 @@ static int add_swap(const char *what, struct mntent *me) {
                         free(lnk);
                         lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL);
                         if (!lnk) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 r = -ENOMEM;
                                 goto finish;
                         }
@@ -256,14 +256,14 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
 
         name = unit_name_from_path(where, ".mount");
         if (!name)  {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
 
         unit = strjoin(arg_dest, "/", name, NULL);
         if (!unit) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -323,7 +323,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
         if (!noauto) {
                 lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL);
                 if (!lnk) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -340,7 +340,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
 
                         r = device_name(what, &device);
                         if (r < 0) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 r = -ENOMEM;
                                 goto finish;
                         }
@@ -349,7 +349,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
                                 free(lnk);
                                 lnk = strjoin(arg_dest, "/", device, ".wants/", name, NULL);
                                 if (!lnk) {
-                                        log_error("Out of memory");
+                                        log_error("Out of memory.");
                                         r = -ENOMEM;
                                         goto finish;
                                 }
@@ -367,14 +367,14 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
         if (automount && !path_equal(where, "/")) {
                 automount_name = unit_name_from_path(where, ".automount");
                 if (!name) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
 
                 automount_unit = strjoin(arg_dest, "/", automount_name, NULL);
                 if (!automount_unit) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -410,7 +410,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) {
                 free(lnk);
                 lnk = strjoin(arg_dest, "/", post, nofail ? ".wants/" : ".requires/", automount_name, NULL);
                 if (!lnk) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -459,14 +459,14 @@ static int parse_fstab(void) {
 
                 what = fstab_node_to_udev_node(me->mnt_fsname);
                 if (!what) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
 
                 where = strdup(me->mnt_dir);
                 if (!where) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         free(what);
                         r = -ENOMEM;
                         goto finish;
index b2e3eb63932235ce9bd0e4c6ed6ca81b49322e20..9e46a47a9ae9adbe86d68685f908b33c95b63cbb 100644 (file)
@@ -42,7 +42,7 @@ static int add_symlink(const char *fservice, const char *tservice) {
         to = strjoin(arg_dest,"/getty.target.wants/", tservice, NULL);
 
         if (!from || !to) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -78,7 +78,7 @@ static int add_serial_getty(const char *tty) {
 
         n = unit_name_replace_instance("serial-getty@.service", tty);
         if (!n) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -160,7 +160,7 @@ int main(int argc, char *argv[]) {
                 int k;
 
                 if (asprintf(&p, "/sys/class/tty/%s", j) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = EXIT_FAILURE;
                         goto finish;
                 }
index 67c56f33136715887896d763260ee3bd1f7359d6..7dab5f40df14a7db591a655e6afa36a5ac52a87c 100644 (file)
@@ -532,7 +532,7 @@ static int connect_bus(DBusConnection **_bus) {
 
         if (!dbus_connection_register_object_path(bus, "/org/freedesktop/hostname1", &hostname_vtable, NULL) ||
             !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto fail;
         }
index fcd0d1e625e782cb543e1b1b7d8599de4d024b6e..cfd3a910d99247785fbeb634bd9de85472694067 100644 (file)
@@ -239,7 +239,7 @@ int main(int argc, char* argv[]) {
 
         p = malloc(9 + COREDUMP_MAX);
         if (!p) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
index e633dd34d77841437ee1e73a9e463cee2b076d2e..a9cf9cd957445441b045b345b3ca22a89e1a74f5 100644 (file)
@@ -256,7 +256,7 @@ static int add_matches(sd_journal *j, char **args) {
                                 t = strappend("_EXE=", path);
                                 if (!t) {
                                         free(p);
-                                        log_error("Out of memory");
+                                        log_error("Out of memory.");
                                         return -ENOMEM;
                                 }
 
index 36f9abe47ecd957e347a45f7be11e0a09840e2fa..ae1fbc4bd451952aa5660d58774be7f632de9a52 100644 (file)
@@ -1270,7 +1270,7 @@ static void process_native_message(
                         u = MAX((n+N_IOVEC_META_FIELDS+1) * 2U, 4U);
                         c = realloc(iovec, u * sizeof(struct iovec));
                         if (!c) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 break;
                         }
 
@@ -1357,7 +1357,7 @@ static void process_native_message(
 
                         k = malloc((e - p) + 1 + l);
                         if (!k) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 break;
                         }
 
@@ -1450,7 +1450,7 @@ static void process_native_file(
 
         p = malloc(st.st_size);
         if (!p) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return;
         }
 
@@ -1543,7 +1543,7 @@ static int stdout_stream_line(StdoutStream *s, char *p) {
                 else  {
                         s->identifier = strdup(p);
                         if (!s->identifier) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 return -ENOMEM;
                         }
                 }
@@ -1558,7 +1558,7 @@ static int stdout_stream_line(StdoutStream *s, char *p) {
                         else  {
                                 s->unit_id = strdup(p);
                                 if (!s->unit_id) {
-                                        log_error("Out of memory");
+                                        log_error("Out of memory.");
                                         return -ENOMEM;
                                 }
                         }
index 56fb339e19cd023f33d5dd76120ea88b8b6a288d..b8007d72fd6eb4b512d4101f638ddeb90c1b5987 100644 (file)
@@ -425,7 +425,7 @@ static void push_data(DBusConnection *bus) {
         l_set = new0(char*, _PROP_MAX);
         l_unset = new0(char*, _PROP_MAX);
         if (!l_set || !l_unset) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 goto finish;
         }
 
@@ -438,7 +438,7 @@ static void push_data(DBusConnection *bus) {
                         char *s;
 
                         if (asprintf(&s, "%s=%s", names[p], data[p]) < 0) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 goto finish;
                         }
 
@@ -1344,7 +1344,7 @@ static int connect_bus(DBusConnection **_bus) {
 
         if (!dbus_connection_register_object_path(bus, "/org/freedesktop/locale1", &locale_vtable, NULL) ||
             !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto fail;
         }
index 8b59c2b0c36be02f961af1aa5b5b35605f463a04..62e0c3dbbae0021420c70066d1c1b70d490b6e55 100644 (file)
@@ -108,7 +108,7 @@ int button_open(Button *b) {
 
         p = strappend("/dev/input/", b->name);
         if (!p) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
index 819596ddbe58fe82f6281afea125c16756edf204..a43ecad2b1d46750213198e053cc955fc35e48cf 100644 (file)
@@ -375,7 +375,7 @@ static int session_link_x11_socket(Session *s) {
         k = strspn(s->display+1, "0123456789");
         f = new(char, sizeof("/tmp/.X11-unix/X") + k);
         if (!f) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -395,7 +395,7 @@ static int session_link_x11_socket(Session *s) {
 
         t = strappend(s->user->runtime_path, "/X11-display");
         if (!t) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 free(f);
                 return -ENOMEM;
         }
@@ -469,7 +469,7 @@ static int session_create_cgroup(Session *s) {
 
         if (!s->cgroup_path) {
                 if (asprintf(&p, "%s/%s", s->user->cgroup_path, s->id) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
         } else
@@ -670,7 +670,7 @@ static int session_unlink_x11_socket(Session *s) {
 
         t = strappend(s->user->runtime_path, "/X11-display");
         if (!t) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
index 0a3f22ce9965d60fdb048683bcc11ce84fe28015..fca68159a7c556e43f48c96fde23aeb1beae235c 100644 (file)
@@ -260,7 +260,7 @@ static int user_mkdir_runtime_path(User *u) {
 
         if (!u->runtime_path) {
                 if (asprintf(&p, "/run/user/%lu", (unsigned long) u->uid) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
         } else
@@ -287,7 +287,7 @@ static int user_create_cgroup(User *u) {
 
         if (!u->cgroup_path) {
                 if (asprintf(&p, "%s/%s", u->manager->cgroup_path, u->name) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
         } else
index 07755831477e6c3a36287f375a067f7d656e288e..1cfb7fa9ac73059e6fb6828e8a23f6e0b6ce951d 100644 (file)
@@ -1176,7 +1176,7 @@ static int manager_connect_bus(Manager *m) {
             !dbus_connection_register_fallback(m->bus, "/org/freedesktop/login1/session", &bus_session_vtable, m) ||
             !dbus_connection_register_fallback(m->bus, "/org/freedesktop/login1/user", &bus_user_vtable, m) ||
             !dbus_connection_add_filter(m->bus, bus_message_filter, m, NULL)) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto fail;
         }
@@ -1611,7 +1611,7 @@ int main(int argc, char *argv[]) {
 
         m = manager_new();
         if (!m) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
index 92014f5316489eee976a31e531094e6cf33e17dd..a1fab86f6ae1f8998445ec4a37a8878964740ecb 100644 (file)
@@ -121,7 +121,7 @@ int main(int argc, char *argv[]) {
 
         path = strappend("/run/systemd/multi-session-x/", seat);
         if (!path) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 goto fail;
         }
 
index d6bc16d34086b140b5ea7c98d68b439bd188fd3d..e73ba7f2418a14b73c464e0234e5381933633475 100644 (file)
@@ -50,14 +50,14 @@ static int add_modules(const char *p) {
 
         k = strv_split(p, ",");
         if (!k) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
         t = strv_merge(arg_proc_cmdline_modules, k);
         strv_free(k);
         if (!t) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
index 1d7511e2ab690aa4d5c5c5090bab1a3c131e6a97..355a103edfa34040b0833c600405b0a6fe032962 100644 (file)
@@ -289,7 +289,7 @@ static int mount_all(const char *dest) {
                 int t;
 
                 if (asprintf(&where, "%s/%s", dest, mount_table[k].where) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
 
                         if (r == 0)
                                 r = -ENOMEM;
@@ -336,7 +336,7 @@ static int setup_timezone(const char *dest) {
 
         /* Fix the timezone, if possible */
         if (asprintf(&where, "%s/etc/localtime", dest) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -346,7 +346,7 @@ static int setup_timezone(const char *dest) {
         free(where);
 
         if (asprintf(&where, "%s/etc/timezone", dest) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -368,7 +368,7 @@ static int setup_resolv_conf(const char *dest) {
 
         /* Fix resolv.conf, if possible */
         if (asprintf(&where, "%s/etc/resolv.conf", dest) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -480,7 +480,7 @@ static int setup_dev_console(const char *dest, const char *console) {
         }
 
         if (asprintf(&to, "%s/dev/console", dest) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -535,13 +535,13 @@ static int setup_kmsg(const char *dest, int kmsg_socket) {
          * avoid any problems with containers deadlocking due to this
          * we simply make /dev/kmsg unavailable to the container. */
         if (asprintf(&from, "%s/dev/kmsg", dest) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
 
         if (asprintf(&to, "%s/proc/kmsg", dest) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -639,7 +639,7 @@ static int setup_journal(const char *directory) {
 
         p = strappend(directory, "/etc/machine-id");
         if (!p) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -670,7 +670,7 @@ static int setup_journal(const char *directory) {
         p = strappend("/var/log/journal/", l);
         q = strjoin(directory, "/var/log/journal/", l, NULL);
         if (!p || !q) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -1296,13 +1296,13 @@ int main(int argc, char *argv[]) {
                 if ((asprintf((char**)(envp + 3), "HOME=%s", home ? home: "/root") < 0) ||
                     (asprintf((char**)(envp + 4), "USER=%s", arg_user ? arg_user : "root") < 0) ||
                     (asprintf((char**)(envp + 5), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) {
-                    log_error("Out of memory");
+                    log_error("Out of memory.");
                     goto child_fail;
                 }
 
                 if (arg_uuid) {
                         if (asprintf((char**)(envp + 6), "container_uuid=%s", arg_uuid) < 0) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 goto child_fail;
                         }
                 }
index f41a6bf265f9f0a5fdcec807baa0aa10f0ccedc2..9fafa29f2212919a8385f6abda195e146df78867 100644 (file)
@@ -48,7 +48,7 @@ static int add_symlink(const char *service, const char *where) {
         asprintf(&to, "%s/%s.wants/%s", arg_dest, where, service);
 
         if (!from || !to) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
index 8dacf6af5ca3c409c5017d779e823edc691529d9..45d489a60ef95805f154972defcd8377f8db0efd 100644 (file)
@@ -242,7 +242,7 @@ static int collect(const char *root) {
         assert(root);
 
         if (asprintf(&pack_fn, "%s/.readahead", root) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -477,7 +477,7 @@ done:
         log_debug("On btrfs: %s", yes_no(on_btrfs));
 
         if (asprintf(&pack_fn_new, "%s/.readahead.new", root) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
@@ -510,7 +510,7 @@ done:
 
                 n = hashmap_size(files);
                 if (!(ordered = new(struct item, n))) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
index 7bd079aae591c5459617313401fd102ae282fcca..f90821e831e67b28f6ad363b33d1e8f0ccf29ebf 100644 (file)
@@ -150,7 +150,7 @@ static int replay(const char *root) {
         block_bump_request_nr(root);
 
         if (asprintf(&pack_fn, "%s/.readahead", root) < 0) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto finish;
         }
index 4333bfb564ae8b0b034f7a4b81a75d8a9a244516..005f40fef7caea2cc98e1ac6f684b5d194f8b83f 100644 (file)
@@ -282,7 +282,7 @@ static int create_socket(char **name) {
 
         if (!(c = strdup(sa.un.sun_path))) {
                 r = -ENOMEM;
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 goto fail;
         }
 
index 7d57680cfc1a0db8a22f919d945816635ed53a91..ab1dc4d7e42f99d484c4014d18277b03bb2b50fc 100644 (file)
@@ -1161,7 +1161,7 @@ void bus_async_unregister_and_exit(DBusConnection *bus, const char *name) {
         return;
 
 oom:
-        log_error("Out of memory");
+        log_error("Out of memory.");
 
         if (pending) {
                 dbus_pending_call_cancel(pending);
index a68cd3de57bff6f175bbba920c273185501596d5..f90f5a1f0d9b0da8fb12f69c41a267173999b36e 100644 (file)
@@ -53,7 +53,7 @@ static int parse_field(const void *data, size_t length, const char *field, char
         memcpy(buf, (const char*) data + fl, nl);
         ((char*)buf)[nl] = 0;
         if (!buf) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
index 43ec62eac653d67a10190187c82eb0c76a551934..2e7ae63db2e50253d4a50ad42b2243bab13dd98d 100644 (file)
@@ -909,7 +909,7 @@ int load_env_file(
                         continue;
 
                 if (!(u = normalize_env_assignment(p))) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -918,7 +918,7 @@ int load_env_file(
                 free(u);
 
                 if (!t) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -4278,7 +4278,7 @@ void execute_directory(const char *directory, DIR *d, char *argv[]) {
                         continue;
 
                 if (asprintf(&path, "%s/%s", directory, de->d_name) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         continue;
                 }
 
index 6eb8ed9bf8ee2af14d91c25613f0cd3bf88acd79..9dd13361331fefedf8bec03a7ecb867b620ee246 100644 (file)
@@ -213,7 +213,7 @@ static int update_schedule_file(struct sd_shutdown_command *c) {
 
         t = cescape(c->wall_message);
         if (!t) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
index 72a74f9e44340126453013eaa15768aef326b507..b463c7fac741e5ba7f2f8628437e20e942590755 100644 (file)
@@ -46,7 +46,7 @@ static int apply_sysctl(const char *property, const char *value) {
 
         p = new(char, sizeof(PROC_SYS_PREFIX) + strlen(property));
         if (!p) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -192,7 +192,7 @@ static int parse_argv(int argc, char *argv[]) {
 
                         l = strv_append(arg_prefixes, optarg);
                         if (!l) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 return -ENOMEM;
                         }
 
index a13fc1a8f025ceafa683eda3e786f4afd55a9b43..d493733761d6349ffe65d792c92370985055c5b1 100644 (file)
@@ -658,7 +658,7 @@ static int list_unit_files(DBusConnection *bus, char **args) {
 
                 h = hashmap_new(string_hash_func, string_compare_func);
                 if (!h) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
 
@@ -673,7 +673,7 @@ static int list_unit_files(DBusConnection *bus, char **args) {
                 units = new(UnitFileList, n_units);
                 if (!units) {
                         unit_file_list_free(h);
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return -ENOMEM;
                 }
 
@@ -2637,7 +2637,7 @@ static void show_unit_help(UnitStatusInfo *i) {
                                 section = strndup(e + 1, *p + k - e - 2);
                                 if (!section) {
                                         free(page);
-                                        log_error("Out of memory");
+                                        log_error("Out of memory.");
                                         return;
                                 }
 
@@ -3283,7 +3283,7 @@ static int show(DBusConnection *bus, char **args) {
                         p = unit_dbus_path_from_name(n ? n : *name);
                         free(n);
                         if (!p) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 return -ENOMEM;
                         }
 
@@ -3299,7 +3299,7 @@ static int show(DBusConnection *bus, char **args) {
 
                         char *p;
                         if (asprintf(&p, "/org/freedesktop/systemd1/job/%u", id) < 0) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 return -ENOMEM;
                         }
 
@@ -3974,7 +3974,7 @@ static int enable_sysv_units(char **args) {
                                 asprintf(&p, "%s/%s", *k, name);
 
                         if (!p) {
-                                log_error("No memory");
+                                log_error("Out of memory.");
                                 r = -ENOMEM;
                                 goto finish;
                         }
@@ -3995,7 +3995,7 @@ static int enable_sysv_units(char **args) {
                 else
                         asprintf(&p, SYSTEM_SYSVINIT_PATH "/%s", name);
                 if (!p) {
-                        log_error("No memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -4024,7 +4024,7 @@ static int enable_sysv_units(char **args) {
 
                 l = strv_join((char**)argv, " ");
                 if (!l) {
-                        log_error("No memory.");
+                        log_error("Out of memory.");
                         free(q);
                         free(p);
                         r = -ENOMEM;
@@ -4184,7 +4184,7 @@ static int enable_unit(DBusConnection *bus, char **args) {
                                 "org.freedesktop.systemd1.Manager",
                                 method);
                 if (!m) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -4339,7 +4339,7 @@ static int unit_is_enabled(DBusConnection *bus, char **args) {
                                         "org.freedesktop.systemd1.Manager",
                                         "GetUnitFileState");
                         if (!m) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 r = -ENOMEM;
                                 goto finish;
                         }
index 237eb248949675d5b167f2180642f0c163123ee1..3fef9e8844bc09225b3dab162c597d71004737d3 100644 (file)
@@ -153,7 +153,7 @@ static void verify_timezone(void) {
 
         p = strappend("/usr/share/zoneinfo/", tz.zone);
         if (!p) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return;
         }
 
@@ -220,7 +220,7 @@ static int write_data_timezone(void) {
 
         p = strappend("/usr/share/zoneinfo/", tz.zone);
         if (!p) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -341,7 +341,7 @@ static char** get_ntp_services(void) {
 
                         q = strv_append(r, l);
                         if (!q) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 break;
                         }
 
@@ -379,7 +379,7 @@ static int read_ntp(DBusConnection *bus) {
                                 "org.freedesktop.systemd1.Manager",
                                 "GetUnitFileState");
                 if (!m) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -943,7 +943,7 @@ static int connect_bus(DBusConnection **_bus) {
 
         if (!dbus_connection_register_object_path(bus, "/org/freedesktop/timedate1", &timedate_vtable, NULL) ||
             !dbus_connection_add_filter(bus, bus_exit_idle_filter, &remain_until, NULL)) {
-                log_error("Not enough memory");
+                log_error("Out of memory.");
                 r = -ENOMEM;
                 goto fail;
         }
index 45125b7b946ee7a2bf59d1b11d52739506bce35b..f8d89218c9a4f3825a2b3c1c087b58a8ce546949 100644 (file)
@@ -260,7 +260,7 @@ static int dir_cleanup(
                 sub_path = NULL;
 
                 if (asprintf(&sub_path, "%s/%s", p, dent->d_name) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -970,7 +970,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
 
         i = new0(Item, 1);
         if (!i) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 return -ENOMEM;
         }
 
@@ -999,7 +999,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
                 if (buffer[n] != 0 && (buffer[n] != '-' || buffer[n+1] != 0)) {
                         i->argument = unquote(buffer+n, "\"");
                         if (!i->argument) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 return -ENOMEM;
                         }
                 }
@@ -1302,7 +1302,7 @@ static char *resolve_fragment(const char *fragment, const char **search_paths) {
         STRV_FOREACH(p, search_paths) {
                 resolved_path = strjoin(*p, "/", fragment, NULL);
                 if (resolved_path == NULL) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         return NULL;
                 }
 
@@ -1337,7 +1337,7 @@ int main(int argc, char *argv[]) {
         globs = hashmap_new(string_hash_func, string_compare_func);
 
         if (!items || !globs) {
-                log_error("Out of memory");
+                log_error("Out of memory.");
                 r = EXIT_FAILURE;
                 goto finish;
         }
index 2ab3401e6f93c3c125ad568b05eb0d160cc6b2ad..403e8cd3c641a48c67568ecc7d117985e37d48cc 100644 (file)
@@ -315,7 +315,7 @@ static int parse_password(const char *filename, char **wall) {
                              *wall ? "\r\n\r\n" : "",
                              message,
                              pid) < 0) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
@@ -533,7 +533,7 @@ static int show_passwords(void) {
                         continue;
 
                 if (!(p = strappend("/run/systemd/ask-password/", de->d_name))) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = -ENOMEM;
                         goto finish;
                 }
index 80f464aff0040d9e67a34419a2445a8072e70882..4162c436b0e21ec4b3cb47c6b8b2dca0c378d2e8 100644 (file)
@@ -141,7 +141,7 @@ static int checkout(int fd)
         len = bufsize >> 1;
         buf = calloc(1,bufsize + 1);
         if (!buf) {
-                fprintf(stderr, "Out of memory\n");
+                fprintf(stderr, "Out of memory.\n");
                 return -1;
         }
         memset(buf, ' ', bufsize);
index 6fc41e94fb3ad9bb92b274d6a6bbd388783cbaa3..0bb1bc495a5d969f956413302f7aebbe7eb7d3ff 100644 (file)
@@ -198,7 +198,7 @@ static int get_file_options(struct udev *udev,
         buffer = malloc(MAX_BUFFER_LEN);
         if (!buffer) {
                 fclose(fd);
-                log_error("can't allocate memory\n");
+                log_error("Out of memory.");
                 return -1;
         }
 
@@ -294,7 +294,7 @@ static int get_file_options(struct udev *udev,
                         c = argc_count(buffer) + 2;
                         *newargv = calloc(c, sizeof(**newargv));
                         if (!*newargv) {
-                                log_error("can't allocate memory\n");
+                                log_error("Out of memory.");
                                 retval = -1;
                         } else {
                                 *argc = c;