| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | /* mountlist.h -- a library for getting informations about filesystems |
| 3 | |
| 4 | This program is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by |
| 6 | the Free Software Foundation; either version 3 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 16 | |
| 17 | #ifndef _MOUNTLIST_H |
| 18 | #define _MOUNTLIST_H 1 |
| 19 | |
| 20 | #include <sys/types.h> |
| 21 | #include "system.h" |
| 22 | |
| 23 | /* A mount table entry. */ |
| 24 | struct mount_entry |
| 25 | { |
| 26 | char *me_devname; /* Device node name, including "/dev/". */ |
| 27 | char *me_mountdir; /* Mount point directory name. */ |
| 28 | char *me_type; /* "nfs", "4.2", etc. */ |
| 29 | char *me_opts; /* Comma-separated options for fs. */ |
| 30 | dev_t me_dev; /* Device number of me_mountdir. */ |
| 31 | unsigned int me_dummy : 1; /* Nonzero for dummy file systems. */ |
| 32 | unsigned int me_remote : 1; /* Nonzero for remote fileystems. */ |
| 33 | unsigned int me_readonly : 1; /* Nonzero for readonly fileystems. */ |
| 34 | unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */ |
| 35 | unsigned int me_opts_malloced : 1; /* Nonzero if me_opts was malloced. */ |
| 36 | struct mount_entry *me_next; |
| 37 | }; |
| 38 | |
| 39 | struct mount_entry *read_file_system_list (bool need_fs_type); |
| 40 | int file_system_type_exists (const char *fs_type, char **fs_mp); |
| 41 | |
| 42 | #endif /* mountlist.h */ |