const void *bytes,
size_t number_of_bytes);
static ply_buffer_t *debug_buffer;
-static char *debug_buffer_path;
+static char *debug_buffer_path = NULL;
static void
switch_to_vt (int vt_number)
if (!ply_is_tracing ())
ply_toggle_tracing ();
- if (path != NULL)
+ if (path != NULL && debug_buffer_path == NULL)
{
char *end;
"attach-to-session", "Redirect console messages from screen to log", PLY_COMMAND_OPTION_TYPE_FLAG,
"no-daemon", "Do not daemonize", PLY_COMMAND_OPTION_TYPE_FLAG,
"debug", "Output debugging information", PLY_COMMAND_OPTION_TYPE_FLAG,
+ "debug-file", "File to output debugging information to", PLY_COMMAND_OPTION_TYPE_STRING,
"mode", "Mode is one of: boot, shutdown", PLY_COMMAND_OPTION_TYPE_STRING,
NULL);
"mode", &mode_string,
"no-daemon", &no_daemon,
"debug", &debug,
+ "debug-file", &debug_buffer_path,
NULL);
if (should_help)