[OpenWrt-Devel] [PATCH 0/7] procd: console hotplugging support

Michael Heimpold mhei at heimpold.de
Tue Jan 1 18:44:52 EST 2019


This series extends procd to allow starting consoles for devices which
are not present during boot or after kernel module loading. This is
for example the case when a USB gadget serial device is created with
configfs. Here the kernel module is loaded but the tty device only
appears after gadget is configured.
Having a console configured in inittab for e.g. ttyGS0 does not work
at the moment due to late appearing of this device.

The changes in this series are the first step to make this work,
the next one would be to extend the hotplug.json script to re-trigger
inittab entry processing.

The series also includes some nitpicks I stumbled over during coding.

It can also be found in a Github repo:
https://github.com/mhei/openwrt-procd/tree/console-hotplugging

Michael Heimpold (7):
  procd: simplify code in procd_inittab_run
  procd: guard fork_worker calls
  procd: skip respawn in case device disappeared
  procd: shift arguments for askfirst only once
  procd: add start-console support
  procd: add upgraded binary to .gitignore
  procd: replace exit(-1) with exit(EXIT_FAILURE)

 .gitignore          |  1 +
 initd/init.c        |  2 +-
 initd/preinit.c     |  6 +++---
 initd/zram.c        |  4 ++--
 inittab.c           | 48 +++++++++++++++++++++++++++++----------------
 plug/coldplug.c     |  3 ++-
 plug/hotplug.c      | 31 +++++++++++++++++++++++------
 upgraded/upgraded.c |  2 +-
 8 files changed, 66 insertions(+), 31 deletions(-)

-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list