libmount: clean up header file
* don't teach people C by header files, so use warn_unused_result attribute only on places where we return allocated memory (to avoid leaks in applications). * merge multiple function attributes to the one list to make it usable with gtk-doc Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
2bb7a706a1
commit
a3bb7e65c4
|
@ -89,6 +89,14 @@ mnt_context_strerror
|
|||
mnt_context_syscall_called
|
||||
mnt_context_tab_applied
|
||||
mnt_context_wait_for_children
|
||||
<SUBSECTION>
|
||||
MNT_ERR_AMBIFS
|
||||
MNT_ERR_APPLYFLAGS
|
||||
MNT_ERR_LOOPDEV
|
||||
MNT_ERR_MOUNTOPT
|
||||
MNT_ERR_NOFSTAB
|
||||
MNT_ERR_NOFSTYPE
|
||||
MNT_ERR_NOSOURCE
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
@ -145,6 +153,7 @@ MS_UNBINDABLE
|
|||
|
||||
<SECTION>
|
||||
<FILE>context-umount</FILE>
|
||||
mnt_context_find_umount_fs
|
||||
mnt_context_do_umount
|
||||
mnt_context_finalize_umount
|
||||
mnt_context_next_umount
|
||||
|
@ -182,6 +191,7 @@ mnt_fs_get_srcpath
|
|||
mnt_fs_get_swaptype
|
||||
mnt_fs_get_tag
|
||||
mnt_fs_get_target
|
||||
mnt_fs_get_tid
|
||||
mnt_fs_get_usedsize
|
||||
mnt_fs_get_userdata
|
||||
mnt_fs_get_user_options
|
||||
|
@ -325,6 +335,7 @@ mnt_update_table
|
|||
mnt_fstype_is_netfs
|
||||
mnt_fstype_is_pseudofs
|
||||
mnt_get_fstab_path
|
||||
mnt_get_mountpoint
|
||||
mnt_get_mtab_path
|
||||
mnt_get_swaps_path
|
||||
mnt_has_regular_mtab
|
||||
|
|
|
@ -1208,7 +1208,7 @@ dev_t mnt_fs_get_devno(struct libmnt_fs *fs)
|
|||
|
||||
/**
|
||||
* mnt_fs_get_tid:
|
||||
* @fs: /proc/<tid>/mountinfo entry
|
||||
* @fs: /proc/tid/mountinfo entry
|
||||
*
|
||||
* Returns: TID (task ID) for filesystems read from mountinfo file
|
||||
*/
|
||||
|
|
|
@ -123,13 +123,48 @@ enum {
|
|||
*
|
||||
* See also mnt_context_get_syscall_errno() and mnt_context_get_helper_status().
|
||||
*/
|
||||
#define MNT_ERR_NOFSTAB 5000 /* not found required entry in fstab */
|
||||
#define MNT_ERR_NOFSTYPE 5001 /* failed to detect filesystem type */
|
||||
#define MNT_ERR_NOSOURCE 5002 /* required mount source undefined */
|
||||
#define MNT_ERR_LOOPDEV 5003 /* loopdev setup failed, errno set by libc */
|
||||
#define MNT_ERR_MOUNTOPT 5004 /* failed to parse/use userspace mount options */
|
||||
#define MNT_ERR_APPLYFLAGS 5005 /* failed to apply MS_PROPAGATION flags */
|
||||
#define MNT_ERR_AMBIFS 5006 /* libblkid detected more filesystems on the device */
|
||||
/**
|
||||
* MNT_ERR_NOFSTAB:
|
||||
*
|
||||
* not found required entry in fstab
|
||||
*/
|
||||
#define MNT_ERR_NOFSTAB 5000
|
||||
/**
|
||||
* MNT_ERR_NOFSTYPE:
|
||||
*
|
||||
* failed to detect filesystem type
|
||||
*/
|
||||
#define MNT_ERR_NOFSTYPE 5001
|
||||
/**
|
||||
* MNT_ERR_NOSOURCE:
|
||||
*
|
||||
* required mount source undefined
|
||||
*/
|
||||
#define MNT_ERR_NOSOURCE 5002
|
||||
/**
|
||||
* MNT_ERR_LOOPDEV:
|
||||
*
|
||||
* loopdev setup failed, errno set by libc
|
||||
*/
|
||||
#define MNT_ERR_LOOPDEV 5003
|
||||
/**
|
||||
* MNT_ERR_MOUNTOPT:
|
||||
*
|
||||
* failed to parse/use userspace mount options
|
||||
*/
|
||||
#define MNT_ERR_MOUNTOPT 5004
|
||||
/**
|
||||
* MNT_ERR_APPLYFLAGS:
|
||||
*
|
||||
* failed to apply MS_PROPAGATION flags
|
||||
*/
|
||||
#define MNT_ERR_APPLYFLAGS 5005
|
||||
/**
|
||||
* MNT_ERR_AMBIFS:
|
||||
*
|
||||
* libblkid detected more filesystems on the device
|
||||
*/
|
||||
#define MNT_ERR_AMBIFS 5006
|
||||
|
||||
#ifndef __GNUC_PREREQ
|
||||
# if defined __GNUC__ && defined __GNUC_MINOR__
|
||||
|
@ -153,8 +188,7 @@ extern void mnt_init_debug(int mask);
|
|||
|
||||
/* version.c */
|
||||
extern int mnt_parse_version_string(const char *ver_string)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_get_library_version(const char **ver_string);
|
||||
extern int mnt_get_library_features(const char ***features);
|
||||
|
||||
|
@ -165,26 +199,20 @@ extern char *mnt_unmangle(const char *str)
|
|||
__ul_attribute__((warn_unused_result));
|
||||
|
||||
extern int mnt_fstype_is_netfs(const char *type)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fstype_is_pseudofs(const char *type)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_match_fstype(const char *type, const char *pattern)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
extern int mnt_match_options(const char *optstr, const char *pattern)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
extern const char *mnt_get_fstab_path(void)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
extern const char *mnt_get_swaps_path(void)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
extern const char *mnt_get_mtab_path(void)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
extern const char *mnt_get_fstab_path(void);
|
||||
extern const char *mnt_get_swaps_path(void);
|
||||
extern const char *mnt_get_mtab_path(void);
|
||||
extern int mnt_has_regular_mtab(const char **mtab, int *writable);
|
||||
extern char *mnt_get_mountpoint(const char *path)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull, warn_unused_result));
|
||||
|
||||
/* cache.c */
|
||||
extern struct libmnt_cache *mnt_new_cache(void)
|
||||
|
@ -200,8 +228,7 @@ extern int mnt_cache_device_has_tag(struct libmnt_cache *cache,
|
|||
__ul_attribute__((nonnull));
|
||||
|
||||
extern char *mnt_cache_find_tag_value(struct libmnt_cache *cache,
|
||||
const char *devname, const char *token)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
const char *devname, const char *token);
|
||||
|
||||
extern char *mnt_get_fstype(const char *devname, int *ambi,
|
||||
struct libmnt_cache *cache)
|
||||
|
@ -263,21 +290,18 @@ extern void mnt_free_iter(struct libmnt_iter *itr);
|
|||
extern void mnt_reset_iter(struct libmnt_iter *itr, int direction)
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_iter_get_direction(struct libmnt_iter *itr)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
/* optmap.c */
|
||||
enum {
|
||||
MNT_LINUX_MAP = 1,
|
||||
MNT_USERSPACE_MAP
|
||||
};
|
||||
extern const struct libmnt_optmap *mnt_get_builtin_optmap(int id)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
extern const struct libmnt_optmap *mnt_get_builtin_optmap(int id);
|
||||
|
||||
/* lock.c */
|
||||
extern struct libmnt_lock *mnt_new_lock(const char *datafile, pid_t id)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull, warn_unused_result));
|
||||
extern void mnt_free_lock(struct libmnt_lock *ml);
|
||||
|
||||
extern void mnt_unlock_file(struct libmnt_lock *ml)
|
||||
|
@ -294,28 +318,23 @@ extern void mnt_reset_fs(struct libmnt_fs *fs)
|
|||
__ul_attribute__((nonnull));
|
||||
extern struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest,
|
||||
const struct libmnt_fs *src)
|
||||
__ul_attribute__((nonnull(2)))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull(2), warn_unused_result));
|
||||
extern void *mnt_fs_get_userdata(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data);
|
||||
extern const char *mnt_fs_get_source(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_source(struct libmnt_fs *fs, const char *source);
|
||||
extern const char *mnt_fs_get_srcpath(struct libmnt_fs *fs)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
extern const char *mnt_fs_get_srcpath(struct libmnt_fs *fs);
|
||||
|
||||
extern int mnt_fs_get_tag(struct libmnt_fs *fs, const char **name,
|
||||
const char **value)
|
||||
__ul_attribute__((nonnull(1)));
|
||||
extern const char *mnt_fs_get_target(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_target(struct libmnt_fs *fs, const char *target);
|
||||
extern const char *mnt_fs_get_fstype(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_fstype(struct libmnt_fs *fs, const char *fstype);
|
||||
|
||||
extern int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path)
|
||||
|
@ -324,14 +343,11 @@ extern int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path)
|
|||
__ul_attribute__((warn_unused_result));
|
||||
|
||||
extern char *mnt_fs_strdup_options(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull, warn_unused_result));
|
||||
extern const char *mnt_fs_get_options(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull, warn_unused_result));
|
||||
extern const char *mnt_fs_get_optional_fields(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull, warn_unused_result));
|
||||
extern int mnt_fs_get_propagation(struct libmnt_fs *fs, unsigned long *flags);
|
||||
|
||||
extern int mnt_fs_set_options(struct libmnt_fs *fs, const char *optstr);
|
||||
|
@ -342,18 +358,14 @@ extern int mnt_fs_get_option(struct libmnt_fs *fs, const char *name,
|
|||
char **value, size_t *valsz);
|
||||
|
||||
extern const char *mnt_fs_get_fs_options(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern const char *mnt_fs_get_vfs_options(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern const char *mnt_fs_get_user_options(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern const char *mnt_fs_get_attributes(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_attributes(struct libmnt_fs *fs, const char *optstr);
|
||||
extern int mnt_fs_get_attribute(struct libmnt_fs *fs, const char *name,
|
||||
char **value, size_t *valsz);
|
||||
|
@ -361,87 +373,65 @@ extern int mnt_fs_append_attributes(struct libmnt_fs *fs, const char *optstr);
|
|||
extern int mnt_fs_prepend_attributes(struct libmnt_fs *fs, const char *optstr);
|
||||
|
||||
extern int mnt_fs_get_freq(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_freq(struct libmnt_fs *fs, int freq);
|
||||
extern int mnt_fs_get_passno(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_passno(struct libmnt_fs *fs, int passno);
|
||||
extern const char *mnt_fs_get_root(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_root(struct libmnt_fs *fs, const char *root);
|
||||
extern const char *mnt_fs_get_bindsrc(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_set_bindsrc(struct libmnt_fs *fs, const char *src);
|
||||
extern int mnt_fs_get_id(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_get_parent_id(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern dev_t mnt_fs_get_devno(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern pid_t mnt_fs_get_tid(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern const char *mnt_fs_get_swaptype(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern off_t mnt_fs_get_size(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern off_t mnt_fs_get_usedsize(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_get_priority(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_fs_match_target(struct libmnt_fs *fs, const char *target,
|
||||
struct libmnt_cache *cache)
|
||||
__ul_attribute__((nonnull(1)))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull(1)));
|
||||
extern int mnt_fs_match_source(struct libmnt_fs *fs, const char *source,
|
||||
struct libmnt_cache *cache)
|
||||
__ul_attribute__((nonnull(1)))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull(1)));
|
||||
extern int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types)
|
||||
__ul_attribute__((nonnull(1)))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull(1)));
|
||||
extern int mnt_fs_match_options(struct libmnt_fs *fs, const char *options)
|
||||
__ul_attribute__((nonnull(1)))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull(1)));
|
||||
extern int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file)
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_fs_is_kernel(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_is_swaparea(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_is_netfs(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_fs_is_pseudofs(struct libmnt_fs *fs)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern void mnt_free_mntent(struct mntent *mnt);
|
||||
extern int mnt_fs_to_mntent(struct libmnt_fs *fs, struct mntent **mnt);
|
||||
|
||||
/* tab-parse.c */
|
||||
extern struct libmnt_table *mnt_new_table_from_file(const char *filename)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull, warn_unused_result));
|
||||
extern struct libmnt_table *mnt_new_table_from_dir(const char *dirname)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull, warn_unused_result));
|
||||
extern int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f,
|
||||
const char *filename);
|
||||
extern int mnt_table_parse_file(struct libmnt_table *tb, const char *filename);
|
||||
|
@ -460,12 +450,10 @@ extern void mnt_free_table(struct libmnt_table *tb);
|
|||
|
||||
extern int mnt_reset_table(struct libmnt_table *tb);
|
||||
extern int mnt_table_get_nents(struct libmnt_table *tb)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_table_set_cache(struct libmnt_table *tb, struct libmnt_cache *mpc);
|
||||
extern struct libmnt_cache *mnt_table_get_cache(struct libmnt_table *tb)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_table_add_fs(struct libmnt_table *tb, struct libmnt_fs *fs);
|
||||
extern int mnt_table_remove_fs(struct libmnt_table *tb, struct libmnt_fs *fs);
|
||||
extern int mnt_table_next_fs(struct libmnt_table *tb, struct libmnt_iter *itr,
|
||||
|
@ -478,29 +466,23 @@ extern int mnt_table_set_iter(struct libmnt_table *tb, struct libmnt_iter *itr,
|
|||
|
||||
extern struct libmnt_fs *mnt_table_find_target(struct libmnt_table *tb,
|
||||
const char *path, int direction)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern struct libmnt_fs *mnt_table_find_srcpath(struct libmnt_table *tb,
|
||||
const char *path, int direction)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern struct libmnt_fs *mnt_table_find_tag(struct libmnt_table *tb, const char *tag,
|
||||
const char *val, int direction)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern struct libmnt_fs *mnt_table_find_source(struct libmnt_table *tb,
|
||||
const char *source, int direction)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern struct libmnt_fs *mnt_table_find_pair(struct libmnt_table *tb,
|
||||
const char *source,
|
||||
const char *target, int direction)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern struct libmnt_fs *mnt_table_find_devno(struct libmnt_table *tb,
|
||||
dev_t devno, int direction)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_table_find_next_fs(struct libmnt_table *tb,
|
||||
struct libmnt_iter *itr,
|
||||
|
@ -518,21 +500,17 @@ extern struct libmnt_update *mnt_new_update(void)
|
|||
extern void mnt_free_update(struct libmnt_update *upd);
|
||||
|
||||
extern int mnt_update_is_ready(struct libmnt_update *upd)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_update_set_fs(struct libmnt_update *upd, unsigned long mountflags,
|
||||
const char *target, struct libmnt_fs *fs);
|
||||
extern int mnt_update_table(struct libmnt_update *upd, struct libmnt_lock *lc);
|
||||
extern unsigned long mnt_update_get_mflags(struct libmnt_update *upd)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_update_force_rdonly(struct libmnt_update *upd, int rdonly);
|
||||
extern const char *mnt_update_get_filename(struct libmnt_update *upd)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
/* tab_diff.c */
|
||||
enum {
|
||||
|
@ -586,8 +564,7 @@ extern void mnt_free_context(struct libmnt_context *cxt);
|
|||
|
||||
extern int mnt_reset_context(struct libmnt_context *cxt);
|
||||
extern int mnt_context_is_restricted(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_init_helper(struct libmnt_context *cxt,
|
||||
int action, int flags);
|
||||
|
@ -608,84 +585,63 @@ extern int mnt_context_enable_fork(struct libmnt_context *cxt, int enable);
|
|||
extern int mnt_context_disable_swapmatch(struct libmnt_context *cxt, int disable);
|
||||
|
||||
extern int mnt_context_get_optsmode(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_lazy(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_rdonly_umount(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_sloppy(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_fake(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_nomtab(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_force(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_verbose(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_loopdel(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_nohelpers(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_nocanonicalize(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_swapmatch(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_is_fork(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_parent(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_is_child(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_wait_for_children(struct libmnt_context *cxt,
|
||||
int *nchildren, int *nerrs);
|
||||
|
||||
extern int mnt_context_is_fs_mounted(struct libmnt_context *cxt,
|
||||
struct libmnt_fs *fs, int *mounted)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_set_fs(struct libmnt_context *cxt, struct libmnt_fs *fs);
|
||||
extern struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_set_source(struct libmnt_context *cxt, const char *source);
|
||||
extern int mnt_context_set_target(struct libmnt_context *cxt, const char *target);
|
||||
extern int mnt_context_set_fstype(struct libmnt_context *cxt, const char *fstype);
|
||||
|
||||
extern const char *mnt_context_get_source(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern const char *mnt_context_get_target(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern const char *mnt_context_get_fstype(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_set_options(struct libmnt_context *cxt, const char *optstr);
|
||||
extern int mnt_context_append_options(struct libmnt_context *cxt, const char *optstr);
|
||||
|
||||
extern const char *mnt_context_get_options(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_set_fstype_pattern(struct libmnt_context *cxt, const char *pattern);
|
||||
extern int mnt_context_set_options_pattern(struct libmnt_context *cxt, const char *pattern);
|
||||
|
@ -700,8 +656,7 @@ extern int mnt_context_set_tables_errcb(struct libmnt_context *cxt,
|
|||
extern int mnt_context_set_fstab(struct libmnt_context *cxt,
|
||||
struct libmnt_table *tb);
|
||||
extern int mnt_context_get_fstab(struct libmnt_context *cxt,
|
||||
struct libmnt_table **tb)
|
||||
__ul_attribute__((warn_unused_result));
|
||||
struct libmnt_table **tb);
|
||||
|
||||
extern int mnt_context_get_mtab(struct libmnt_context *cxt,
|
||||
struct libmnt_table **tb);
|
||||
|
@ -711,11 +666,9 @@ extern int mnt_context_get_table(struct libmnt_context *cxt,
|
|||
extern int mnt_context_set_cache(struct libmnt_context *cxt,
|
||||
struct libmnt_cache *cache);
|
||||
extern struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_set_mflags(struct libmnt_context *cxt,
|
||||
unsigned long flags);
|
||||
extern int mnt_context_get_mflags(struct libmnt_context *cxt,
|
||||
|
@ -730,23 +683,18 @@ extern int mnt_context_apply_fstab(struct libmnt_context *cxt);
|
|||
|
||||
extern int mnt_context_reset_status(struct libmnt_context *cxt);
|
||||
extern int mnt_context_get_status(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_helper_executed(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_get_helper_status(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_syscall_called(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_get_syscall_errno(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
|
||||
extern int mnt_context_strerror(struct libmnt_context *cxt, char *buf,
|
||||
size_t bufsiz);
|
||||
|
@ -779,8 +727,7 @@ extern int mnt_context_do_umount(struct libmnt_context *cxt);
|
|||
extern int mnt_context_finalize_umount(struct libmnt_context *cxt);
|
||||
|
||||
extern int mnt_context_tab_applied(struct libmnt_context *cxt)
|
||||
__ul_attribute__((nonnull))
|
||||
__ul_attribute__((warn_unused_result));
|
||||
__ul_attribute__((nonnull));
|
||||
extern int mnt_context_set_syscall_status(struct libmnt_context *cxt, int status);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue