178b4da6ee
instead just mark the device for shutdown and detach on last close. Also don't manually print the detached message but leave this to config_detach(). This avoids a duplicate message when shutting down.