Several improves in error codes.

- Code severity and priority in error codes.
- Added ERROR severity, suitable for function failures.
- Review libisofs errors and its severity.
This commit is contained in:
Vreixo Formoso
2008-01-20 22:28:27 +01:00
parent a076ae9df2
commit 1070fe4cc6
23 changed files with 331 additions and 211 deletions

View File

@ -164,13 +164,13 @@ int iso_data_source_new_from_file(const char *path, IsoDataSource **src)
data = malloc(sizeof(struct file_data_src));
if (data == NULL) {
return ISO_MEM_ERROR;
return ISO_OUT_OF_MEM;
}
ds = malloc(sizeof(IsoDataSource));
if (ds == NULL) {
free(data);
return ISO_MEM_ERROR;
return ISO_OUT_OF_MEM;
}
/* fill data fields */
@ -178,7 +178,7 @@ int iso_data_source_new_from_file(const char *path, IsoDataSource **src)
if (data->path == NULL) {
free(data);
free(ds);
return ISO_MEM_ERROR;
return ISO_OUT_OF_MEM;
}
data->fd = -1;