Squashed commit of the following:

binfmt/, configs/, grahics/, libc/, mm/, net/, sched/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
    arch/arm/src/stm32 and stm32f7:  Architecture-specific code is not permitted to modify the errno variable.  drivers/ and libc/:  OS references to the errno variable should always use the set_errno(), get_errno() macros
This commit is contained in:
Gregory Nutt
2018-01-30 17:57:36 -06:00
parent 30f2927101
commit 3521aaf944
28 changed files with 30 additions and 34 deletions
+2 -2
View File
@@ -98,7 +98,7 @@ static inline int modlib_filelen(FAR struct mod_loadinfo_s *loadinfo,
ret = stat(filename, &buf);
if (ret < 0)
{
int errval = errno;
int errval = get_errno();
serr("ERROR: Failed to stat file: %d\n", errval);
return -errval;
}
@@ -163,7 +163,7 @@ int modlib_initialize(FAR const char *filename,
loadinfo->filfd = open(filename, O_RDONLY);
if (loadinfo->filfd < 0)
{
int errval = errno;
int errval = get_errno();
serr("ERROR: Failed to open ELF binary %s: %d\n", filename, errval);
return -errval;
}
+1 -1
View File
@@ -121,7 +121,7 @@ int modlib_read(FAR struct mod_loadinfo_s *loadinfo, FAR uint8_t *buffer,
rpos = lseek(loadinfo->filfd, offset, SEEK_SET);
if (rpos != offset)
{
int errval = errno;
int errval = get_errno();
serr("ERROR: Failed to seek to position %lu: %d\n",
(unsigned long)offset, errval);
return -errval;