summaryrefslogtreecommitdiff
path: root/tools/include/nolibc/nolibc.h
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2022-02-07 17:23:25 +0100
committerPaul E. McKenney <paulmck@kernel.org>2022-04-20 17:05:43 -0700
commiteba6d00d38e7c26dd5b948ed75200d05f67d8266 (patch)
tree91a2ca56b83b772b0ef6af563ea25b1fbdffa49b /tools/include/nolibc/nolibc.h
parent306c9fd4c686eebf4e0487bc4ad5dca8e68c19be (diff)
tools/nolibc/types: move makedev to types.h and make it a macro
The makedev() man page says it's supposed to be a macro and that some OSes have it with the other ones in sys/types.h so it now makes sense to move it to types.h as a macro. Let's also define major() and minor() that perform the reverse operation. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/include/nolibc/nolibc.h')
-rw-r--r--tools/include/nolibc/nolibc.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h
index 2267d98337ea..23fb81414b1b 100644
--- a/tools/include/nolibc/nolibc.h
+++ b/tools/include/nolibc/nolibc.h
@@ -116,13 +116,4 @@ const char *ltoa(long in)
return pos + 1;
}
-/* Here come a few helper functions */
-
-/* WARNING, it only deals with the 4096 first majors and 256 first minors */
-static __attribute__((unused))
-dev_t makedev(unsigned int major, unsigned int minor)
-{
- return ((major & 0xfff) << 8) | (minor & 0xff);
-}
-
#endif /* _NOLIBC_H */