summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-28 22:20:01 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-28 22:20:01 +0200
commit941a4041bdb9d91e9d5033005263efe029621e4f (patch)
tree9cc163ab2fa5feef61339f961eb7f3d68d4712fc /src
parentc858849d45ff94d66c79a414b6a2ef9db1fe1979 (diff)
automount: show who's triggering an automount
Diffstat (limited to 'src')
-rw-r--r--src/automount.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/automount.c b/src/automount.c
index c557b6ebb2..da66630fd6 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -760,7 +760,16 @@ static void automount_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
switch (packet.hdr.type) {
case autofs_ptype_missing_direct:
- log_debug("Got direct mount request for %s", packet.v5_packet.name);
+
+ if (packet.v5_packet.pid > 0) {
+ char *p = NULL;
+
+ get_process_name(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);
+
+ } else
+ log_debug("Got direct mount request for %s", packet.v5_packet.name);
if (!a->tokens)
if (!(a->tokens = set_new(trivial_hash_func, trivial_compare_func))) {