From 195dcaf45ccce941f0345b1d4c51d66ee15b9144 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 21 Mar 2025 12:22:42 +0100 Subject: [PATCH] mountlist: Add specification comment in .h file. * lib/mountlist.h (read_file_system_list): Move specification to here... * lib/mountlist.c (read_file_system_list): ...from here. --- ChangeLog | 6 ++++++ lib/mountlist.c | 6 +----- lib/mountlist.h | 5 +++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index fcb8fc2976..8111c9df7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-03-21 Bruno Haible + + mountlist: Add specification comment in .h file. + * lib/mountlist.h (read_file_system_list): Move specification to here... + * lib/mountlist.c (read_file_system_list): ...from here. + 2025-03-21 Bruno Haible mountlist: Work around an strtoul() misfeature. diff --git a/lib/mountlist.c b/lib/mountlist.c index 6cb947daaa..fae9bb50cb 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -457,12 +457,8 @@ terminate_at_blank (char *str) *s = '\0'; return s; } -#endif -/* Return a list of the currently mounted file systems, or NULL on error. - Add each entry to the tail of the list so that they stay in order. - If NEED_FS_TYPE is true, ensure that the file system type fields in - the returned list are valid. Otherwise, they might not be. */ +#endif struct mount_entry * read_file_system_list (bool need_fs_type) diff --git a/lib/mountlist.h b/lib/mountlist.h index 5b9da0846c..e8ba1d96f9 100644 --- a/lib/mountlist.h +++ b/lib/mountlist.h @@ -46,8 +46,13 @@ struct mount_entry struct mount_entry *me_next; }; +/* Return a list of the currently mounted file systems, or NULL on error. + Add each entry to the tail of the list so that they stay in order. + If NEED_FS_TYPE is true, ensure that the file system type fields in + the returned list are valid. Otherwise, they might not be. */ struct mount_entry *read_file_system_list (bool need_fs_type) _GL_ATTRIBUTE_MALLOC; + void free_mount_entry (struct mount_entry *entry); -- 2.39.5