summaryrefslogtreecommitdiffstats
path: root/daemon/debug.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-05-08 15:20:36 +0100
committerRichard Jones <rjones@redhat.com>2009-05-08 15:20:36 +0100
commit15e0fd573a87488c66cb3a6f0da01f3ab5f2f6ed (patch)
treecf462fcc7f390c56be66ba6fb72fbfd79ccbc598 /daemon/debug.c
parent77c3f9d0ed25218fc3f24cee083a2083157d8e0a (diff)
downloadlibguestfs-15e0fd573a87488c66cb3a6f0da01f3ab5f2f6ed.tar.gz
libguestfs-15e0fd573a87488c66cb3a6f0da01f3ab5f2f6ed.tar.xz
libguestfs-15e0fd573a87488c66cb3a6f0da01f3ab5f2f6ed.zip
Generated code to support last 3 commits.
Diffstat (limited to 'daemon/debug.c')
-rw-r--r--daemon/debug.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/daemon/debug.c b/daemon/debug.c
index e4a7f055..6d6d2b59 100644
--- a/daemon/debug.c
+++ b/daemon/debug.c
@@ -46,11 +46,13 @@ struct cmd {
static char *debug_help (const char *subcmd, int argc, char *const *const argv);
static char *debug_fds (const char *subcmd, int argc, char *const *const argv);
+static char *debug_segv (const char *subcmd, int argc, char *const *const argv);
static char *debug_sh (const char *subcmd, int argc, char *const *const argv);
static struct cmd cmds[] = {
{ "help", debug_help },
{ "fds", debug_fds },
+ { "segv", debug_segv },
{ "sh", debug_sh },
{ NULL, NULL }
};
@@ -177,6 +179,14 @@ debug_fds (const char *subcmd, int argc, char *const *const argv)
return out;
}
+/* Force a segfault in the daemon. */
+static char *
+debug_segv (const char *subcmd, int argc, char *const *const argv)
+{
+ *(int*)0 = 0;
+ return NULL;
+}
+
/* Run an arbitrary shell command. */
static char *
debug_sh (const char *subcmd, int argc, char *const *const argv)