mdev: add support to run as daemon
authorJan Klötzke <jan@kloetzke.net>
Tue, 7 May 2019 18:59:43 +0000 (20:59 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 3 Jun 2019 11:24:49 +0000 (13:24 +0200)
commit498cec202adbf69a7a72af5e204260682d614183
treede90b887f83b143b7092bfcc054f5e09fe21bef1
parent728e53d38887c268b3557afadfc38472fa4f0cd6
mdev: add support to run as daemon

Adds the -d option to run mdev in daemon mode handling hotplug events
from the kernel like udev. If the system generates many hotplug events
this mode of operation will consume less resources than registering
mdev as hotplug helper or using the uevent applet.

function                                             old     new   delta
daemon_loop                                            -     152    +152
initial_scan                                           -     127    +127
open_mdev_log                                          -      85     +85
mdev_main                                            255     314     +59
packed_usage                                       33284   33316     +32
process_action                                      1051     992     -59
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 2/1 up/down: 455/-59)           Total: 396 bytes

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/mdev.c