Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153468915
D37981.id114846.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
929 B
Referenced Files
None
Subscribers
None
D37981.id114846.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D37981: ddb: have 'reset' command use normal reboot path
Attached
Detach File
Event Timeline
Log In to Comment