Improve messages during cancelation.

This commit is contained in:
Vreixo Formoso 2008-02-04 01:41:08 +01:00
parent 99bcef4c53
commit 8930de4026
3 changed files with 13 additions and 1 deletions

View File

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

View File

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

View File

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