Browse Source

Improve messages during cancelation.

release-1.5.4.branch
Vreixo Formoso 15 years ago
parent
commit
8930de4026
  1. 9
      libisofs/ecma119.c
  2. 3
      libisofs/libisofs.h
  3. 2
      libisofs/messages.c

9
libisofs/ecma119.c

@ -790,8 +790,14 @@ void *write_function(void *arg)
pthread_exit(NULL);
write_error: ;
iso_msg_submit(target->image->id, ISO_WRITE_ERROR, res,
if (res == ISO_CANCELED) {
/* canceled */
iso_msg_submit(target->image->id, ISO_IMAGE_WRITE_CANCELED, 0, NULL);
} else {
/* image write error */
iso_msg_submit(target->image->id, ISO_WRITE_ERROR, res,
"Image write error");
}
iso_ring_buffer_writer_close(target->buffer, 1);
pthread_exit(NULL);
}
@ -1107,6 +1113,7 @@ static void bs_free_data(struct burn_source *bs)
ecma119_image_free(target);
}
static
int bs_cancel(struct burn_source *bs)
{
Ecma119Image *target = (Ecma119Image*)bs->data;

3
libisofs/libisofs.h

@ -3096,4 +3096,7 @@ const char *iso_image_fs_get_biblio_file_id(IsoImageFilesystem *fs);
/** El-Torito related warning (WARNING,MEDIUM, -333) */
#define ISO_EL_TORITO_WARN 0xD020FEB3
/** Image write cancelled (SORRY,HIGH, -334) */
#define ISO_IMAGE_WRITE_CANCELED 0xE030FEB2
#endif /*LIBISO_LIBISOFS_H_*/

2
libisofs/messages.c

@ -170,6 +170,8 @@ const char *iso_error_to_msg(int errcode)
return "Unsupported volume descriptor found";
case ISO_EL_TORITO_WARN:
return "El-Torito related warning";
case ISO_IMAGE_WRITE_CANCELED:
return "Image write cancelled";
default:
return "Unknown error";
}

Loading…
Cancel
Save