@@ -337,7 +337,7 @@ typedef bool(*dbll_init_fxn) (void);
* pulEntry - Location to store program entry on output.
* Returns:
* DSP_SOK: Success.
- * DSP_EFREAD: File read failed.
+ * -EBADF: File read failed.
* DSP_EFWRITE: Write to target failed.
* DSP_EDYNLOAD: Failure in dynamic loader library.
* Requires:
@@ -386,7 +386,7 @@ typedef dsp_status(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,
* DSP_SOK: Success.
* -ENOMEM: Memory allocation failure.
* -EBADF: File open failure.
- * DSP_EFREAD: File read failure.
+ * -EBADF: File read failure.
* DSP_ECORRUPTFILE: Unable to determine target type.
* Requires:
* DBL initialized.
@@ -162,9 +162,6 @@
/* Unable to find a named section in DSP executable */
#define DSP_ENOSECT (DSP_EBASE + 0x32)
-/* Unable to read file */
-#define DSP_EFREAD (DSP_EBASE + 0x34)
-
/* A non-existent memory segment identifier was specified */
#define DSP_EOVERLAYMEMORY (DSP_EBASE + 0x37)
@@ -149,7 +149,7 @@ static s32 cod_f_read(void __user *pbuffer, s32 size, s32 cCount,
set_fs(fs);
if (!dw_bytes_read)
- return DSP_EFREAD;
+ return -EBADF;
return dw_bytes_read / size;
}
@@ -795,7 +795,7 @@ dsp_status dbll_read_sect(struct dbll_library_obj *lib, char *name,
status = DSP_EFAIL;
} else {
if (!dload_get_section(zl_lib->desc, sect, pContent))
- status = DSP_EFREAD;
+ status = -EBADF;
}
func_cont: