]> git.ozlabs.org Git - petitboot/commit
discover: allow separate lifetimes for network interfaces and discover devices
authorJeremy Kerr <jk@ozlabs.org>
Mon, 21 Jul 2014 07:51:58 +0000 (15:51 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 21 Jul 2014 09:20:08 +0000 (17:20 +0800)
commit0adfe11dc0738321cdd529f30773899cc8f79855
treef456887c66a18679f27940d34082bde40e9c3857
parent20889c61bc0e6712c1cac5a0a6e9e8e9dff7cf84
discover: allow separate lifetimes for network interfaces and discover devices

We want the network code's network interfaces to (potentially) persist
remove events. For example, discover devices may be removed by a user
event (this happens during a udhcpc deconfig). In this case, we want the
boot options to be removed, but the struct interface needs to stay
present.

This change adds network_(un)_register_device functions, to allow the
device handler to detach from and attach to interfaces.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/device-handler.c
discover/network.c
discover/network.h