Little improvements in error severity.
This commit is contained in:
parent
74f65d6833
commit
75ae7fdebc
@ -197,7 +197,7 @@ int ecma119_writer_compute_data_blocks(IsoImageWriter *writer)
|
|||||||
uint32_t path_table_size;
|
uint32_t path_table_size;
|
||||||
|
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
target = writer->target;
|
target = writer->target;
|
||||||
@ -307,7 +307,7 @@ int ecma119_writer_write_vol_desc(IsoImageWriter *writer)
|
|||||||
char *abstract_file_id, *biblio_file_id;
|
char *abstract_file_id, *biblio_file_id;
|
||||||
|
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
t = writer->target;
|
t = writer->target;
|
||||||
@ -595,7 +595,7 @@ int ecma119_writer_write_data(IsoImageWriter *writer)
|
|||||||
Ecma119Image *t;
|
Ecma119Image *t;
|
||||||
|
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_NULL_POINTER;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
t = writer->target;
|
t = writer->target;
|
||||||
|
|
||||||
@ -656,7 +656,7 @@ int pad_writer_compute_data_blocks(IsoImageWriter *writer)
|
|||||||
Ecma119Image *target;
|
Ecma119Image *target;
|
||||||
|
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
target = writer->target;
|
target = writer->target;
|
||||||
@ -682,7 +682,7 @@ int pad_writer_write_data(IsoImageWriter *writer)
|
|||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
t = writer->target;
|
t = writer->target;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ int filesrc_writer_compute_data_blocks(IsoImageWriter *writer)
|
|||||||
int (*inc_item)(void *);
|
int (*inc_item)(void *);
|
||||||
|
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
t = writer->target;
|
t = writer->target;
|
||||||
@ -247,7 +247,7 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
|||||||
char buffer[BLOCK_SIZE];
|
char buffer[BLOCK_SIZE];
|
||||||
|
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
t = writer->target;
|
t = writer->target;
|
||||||
@ -272,8 +272,8 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
|||||||
* 0's to image
|
* 0's to image
|
||||||
*/
|
*/
|
||||||
char *name = iso_stream_get_name(file->stream);
|
char *name = iso_stream_get_name(file->stream);
|
||||||
res = iso_msg_submit(t->image->id, res, res, "File \"%s\" can't be"
|
res = iso_msg_submit(t->image->id, ISO_FILE_CANT_WRITE, res,
|
||||||
" opened (error %d). Filling with 0s.", name, res);
|
"File \"%s\" can't be opened. Filling with 0s.", name);
|
||||||
free(name);
|
free(name);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
return res; /* aborted due to error severity */
|
return res; /* aborted due to error severity */
|
||||||
@ -351,7 +351,7 @@ int iso_file_src_writer_create(Ecma119Image *target)
|
|||||||
|
|
||||||
writer = malloc(sizeof(IsoImageWriter));
|
writer = malloc(sizeof(IsoImageWriter));
|
||||||
if (writer == NULL) {
|
if (writer == NULL) {
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_ASSERT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
writer->compute_data_blocks = filesrc_writer_compute_data_blocks;
|
writer->compute_data_blocks = filesrc_writer_compute_data_blocks;
|
||||||
|
Loading…
Reference in New Issue
Block a user