Add set/get/endfsent() support for musl libc

This patch adds support for the following /etc/fstab API's on systems
that do not have them, e.g. musl libc on Alpine Linux.

- setfsent()
- getfsent(), and
- endfsent()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-08-02 00:50:23 +02:00
1 parent 7eac88b639
commit c38b452ac4
4 files changed
+59 -1

No files matched your search

+16
View File
@@ -86,6 +86,22 @@ int run_interactive (char *cmd, char *fmt, ...);
pid_t run_getty (char *tty, char *speed, char *term, int console);
int run_parts (char *dir, char *cmd);
#ifndef HAVE_GETFSENT
struct fstab {
char *fs_spec; /* block device name */
char *fs_file; /* mount point */
char *fs_vfstype; /* file-system type */
char *fs_mntops; /* mount options */
const char *fs_type; /* rw/rq/ro/sw/xx option */
int fs_freq; /* dump frequency, in days */
int fs_passno; /* pass number on parallel dump */
};
int setfsent(void);
void endfsent(void);
struct fstab *getfsent(void);
#endif /* HAVE_GETFSENT */
#endif /* FINIT_HELPERS_H_ */
/**