chiark / gitweb /
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 5557094..c3824c7 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 aaea96b..1322f63 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 1bc83a2..0c13517 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 48305e3..42a9490 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 d098424..fb6b4d2 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 f570724..9d4e773 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 833f3f7..036d3c5 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 3a59b85..89a4d13 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 b2e3eb6..9e46a47 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 67c56f3..7dab5f4 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 fcd0d1e..cfd3a91 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 e633dd3..a9cf9cd 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 36f9abe..ae1fbc4 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 56fb339..b8007d7 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 8b59c2b..62e0c3d 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 819596d..a43ecad 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 0a3f22c..fca6815 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 0775583..1cfb7fa 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 92014f5..a1fab86 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 d6bc16d..e73ba7f 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 1d7511e..355a103 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 f41a6bf..9fafa29 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 8dacf6a..45d489a 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 7bd079a..f90821e 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 4333bfb..005f40f 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 7d57680..ab1dc4d 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 a68cd3d..f90f5a1 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 43ec62e..2e7ae63 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 6eb8ed9..9dd1336 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 72a74f9..b463c7f 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 a13fc1a..d493733 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 237eb24..3fef9e8 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 45125b7..f8d8921 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 2ab3401..403e8cd 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 80f464a..4162c43 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 6fc41e9..0bb1bc4 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;