From 0e7db5f397fcf2e97f209f6b110a899ced470d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 27 Sep 2019 19:31:12 +0200 Subject: [PATCH] module/removables: relaxed mountinfo matching criteria Fixes mount detection on e.g. Artix Linux. --- modules/removables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/removables.c b/modules/removables.c index d31c69c..2e36cc8 100644 --- a/modules/removables.c +++ b/modules/removables.c @@ -159,10 +159,10 @@ find_mount_points(const char *dev_path, mount_point_list_t *mount_points) while (fgets(line, sizeof(line), f) != NULL) { char *dev = NULL, *path = NULL; - if (sscanf(line, "%*u %*u %*u:%*u %*s %ms %*s %*[^-] - %*s %ms %*s", + if (sscanf(line, "%*u %*u %*u:%*u %*s %ms %*[^-] - %*s %ms %*s", &path, &dev) != 2) { - LOG_ERR("failed to parse /proc/mounts"); + LOG_ERR("failed to parse /proc/self/mountinfo: %s", line); free(dev); free(path); break;