mntent.h 614 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <stdio.h>
  8. #include <sys/cdefs.h>
  9. __BEGIN_DECLS
  10. #define MOUNTED "/etc/mtab"
  11. #define MNTTAB "/etc/fstab"
  12. struct mntent {
  13. char* mnt_fsname;
  14. char* mnt_dir;
  15. char* mnt_type;
  16. char* mnt_opts;
  17. int mnt_freq;
  18. int mnt_passno;
  19. };
  20. struct mntent* getmntent(FILE* stream);
  21. FILE* setmntent(char const* filename, char const* type);
  22. int endmntent(FILE* streamp);
  23. struct mntent* getmntent_r(FILE* streamp, struct mntent* mntbuf, char* buf, int buflen);
  24. __END_DECLS