diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-12-13 11:05:12 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-12-13 14:48:34 +0100 |
commit | 12851d6b3a3883b8470ba3f8c18024dec51e2847 (patch) | |
tree | 461360911e03c3d26b7d4d0e9827944160499c5a | |
parent | 5ea47fe35e5db7b231393d21515daeaef9da8498 (diff) | |
download | fstools-12851d6b3a3883b8470ba3f8c18024dec51e2847.tar.gz |
blockd: don't flush devices list on "hotplug" call
The point of "hotplug" call is to add or remove a single entry to/from
devices list. Using vlist_update() and vlist_flush() was clearing whole
list (and leaving the last entry in case of adding a device).
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
-rw-r--r-- | blockd.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -237,7 +237,6 @@ block_hotplug(struct ubus_context *ctx, struct ubus_object *obj, if (!device) return UBUS_STATUS_UNKNOWN_ERROR; - vlist_update(&devices); if (data[MOUNT_REMOVE]) { vlist_delete(&devices, &device->node); } else { @@ -257,7 +256,6 @@ block_hotplug(struct ubus_context *ctx, struct ubus_object *obj, strcpy(__target, target); vlist_add(&devices, &device->node, device->name); } - vlist_flush(&devices); return 0; } |