diff options
author | Daniel Golle <daniel@makrotopia.org> | 2016-07-21 04:04:34 +0200 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2016-07-21 04:13:05 +0200 |
commit | e7e1a1b0ab05454ed63e09ccf29d24ed187d7220 (patch) | |
tree | feaf9de05e72e5e245d30f50fb4befddb85141b3 | |
parent | bef7987f4b4ccc343f619172e28bcaaa12a19403 (diff) | |
download | fstools-e7e1a1b0ab05454ed63e09ccf29d24ed187d7220.tar.gz |
block: print mountpoint if already mounted
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r-- | block.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -727,6 +727,7 @@ static int mount_device(struct blkid_struct_probe *pr, int hotplug) { struct mount *m; char *device; + char *mp; if (!pr) return -1; @@ -746,8 +747,9 @@ static int mount_device(struct blkid_struct_probe *pr, int hotplug) if (hotplug && !auto_mount) return -1; - if (find_mount_point(pr->dev)) { - ULOG_ERR("%s is already mounted\n", pr->dev); + mp = find_mount_point(pr->dev); + if (mp) { + ULOG_ERR("%s is already mounted on %s\n", pr->dev, mp); return -1; } |