boot/init: Work around gadget teardown errors
Those errors are non-issues.
Tear-down should, anyway, be implemented in a library to be used in
other tools like target disk mode and a stage-2 gadget utility.
@@ -191,7 +191,12 @@ class Tasks::SwitchRoot < SingletonTask
if will_kexec?
if Tasks.constants.include?(:SetupGadgetMode)
Progress.exec_with_message("Tearing down USB Gadget mode") do
+ begin
Tasks::SetupGadgetMode.instance.teardown()
+ rescue => e
+ $logger.fatal("Caught an error during teardown for kexec...")
+ $logger.fatal(e.inspect)
+ end
end
end
