mount.h 899 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: LGPL-2.1 OR MIT */
  2. /*
  3. * Mount definitions for NOLIBC
  4. * Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu>
  5. */
  6. /* make sure to include all global symbols */
  7. #include "../nolibc.h"
  8. #ifndef _NOLIBC_SYS_MOUNT_H
  9. #define _NOLIBC_SYS_MOUNT_H
  10. #include "../sys.h"
  11. #include <linux/mount.h>
  12. /*
  13. * int mount(const char *source, const char *target,
  14. * const char *fstype, unsigned long flags,
  15. * const void *data);
  16. */
  17. static __attribute__((unused))
  18. int sys_mount(const char *src, const char *tgt, const char *fst,
  19. unsigned long flags, const void *data)
  20. {
  21. return my_syscall5(__NR_mount, src, tgt, fst, flags, data);
  22. }
  23. static __attribute__((unused))
  24. int mount(const char *src, const char *tgt,
  25. const char *fst, unsigned long flags,
  26. const void *data)
  27. {
  28. return __sysret(sys_mount(src, tgt, fst, flags, data));
  29. }
  30. #endif /* _NOLIBC_SYS_MOUNT_H */