From a27ea3ff91a2f84c6160441689d2df9d2dce1fc1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 12 Feb 2018 12:01:52 +0100 Subject: [PATCH 1/1] mount: drop duplicated unlink() call from the mount_dev_del() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There is no need to call unlink() there as mount_enum_drives() does it too, soon after calling mount_dev_del(). Also mount_enum_drives() does that for STATUS_EXPIRED - which is expected - as there is no unlink() call when device expires. Signed-off-by: Rafał Miłecki --- mount.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mount.c b/mount.c index f196791..aa346ff 100644 --- a/mount.c +++ b/mount.c @@ -591,8 +591,6 @@ static void mount_dev_del(struct mount *mount) log_printf("device %s has disappeared ... unmounting %s\n", mount->dev, tmp); system_printf("/bin/umount %s", tmp); rmdir(tmp); - snprintf(tmp, 64, "%s%s", uci_path, mount->name); - unlink(tmp); mount_dump_uci_state(); } } -- 2.11.0