Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=78f099fe93a13342efe32388584e2d6682dce73e
commit 78f099fe93a13342efe32388584e2d6682dce73e Author: James Buren <[email protected]> Date: Tue Sep 11 04:26:59 2012 -0500 set libparted exception handler to log to our logfile and ignore them. diff --git a/src/local.h b/src/local.h index 95a69d0..1ba98b0 100644 --- a/src/local.h +++ b/src/local.h @@ -14,6 +14,7 @@ #include <wchar.h> #include <errno.h> #include <limits.h> +#include <parted/parted.h> #include "text.h" #define LOGFILE "fwsetup.log" diff --git a/src/main.c b/src/main.c index 78d88d3..3f42b19 100644 --- a/src/main.c +++ b/src/main.c @@ -2,6 +2,13 @@ FILE *logfile = 0; +static PedExceptionOption libparted_exception_callback(PedException *ex) +{ + fprintf(logfile,"libparted: %s %s\n",ped_exception_get_type_string(ex->type),ex->message); + + return PED_EXCEPTION_IGNORE; +} + extern int main(int argc,char **argv) { int code = EXIT_SUCCESS; @@ -17,6 +24,8 @@ extern int main(int argc,char **argv) setbuf(logfile,0); + ped_exception_set_handler(libparted_exception_callback); + code = ui_main(argc,argv); fclose(logfile); _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
