chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utmp: write out runlevels 5 and 3 preferrably if multiples make sense, and S instead...
[elogind.git]
/
src
/
mount.c
diff --git
a/src/mount.c
b/src/mount.c
index 89b18431dae531d98a32711ee627c83276680c8b..b49443ced11b962e8d930049647ca49cf3b009f0 100644
(file)
--- a/
src/mount.c
+++ b/
src/mount.c
@@
-244,7
+244,8
@@
static int mount_add_target_links(Mount *m) {
noauto = !!mount_test_option(p->options, MNTOPT_NOAUTO);
user = mount_test_option(p->options, "user") || mount_test_option(p->options, "users");
noauto = !!mount_test_option(p->options, MNTOPT_NOAUTO);
user = mount_test_option(p->options, "user") || mount_test_option(p->options, "users");
- handle = !!mount_test_option(p->options, "comment=systemd.mount");
+ handle = !!mount_test_option(p->options, "comment=systemd.mount") ||
+ m->meta.manager->mount_auto;
automount = !!mount_test_option(p->options, "comment=systemd.automount");
if (mount_test_option(p->options, "_netdev") ||
automount = !!mount_test_option(p->options, "comment=systemd.automount");
if (mount_test_option(p->options, "_netdev") ||
@@
-361,8
+362,10
@@
static int mount_load(Unit *u) {
else if (m->from_proc_self_mountinfo && m->parameters_proc_self_mountinfo.what)
what = m->parameters_proc_self_mountinfo.what;
else if (m->from_proc_self_mountinfo && m->parameters_proc_self_mountinfo.what)
what = m->parameters_proc_self_mountinfo.what;
- if (what)
- if ((r = unit_add_node_link(u, what, u->meta.manager->running_as == MANAGER_SYSTEM)) < 0)
+ if (what && !path_equal(m->where, "/"))
+ if ((r = unit_add_node_link(u, what,
+ u->meta.manager->running_as == MANAGER_SYSTEM &&
+ u->meta.manager->mount_on_plug)) < 0)
return r;
if ((r = mount_add_mount_links(m)) < 0)
return r;
if ((r = mount_add_mount_links(m)) < 0)
@@
-1005,6
+1008,9
@@
static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
default:
assert_not_reached("Uh, control process died at wrong time.");
}
default:
assert_not_reached("Uh, control process died at wrong time.");
}
+
+ /* Notify clients about changed exit status */
+ unit_add_to_dbus_queue(u);
}
static void mount_timer_event(Unit *u, uint64_t elapsed, Watch *w) {
}
static void mount_timer_event(Unit *u, uint64_t elapsed, Watch *w) {
@@
-1172,7
+1178,7
@@
fail:
}
static char *fstab_node_to_udev_node(char *p) {
}
static char *fstab_node_to_udev_node(char *p) {
- char *dn, *t;
+ char *dn, *t
, *u
;
int r;
/* FIXME: to follow udev's logic 100% we need to leave valid
int r;
/* FIXME: to follow udev's logic 100% we need to leave valid
@@
-1180,7
+1186,13
@@
static char *fstab_node_to_udev_node(char *p) {
if (startswith(p, "LABEL=")) {
if (startswith(p, "LABEL=")) {
- if (!(t = xescape(p+6, "/ ")))
+ if (!(u = unquote(p+6, '"')))
+ return NULL;
+
+ t = xescape(u, "/ ");
+ free(u);
+
+ if (!t)
return NULL;
r = asprintf(&dn, "/dev/disk/by-label/%s", t);
return NULL;
r = asprintf(&dn, "/dev/disk/by-label/%s", t);
@@
-1194,7
+1206,13
@@
static char *fstab_node_to_udev_node(char *p) {
if (startswith(p, "UUID=")) {
if (startswith(p, "UUID=")) {
- if (!(t = xescape(p+5, "/ ")))
+ if (!(u = unquote(p+5, '"')))
+ return NULL;
+
+ t = xescape(u, "/ ");
+ free(u);
+
+ if (!t)
return NULL;
r = asprintf(&dn, "/dev/disk/by-uuid/%s", ascii_strlower(t));
return NULL;
r = asprintf(&dn, "/dev/disk/by-uuid/%s", ascii_strlower(t));
@@
-1557,7
+1575,9
@@
const UnitVTable mount_vtable = {
.reset_maintenance = mount_reset_maintenance,
.reset_maintenance = mount_reset_maintenance,
+ .bus_interface = "org.freedesktop.systemd1.Mount",
.bus_message_handler = bus_mount_message_handler,
.bus_message_handler = bus_mount_message_handler,
+ .bus_invalidating_properties = bus_mount_invalidating_properties,
.enumerate = mount_enumerate,
.shutdown = mount_shutdown
.enumerate = mount_enumerate,
.shutdown = mount_shutdown