chiark / gitweb /
core: add catalog entry and MESSAGE_ID for overmounting
[elogind.git] / src / core / automount.c
index 5bf59df8bcc1323bfdac18931e22228f23ab31b0..74776646f632b5b7e1cbd6e9b254e9d2f7729788 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "unit.h"
 #include "automount.h"
+#include "mount.h"
 #include "load-fragment.h"
 #include "load-dropin.h"
 #include "unit-name.h"
@@ -507,8 +508,7 @@ static void automount_enter_waiting(Automount *a) {
         /* We knowingly ignore the results of this call */
         mkdir_p_label(a->where, 0555);
 
-        if (dir_is_empty(a->where) <= 0)
-                log_notice("%s: Directory %s to mount over is not empty, mounting anyway. (To see the over-mounted files, please manually mount the underlying file system to a secondary location.)", a->meta.id, a->where);
+        warn_if_dir_nonempty(a->meta.id, a->where);
 
         if (pipe2(p, O_NONBLOCK|O_CLOEXEC) < 0) {
                 r = -errno;