chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
90527fb
)
core: Set source for mountinfo .mount units
author
Umut Tezduyar
<umut@tezduyar.com>
Wed, 23 Jan 2013 08:23:49 +0000
(09:23 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 25 Jan 2013 00:36:47 +0000
(19:36 -0500)
src/core/mount.c
patch
|
blob
|
history
diff --git
a/src/core/mount.c
b/src/core/mount.c
index 03eff9d9edc6b9c3da94d09fd473d5ea47716877..e5f5e4272ea02dce6c60e37e9d8ca8c5783f3233 100644
(file)
--- a/
src/core/mount.c
+++ b/
src/core/mount.c
@@
-1472,7
+1472,7
@@
static int mount_add_one(
int r;
Unit *u;
bool delete;
int r;
Unit *u;
bool delete;
- char *e, *w = NULL, *o = NULL, *f = NULL;
+ char *e, *w = NULL, *o = NULL, *
s = NULL, *
f = NULL;
MountParameters *p;
bool load_extras = false;
MountParameters *p;
bool load_extras = false;
@@
-1545,6
+1545,7
@@
static int mount_add_one(
if (!(w = strdup(what)) ||
!(o = strdup(options)) ||
if (!(w = strdup(what)) ||
!(o = strdup(options)) ||
+ !(s = strdup("/proc/self/mountinfo")) ||
!(f = strdup(fstype))) {
r = -ENOMEM;
goto fail;
!(f = strdup(fstype))) {
r = -ENOMEM;
goto fail;
@@
-1558,6
+1559,8
@@
static int mount_add_one(
}
MOUNT(u)->from_proc_self_mountinfo = true;
}
MOUNT(u)->from_proc_self_mountinfo = true;
+ free(u->source_path);
+ u->source_path = s;
free(p->what);
p->what = w;
free(p->what);
p->what = w;
@@
-1583,6
+1586,7
@@
static int mount_add_one(
fail:
free(w);
free(o);
fail:
free(w);
free(o);
+ free(s);
free(f);
if (delete && u)
free(f);
if (delete && u)