diff --git a/libisoburn/trunk/src/burn_wrap.c b/libisoburn/trunk/src/burn_wrap.c index 146ffc03..ea791cd8 100644 --- a/libisoburn/trunk/src/burn_wrap.c +++ b/libisoburn/trunk/src/burn_wrap.c @@ -93,6 +93,7 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], struct stat stbuf; char libburn_drive_adr[BURN_DRIVE_ADR_LEN], *adrpt, *stdio_adr= NULL; struct isoburn *o= NULL; + char msg[BURN_MSGS_MESSAGE_LEN+4096]; /* Treatment decision criteria Prefixes "grow:" leads to: treatment 1, image growing @@ -122,10 +123,9 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], treatment= 2; if(stat(adrpt,&stbuf)!=-1) { if(! S_ISREG(stbuf.st_mode)) { - - /* >>> we need a gateway to the libisofs/libburn message system */; - fprintf(stderr, "LIBISOBURN: unsuitable target for modify: '%s'\n",adr); - + sprintf(msg, "Unsuitable target for modify: '%s'\n",adr); + msg[BURN_MSGS_MESSAGE_LEN]= 0; + burn_msgs_submit(0, msg, 0, "SORRY", NULL); ret= 0; goto ex; } } @@ -156,11 +156,10 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], } } } - if(conv_ret<=0 || treatment<=0) { /* Failure */ - - /* >>> we need a gateway to the libisofs/libburn message system */; - fprintf(stderr, "LIBISOBURN: unsuitable drive address: '%s'\n", adrpt); - + if(conv_ret<=0 || treatment<=0) { + sprintf(msg, "Unsuitable drive address: '%s'\n",adrpt); + msg[BURN_MSGS_MESSAGE_LEN]= 0; + burn_msgs_submit(0, msg, 0, "SORRY", NULL); ret= 0; goto ex; }