console: fix usbserial re-connect
With commit b4f55fcf355a ("console: expose consoles in devfs") consoles
got inserted, but never removed from devfs.
When dealing with USB consoles, barebox should be prepared for devices
spontaneously appering and disappering again (user disconnects and re-
connects the cable). If the devfs entry is not removed upon disconnect,
barebox will raise an error "device creation failed with File exists"
when the cable is connected again.

Remove devfs entries when consoles are de-registered.
Also change the error message, it's the devfs entry.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e6419c6 commit 8b73b0fab75a17b84738ac4584ece9b63219960d
@Alexander Kurz Alexander Kurz authored on 26 Mar 2017
Sascha Hauer committed on 29 Mar 2017
Showing 1 changed file
View
common/console.c