FIO: Emit reasonable error message when shm_open() API isn't available locally
This commit is contained in:
parent
89cd2d458f
commit
d0c7276dd7
1 changed files with 4 additions and 1 deletions
|
@ -682,7 +682,10 @@ return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (__linux__) || defined (__APPLE__) || defined (__CYGWIN__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)
|
#if defined (__linux__) || defined (__APPLE__) || defined (__CYGWIN__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)
|
||||||
|
|
||||||
|
#if defined (HAVE_SHM_OPEN)
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
struct SHMEM {
|
struct SHMEM {
|
||||||
int shm_fd;
|
int shm_fd;
|
||||||
|
@ -751,7 +754,7 @@ if ((*shmem)->shm_base == MAP_FAILED) {
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
#else
|
#else
|
||||||
*shmem = NULL;
|
*shmem = NULL;
|
||||||
return SCPE_NOFNC;
|
return sim_messagef (SCPE_NOFNC, "Shared memory not available - Missing shm_open() API\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue