diff options
author | Daniel Golle <daniel@makrotopia.org> | 2021-07-15 02:03:38 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-07-15 02:18:35 +0100 |
commit | 3386b6ba812e3dfe6e438a514d377a68800989f3 (patch) | |
tree | 01475226ed359f29182e68f384b010649a35cdce | |
parent | 39558a1f3ebbf0a56188ead4f703456feab2102f (diff) | |
download | fstools-3386b6ba812e3dfe6e438a514d377a68800989f3.tar.gz |
blockd: fix trigger name
Make it 'mount.add' instead of just 'add' which is more obvious when
used with procd_add_raw_trigger.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r-- | blockd.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -499,15 +499,18 @@ static int send_block_notification(struct ubus_context *ctx, const char *action, const char *devname) { struct blob_buf buf = { 0 }; + char evname[16] = "mount."; int err; if (!ctx) return -ENXIO; + strncat(evname, action, sizeof(evname) - 1); + blob_buf_init(&buf, 0); blobmsg_add_string(&buf, "devname", devname); - err = ubus_notify(ctx, &block_object, action, buf.head, -1); + err = ubus_notify(ctx, &block_object, evname, buf.head, -1); return err; } |