X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fautomount.c;h=6cf3c311b3995e3c0114060d9c067fb09399c1be;hb=94fb446e55babb713fb24850455627acf30d999b;hp=f6f83d43b6a0d00867b60b13ebe8fdcf5584d499;hpb=35b8ca3aaf8cb044ad76675dfcad89e000dd4a5c;p=elogind.git diff --git a/src/automount.c b/src/automount.c index f6f83d43b..6cf3c311b 100644 --- a/src/automount.c +++ b/src/automount.c @@ -58,6 +58,8 @@ static void automount_init(Unit *u) { a->pipe_watch.type = WATCH_INVALID; a->directory_mode = 0755; + + a->meta.ignore_on_isolate = true; } static void repeat_unmout(const char *path) { @@ -140,7 +142,7 @@ static int automount_add_mount_links(Automount *a) { assert(a); - LIST_FOREACH(units_per_type, other, a->meta.manager->units_per_type[UNIT_MOUNT]) + LIST_FOREACH(units_by_type, other, a->meta.manager->units_by_type[UNIT_MOUNT]) if ((r = automount_add_one_mount_link(a, (Mount*) other)) < 0) return r; @@ -609,7 +611,7 @@ static int automount_start(Unit *u) { assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_FAILED); - if (path_is_mount_point(a->where)) { + if (path_is_mount_point(a->where, false)) { log_error("Path %s is already a mount point, refusing start for %s", a->where, u->meta.id); return -EEXIST; } @@ -768,7 +770,7 @@ static void automount_fd_event(Unit *u, int fd, uint32_t events, Watch *w) { if (packet.v5_packet.pid > 0) { char *p = NULL; - get_process_name(packet.v5_packet.pid, &p); + get_process_comm(packet.v5_packet.pid, &p); log_debug("Got direct mount request for %s, triggered by %lu (%s)", packet.v5_packet.name, (unsigned long) packet.v5_packet.pid, strna(p)); free(p); @@ -829,6 +831,10 @@ DEFINE_STRING_TABLE_LOOKUP(automount_state, AutomountState); const UnitVTable automount_vtable = { .suffix = ".automount", + .sections = + "Unit\0" + "Automount\0" + "Install\0", .no_alias = true, .no_instances = true,