chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mount-setup: try mounting 'efivarfs' only if the system bootet with EFI
[elogind.git]
/
src
/
core
/
mount.c
diff --git
a/src/core/mount.c
b/src/core/mount.c
index e1c240e31b0e1ca43b79f13b31cdc061d79cdde2..14f4863dc6b410f9f4d1f5a99dacc3d02c7d1d1f 100644
(file)
--- a/
src/core/mount.c
+++ b/
src/core/mount.c
@@
-547,10
+547,6
@@
static int mount_add_extras(Mount *m) {
Unit *u = UNIT(m);
int r;
Unit *u = UNIT(m);
int r;
- r = unit_add_exec_dependencies(u, &m->exec_context);
- if (r < 0)
- return r;
-
if (UNIT(m)->fragment_path)
m->from_fragment = true;
if (UNIT(m)->fragment_path)
m->from_fragment = true;
@@
-562,6
+558,10
@@
static int mount_add_extras(Mount *m) {
path_kill_slashes(m->where);
path_kill_slashes(m->where);
+ r = unit_add_exec_dependencies(u, &m->exec_context);
+ if (r < 0)
+ return r;
+
if (!UNIT(m)->description) {
r = unit_set_description(u, m->where);
if (r < 0)
if (!UNIT(m)->description) {
r = unit_set_description(u, m->where);
if (r < 0)
@@
-1459,6
+1459,14
@@
static int mount_add_one(
delete = false;
free(e);
delete = false;
free(e);
+ if (!MOUNT(u)->where) {
+ MOUNT(u)->where = strdup(where);
+ if (!MOUNT(u)->where) {
+ r = -ENOMEM;
+ goto fail;
+ }
+ }
+
if (u->load_state == UNIT_ERROR) {
u->load_state = UNIT_LOADED;
u->load_error = 0;
if (u->load_state == UNIT_ERROR) {
u->load_state = UNIT_LOADED;
u->load_error = 0;