X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmountd.git;a=blobdiff_plain;f=mount.c;h=00fe91dbde9b82db2b8975f95935724ecb9ff23f;hp=3994149bf12a4b4d3a46170f8009948b1b5ad63b;hb=aaf2743670ef230a6a8922030ac30d2303e2accd;hpb=97da4edeb9eb3b26c9843d3a5ab605e7bcf2573f diff --git a/mount.c b/mount.c index 3994149..00fe91d 100644 --- a/mount.c +++ b/mount.c @@ -774,11 +774,13 @@ static void mount_enum_drives(void) } if(!check_block(q->dev)||del) { - int err; - - err = mount_dev_del(q); if (q->status == STATUS_MOUNTED || q->status == STATUS_EXPIRED) { char dev_link[64]; + int err; + + system_printf("ACTION=remove DEVICE=%s NAME=%s /sbin/hotplug-call mount", q->dev, q->name); + + err = mount_dev_del(q); snprintf(dev_link, sizeof(dev_link), "%s%s", uci_path, q->name); if (err == -EBUSY) { @@ -792,7 +794,6 @@ static void mount_enum_drives(void) log_printf("unlinking %s\n", dev_link); unlink(dev_link); } - system_printf("ACTION=remove DEVICE=%s NAME=%s /sbin/hotplug-call mount", q->dev, q->name); } p->prev->next = p->next;