diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-01-12 00:24:51 -0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-16 08:33:34 +0100 |
commit | 246216c24eb60d2742aec18fa875c40a905ed223 (patch) | |
tree | e51c56d9df1254b565720b2214b6697716d5033a /include/fs.h | |
parent | 31551c89701c42f63d3f4352ed84e7842d0ba9fe (diff) | |
download | barebox-246216c24eb60d2742aec18fa875c40a905ed223.tar.gz barebox-246216c24eb60d2742aec18fa875c40a905ed223.tar.xz |
treewide: Introduce MAP_FAILED and replace ad-hoc constants with it
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/fs.h')
-rw-r--r-- | include/fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/fs.h b/include/fs.h index 181318f404..f1514afa92 100644 --- a/include/fs.h +++ b/include/fs.h @@ -130,6 +130,8 @@ int protect(int fd, size_t count, loff_t offset, int prot); int protect_file(const char *file, int prot); void *memmap(int fd, int flags); +#define MAP_FAILED ((void *)-1) + #define FILESIZE_MAX ((loff_t)-1) #define PROT_READ 1 |