summaryrefslogtreecommitdiffstats
path: root/gl/mountlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/mountlist.h')
-rw-r--r--gl/mountlist.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/gl/mountlist.h b/gl/mountlist.h
index aed7f887..e8ba1d96 100644
--- a/gl/mountlist.h
+++ b/gl/mountlist.h
@@ -1,6 +1,6 @@
1/* mountlist.h -- declarations for list of mounted file systems 1/* mountlist.h -- declarations for list of mounted file systems
2 2
3 Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2023 Free Software 3 Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2025 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This program is free software: you can redistribute it and/or modify 6 This program is free software: you can redistribute it and/or modify
@@ -17,9 +17,19 @@
17 along with this program. If not, see <https://www.gnu.org/licenses/>. */ 17 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18 18
19#ifndef MOUNTLIST_H_ 19#ifndef MOUNTLIST_H_
20# define MOUNTLIST_H_ 20#define MOUNTLIST_H_
21
22/* This file uses _GL_ATTRIBUTE_MALLOC. */
23#if !_GL_CONFIG_H_INCLUDED
24# error "Please include config.h first."
25#endif
26
27#include <sys/types.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
21 32
22# include <sys/types.h>
23 33
24/* A mount table entry. */ 34/* A mount table entry. */
25struct mount_entry 35struct mount_entry
@@ -36,8 +46,18 @@ struct mount_entry
36 struct mount_entry *me_next; 46 struct mount_entry *me_next;
37}; 47};
38 48
49/* Return a list of the currently mounted file systems, or NULL on error.
50 Add each entry to the tail of the list so that they stay in order.
51 If NEED_FS_TYPE is true, ensure that the file system type fields in
52 the returned list are valid. Otherwise, they might not be. */
39struct mount_entry *read_file_system_list (bool need_fs_type) 53struct mount_entry *read_file_system_list (bool need_fs_type)
40 _GL_ATTRIBUTE_MALLOC; 54 _GL_ATTRIBUTE_MALLOC;
55
41void free_mount_entry (struct mount_entry *entry); 56void free_mount_entry (struct mount_entry *entry);
42 57
58
59#ifdef __cplusplus
60}
61#endif
62
43#endif 63#endif