Page MenuHomeFreeBSD

D37981.id114846.diff
No OneTemporary

D37981.id114846.diff

diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -48,6 +48,7 @@
#include <sys/proc.h>
#include <sys/reboot.h>
#include <sys/signalvar.h>
+#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/watchdog.h>
@@ -743,6 +744,11 @@
#define DB_RESET_MAXDELAY (3600 * 24 * 7)
#endif
+static bool db_full_reboot = true;
+SYSCTL_BOOL(_debug_ddb, OID_AUTO, full_reboot, CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
+ &db_full_reboot, 0,
+ "Execute all shutdown handlers with 'reset' command");
+
static void
db_reset(db_expr_t addr, bool have_addr, db_expr_t count __unused,
char *modif __unused)
@@ -770,7 +776,15 @@
}
}
+ /*
+ * Conditionally try the standard reboot path, so registered
+ * shutdown/reset handlers have a chance.
+ */
+ if (db_full_reboot)
+ kern_reboot(RB_NOSYNC);
+
cpu_reset();
+ __assert_unreachable();
}
static void

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 22, 8:30 AM (21 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31965072
Default Alt Text
D37981.id114846.diff (929 B)

Event Timeline