* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#if defined(HAVE_CONFIG_H)
#include "config.h"
-#endif
#define _GNU_SOURCE
+
+#include <assert.h>
#include <errno.h>
#include <getopt.h>
#include <signal.h>
m->on_open = cui_on_open;
- m->scr.frame.title = talloc_asprintf(m,
+ m->scr.frame.ltitle = talloc_asprintf(m,
"Petitboot (" PACKAGE_VERSION ")");
+ m->scr.frame.rtitle = NULL;
m->scr.frame.help = talloc_strdup(m,
"ESC=exit, Enter=accept, e=edit, o=open");
m->scr.frame.status = talloc_strdup(m, "Welcome to Petitboot");
int result;
int cui_result;
struct opts opts;
+ FILE *log;
result = opts_parse(&opts, argc, argv);
return EXIT_SUCCESS;
}
+ log = stderr;
if (strcmp(opts.log_file, "-")) {
- FILE *log = fopen(opts.log_file, "a");
+ log = fopen(opts.log_file, "a");
if (!log)
log = fopen("/dev/null", "a");
+ }
- assert(log);
- pb_log_set_stream(log);
- } else
- pb_log_set_stream(stderr);
-
-#if defined(DEBUG)
- pb_log_always_flush(1);
-#endif
+ pb_log_init(log);
pb_log("--- petitboot-nc ---\n");
return EXIT_FAILURE;
pb.mm = pb_mm_init(&pb);
- ui_timer_disable(&pb.cui->timer);
cui_result = cui_run(pb.cui, pb.mm, 0);