chiark / gitweb /
cgroup: compare fs paths with path_equal() rather than streq()
[elogind.git] / src / core / mount.c
index c71d51bfa409ba678304c94c2c7adf73d19c47be..c7d29b0c887b4b5082c689fa92dfd8e66f10164d 100644 (file)
@@ -822,9 +822,9 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
                 prefix, mount_state_to_string(m->state),
                 prefix, mount_result_to_string(m->result),
                 prefix, m->where,
-                prefix, strna(p->what),
-                prefix, strna(p->fstype),
-                prefix, strna(p->options),
+                prefix, p ? strna(p->what) : "n/a",
+                prefix, p ? strna(p->fstype) : "n/a",
+                prefix, p ? strna(p->options) : "n/a",
                 prefix, yes_no(m->from_proc_self_mountinfo),
                 prefix, yes_no(m->from_fragment),
                 prefix, m->directory_mode);
@@ -1543,7 +1543,8 @@ static int mount_add_one(
                 if (r < 0)
                         goto fail;
 
-                if (!path_equal(where, "/")) {
+                if (!path_equal(where, "/") &&
+                    !path_equal(where, "/usr")) {
                         r = unit_add_dependency_by_name(u, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true);
                         if (r < 0)
                                 goto fail;
@@ -1562,7 +1563,7 @@ static int mount_add_one(
                         }
                 }
 
-                if (u->load_state == UNIT_ERROR) {
+                if (u->load_state == UNIT_NOT_FOUND) {
                         u->load_state = UNIT_LOADED;
                         u->load_error = 0;
 
@@ -1916,6 +1917,8 @@ const UnitVTable mount_vtable = {
         .bus_interface = "org.freedesktop.systemd1.Mount",
         .bus_message_handler = bus_mount_message_handler,
         .bus_invalidating_properties =  bus_mount_invalidating_properties,
+        .bus_set_property = bus_mount_set_property,
+        .bus_commit_properties = bus_mount_commit_properties,
 
         .enumerate = mount_enumerate,
         .shutdown = mount_shutdown,