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;
}
/* 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;
}
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;
}
!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;
}
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;
}
!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;
}
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;
}
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;
}
return 0;
oom:
- log_error("Not enough memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
}
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;
}
p = strappend("/run/systemd/", name);
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
} else {
p = strjoin("/tmp/systemd-", name, ".XXXXXX", NULL);
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
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;
}
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;
}
device = strappend("UUID=", *i);
if (!name || !device) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = EXIT_FAILURE;
free(name);
free(device);
l = strcspn(opt_cipher, "-");
if (!(truncated_cipher = strndup(opt_cipher, l))) {
- log_error("Out of memory");
+ log_error("Out of memory.");
goto finish;
}
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;
}
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;
}
}
if (!(udev = udev_new())) {
- log_error("Out of memory");
+ log_error("Out of memory.");
goto finish;
}
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;
}
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;
}
r = device_name(what, &device);
if (r < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
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;
}
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;
}
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;
}
r = device_name(what, &device);
if (r < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
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;
}
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;
}
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;
}
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;
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;
}
n = unit_name_replace_instance("serial-getty@.service", tty);
if (!n) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
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;
}
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;
}
p = malloc(9 + COREDUMP_MAX);
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
t = strappend("_EXE=", path);
if (!t) {
free(p);
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
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;
}
k = malloc((e - p) + 1 + l);
if (!k) {
- log_error("Out of memory");
+ log_error("Out of memory.");
break;
}
p = malloc(st.st_size);
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return;
}
else {
s->identifier = strdup(p);
if (!s->identifier) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
}
else {
s->unit_id = strdup(p);
if (!s->unit_id) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
}
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;
}
char *s;
if (asprintf(&s, "%s=%s", names[p], data[p]) < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
goto finish;
}
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;
}
p = strappend("/dev/input/", b->name);
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
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;
}
t = strappend(s->user->runtime_path, "/X11-display");
if (!t) {
- log_error("Out of memory");
+ log_error("Out of memory.");
free(f);
return -ENOMEM;
}
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
t = strappend(s->user->runtime_path, "/X11-display");
if (!t) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
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
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
!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;
}
m = manager_new();
if (!m) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
path = strappend("/run/systemd/multi-session-x/", seat);
if (!path) {
- log_error("Out of memory");
+ log_error("Out of memory.");
goto fail;
}
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;
}
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;
/* 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;
}
free(where);
if (asprintf(&where, "%s/etc/timezone", dest) < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
/* 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;
}
}
if (asprintf(&to, "%s/dev/console", dest) < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
* 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;
}
p = strappend(directory, "/etc/machine-id");
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
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;
}
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;
}
}
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;
}
assert(root);
if (asprintf(&pack_fn, "%s/.readahead", root) < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
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;
}
n = hashmap_size(files);
if (!(ordered = new(struct item, n))) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
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;
}
if (!(c = strdup(sa.un.sun_path))) {
r = -ENOMEM;
- log_error("Out of memory");
+ log_error("Out of memory.");
goto fail;
}
return;
oom:
- log_error("Out of memory");
+ log_error("Out of memory.");
if (pending) {
dbus_pending_call_cancel(pending);
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;
}
continue;
if (!(u = normalize_env_assignment(p))) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
free(u);
if (!t) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
continue;
if (asprintf(&path, "%s/%s", directory, de->d_name) < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
continue;
}
t = cescape(c->wall_message);
if (!t) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
p = new(char, sizeof(PROC_SYS_PREFIX) + strlen(property));
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
l = strv_append(arg_prefixes, optarg);
if (!l) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
h = hashmap_new(string_hash_func, string_compare_func);
if (!h) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
units = new(UnitFileList, n_units);
if (!units) {
unit_file_list_free(h);
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
section = strndup(e + 1, *p + k - e - 2);
if (!section) {
free(page);
- log_error("Out of memory");
+ log_error("Out of memory.");
return;
}
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;
}
char *p;
if (asprintf(&p, "/org/freedesktop/systemd1/job/%u", id) < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
asprintf(&p, "%s/%s", *k, name);
if (!p) {
- log_error("No memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
else
asprintf(&p, SYSTEM_SYSVINIT_PATH "/%s", name);
if (!p) {
- log_error("No memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
l = strv_join((char**)argv, " ");
if (!l) {
- log_error("No memory.");
+ log_error("Out of memory.");
free(q);
free(p);
r = -ENOMEM;
"org.freedesktop.systemd1.Manager",
method);
if (!m) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
"org.freedesktop.systemd1.Manager",
"GetUnitFileState");
if (!m) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
p = strappend("/usr/share/zoneinfo/", tz.zone);
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return;
}
p = strappend("/usr/share/zoneinfo/", tz.zone);
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
q = strv_append(r, l);
if (!q) {
- log_error("Out of memory");
+ log_error("Out of memory.");
break;
}
"org.freedesktop.systemd1.Manager",
"GetUnitFileState");
if (!m) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
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;
}
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;
}
i = new0(Item, 1);
if (!i) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
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;
}
}
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;
}
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;
}
*wall ? "\r\n\r\n" : "",
message,
pid) < 0) {
- log_error("Out of memory");
+ log_error("Out of memory.");
r = -ENOMEM;
goto finish;
}
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;
}
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);
buffer = malloc(MAX_BUFFER_LEN);
if (!buffer) {
fclose(fd);
- log_error("can't allocate memory\n");
+ log_error("Out of memory.");
return -1;
}
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;