if(!check_block(q->dev)||del)
{
mount_dev_del(q);
- p->prev->next = p->next;
- p->next->prev = p->prev;
- p = p->next;
if (q->status == STATUS_MOUNTED || q->status == STATUS_EXPIRED) {
snprintf(tmp, 64, "%s%s", uci_path, q->name);
log_printf("unlinking %s\n", tmp);
unlink(tmp);
system_printf("ACTION=remove DEVICE=%s NAME=%s /sbin/hotplug-call mount", q->dev, q->name);
}
+
+ p->prev->next = p->next;
+ p->next->prev = p->prev;
+ p = p->next;
free(q);
+
mount_dump_uci_state();
system_printf("/etc/fonstated/ReloadSamba");
} else p = p->next;