mnt_context_disable_mtab
mnt_context_enable_fake
mnt_context_enable_force
+mnt_context_enable_fork
mnt_context_enable_lazy
mnt_context_enable_loopdel
mnt_context_enable_rdonly_umount
mnt_context_get_fs
mnt_context_get_fstab
mnt_context_get_fstype
+mnt_context_get_helper_status
mnt_context_get_lock
mnt_context_get_mflags
mnt_context_get_mtab
mnt_context_get_optsmode
mnt_context_get_source
mnt_context_get_status
+mnt_context_get_syscall_errno
mnt_context_get_table
mnt_context_get_target
mnt_context_get_user_mflags
+mnt_context_helper_executed
mnt_context_helper_setopt
mnt_context_init_helper
+mnt_context_is_child
mnt_context_is_fake
mnt_context_is_force
+mnt_context_is_fork
mnt_context_is_fs_mounted
mnt_context_is_lazy
mnt_context_is_nomtab
+mnt_context_is_parent
mnt_context_is_rdonly_umount
mnt_context_is_restricted
mnt_context_is_sloppy
mnt_context_is_verbose
+mnt_context_reset_status
mnt_context_set_cache
mnt_context_set_fs
mnt_context_set_fstab
mnt_context_set_options
mnt_context_set_options_pattern
mnt_context_set_optsmode
+mnt_context_set_passwd_cb
mnt_context_set_source
mnt_context_set_syscall_status
mnt_context_set_tables_errcb
mnt_context_set_target
mnt_context_set_user_mflags
mnt_context_strerror
+mnt_context_syscall_called
+mnt_context_wait_for_children
</SECTION>
<SECTION>
MNT_MS_OFFSET
MNT_MS_OWNER
MNT_MS_SIZELIMIT
+MNT_MS_ENCRYPTION
MNT_MS_UHELPER
MNT_MS_USER
MNT_MS_USERS
<FILE>context-umount</FILE>
mnt_context_do_umount
mnt_context_finalize_umount
+mnt_context_next_umount
mnt_context_prepare_umount
mnt_context_umount
</SECTION>
mnt_fs_get_user_options
mnt_fs_get_vfs_options
mnt_fs_is_kernel
+mnt_fs_is_swaparea
+mnt_fs_is_netfs
+mnt_fs_is_pseudofs
mnt_fs_match_fstype
mnt_fs_match_options
mnt_fs_match_source
MNT_INVERT
MNT_NOMTAB
MNT_PREFIX
+MNT_NOHLPS
</SECTION>
<SECTION>
mnt_table_next_child_fs
mnt_table_next_fs
mnt_table_parse_file
+mnt_table_parse_dir
mnt_table_parse_fstab
mnt_table_parse_mtab
mnt_table_parse_stream
mnt_fstype_is_netfs
mnt_fstype_is_pseudofs
mnt_get_fstab_path
-mnt_get_fstype
-mnt_get_library_version
mnt_get_mtab_path
mnt_has_regular_mtab
mnt_mangle
<FILE>version</FILE>
mnt_parse_version_string
mnt_get_library_version
+mnt_get_library_features
LIBMOUNT_VERSION
</SECTION>
/*
- * Copyright (C) 2010 Karel Zak <kzak@redhat.com>
+ * Copyright (C) 2010,2011,2012 Karel Zak <kzak@redhat.com>
*
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
* mnt_context_reset_status:
* @cxt: context
*
- * Resets mount(2) and mount.<type> statuses, so mnt_context_do_mount() or
+ * Resets mount(2) and mount.type statuses, so mnt_context_do_mount() or
* mnt_context_do_umount() could be again called with the same settings.
*
* BE CAREFUL -- after this soft reset the libmount will NOT parse mount
/**
* mnt_context_set_passwd_cb:
* @cxt: mount context
+ * @get: callback to get password
+ * @release: callback to release (delallocate) password
*
- * Sets callbacks for encryption password.
+ * Sets callbacks for encryption password (e.g encrypted loopdev)
*
* Returns: 0 on success, negative number in case of error.
*/
* mnt_context_get_helper_status:
* @cxt: mount context
*
- * Return: mount.<type> exit status, result is reliable only if
+ * Return: mount.type helper exit status, result is reliable only if
* mnt_context_helper_executed() returns 1.
*/
int mnt_context_get_helper_status(struct libmnt_context *cxt)
* another source or target than you have to call mnt_reset_context().
*
* If you want to call mount(2) for the same source and target with a diffrent
- * mount flags or fstype then you call mnt_context_reset_state() and then try
+ * mount flags or fstype then you call mnt_context_reset_status() and then try
* again mnt_context_do_mount().
*
* WARNING: non-zero return code does not mean that mount(2) syscall or
*
* Note that this function could be called only once. If you want to mount with
* different setting than you have to call mnt_reset_context(). It's NOT enough
- * to call mnt_context_reset_state() if you want call this function more than
+ * to call mnt_context_reset_status() if you want call this function more than
* once, whole context has to be reseted.
*
* WARNING: non-zero return code does not mean that mount(2) syscall or
/*
* mnt_context_helper_setopt() backend.
*
- * This function applies umount.<type> command line option (for example parsed
+ * This function applies umount.type command line option (for example parsed
* by getopt() or getopt_long()) to @cxt. All unknown options are ignored and
* then 1 is returned.
*
*
* Where does the link point to? Obvious choices are mtab and mtab~~.
* HJLu points out that the latter leads to races. Right now we use
- * mtab~.<pid> instead.
+ * mtab~.pid instead.
*
*
* The original mount locking code has used sleep(1) between attempts and
* backwardly compatible code.
*
* Don't forget that this code has to be compatible with 3rd party mounts
- * (/sbin/mount.<foo>) and has to work with NFS.
+ * (/sbin/mount.foo) and has to work with NFS.
* -- kzak@redhat.com [May-2009]
*/
/*
- * Copyright (C) 2008-2009 Karel Zak <kzak@redhat.com>
+ * Copyright (C) 2008,2009,2012 Karel Zak <kzak@redhat.com>
*
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
* @valsz: size of the value
* @next: returns pointer to the next option (optional argument)
- * Translates "<username>" or "useruid" to the real UID.
+ * Translates "username" or "useruid" to the real UID.
*
* For example:
* if (!mnt_optstr_get_option(optstr, "uid", &val, &valsz))
* @valsz: size of the value
* @next: returns pointer to the next option (optional argument)
- * Translates "<groupname>" or "usergid" to the real GID.
+ * Translates "groupname" or "usergid" to the real GID.
*
* Returns: 0 on success, negative number in case of error.
*/
/**
* mnt_diff_tables:
* @df: diff handler
- * @old: old table
- * @new: new table
+ * @old_tab: old table
+ * @new_tab: new table
*
- * Compares @old and @new, the result is stored in @df and accessible by
+ * Compares @old_tab and @new_tab, the result is stored in @df and accessible by
* mnt_tabdiff_next_change().
*
* Returns: number of changes, negative number in case of error.
*/
-int mnt_diff_tables(struct libmnt_tabdiff *df, struct libmnt_table *old,
- struct libmnt_table *new)
+int mnt_diff_tables(struct libmnt_tabdiff *df, struct libmnt_table *old_tab,
+ struct libmnt_table *new_tab)
{
struct libmnt_fs *fs;
struct libmnt_iter itr;
int no, nn;
- if (!df || !old || !new)
+ if (!df || !old_tab || !new_tab)
return -EINVAL;
tabdiff_reset(df);
- no = mnt_table_get_nents(old);
- nn = mnt_table_get_nents(new);
+ no = mnt_table_get_nents(old_tab);
+ nn = mnt_table_get_nents(new_tab);
if (!no && !nn) /* both tables are empty */
return 0;
DBG(DIFF, mnt_debug_h(df, "analyze new=%p (%d entries), "
"old=%p (%d entries)",
- new, nn, old, no));
+ new_tab, nn, old_tab, no));
mnt_reset_iter(&itr, MNT_ITER_FORWARD);
/* all mounted or umounted */
if (!no && nn) {
- while(mnt_table_next_fs(new, &itr, &fs) == 0)
+ while(mnt_table_next_fs(new_tab, &itr, &fs) == 0)
tabdiff_add_entry(df, NULL, fs, MNT_TABDIFF_MOUNT);
goto done;
} else if (no && !nn) {
- while(mnt_table_next_fs(old, &itr, &fs) == 0)
+ while(mnt_table_next_fs(old_tab, &itr, &fs) == 0)
tabdiff_add_entry(df, fs, NULL, MNT_TABDIFF_UMOUNT);
goto done;
}
/* search newly mounted or modified */
- while(mnt_table_next_fs(new, &itr, &fs) == 0) {
+ while(mnt_table_next_fs(new_tab, &itr, &fs) == 0) {
struct libmnt_fs *o_fs;
const char *src = mnt_fs_get_source(fs),
*tgt = mnt_fs_get_target(fs);
- o_fs = mnt_table_find_pair(old, src, tgt, MNT_ITER_FORWARD);
+ o_fs = mnt_table_find_pair(old_tab, src, tgt, MNT_ITER_FORWARD);
if (!o_fs)
/* 'fs' is not in the old table -- so newly mounted */
tabdiff_add_entry(df, NULL, fs, MNT_TABDIFF_MOUNT);
/* search umounted or moved */
mnt_reset_iter(&itr, MNT_ITER_FORWARD);
- while(mnt_table_next_fs(old, &itr, &fs) == 0) {
+ while(mnt_table_next_fs(old_tab, &itr, &fs) == 0) {
const char *src = mnt_fs_get_source(fs),
*tgt = mnt_fs_get_target(fs);
- if (!mnt_table_find_pair(new, src, tgt, MNT_ITER_FORWARD)) {
+ if (!mnt_table_find_pair(new_tab, src, tgt, MNT_ITER_FORWARD)) {
struct tabdiff_entry *de;
de = tabdiff_get_mount(df, src, mnt_fs_get_id(fs));
* @features: returns pointer to the static array of strings, the array is
* terminated by NULL.
*
- * Example:
+ * Returns: number of items in the features array not including the last NULL,
+ * or less then zero in case of error
*
+ * Example:
+ * <informalexample>
+ * <programlisting>
* const char *features;
*
* mnt_get_library_features(&features);
* while (features && *features)
* printf("%s\n", *features++);
+ * </programlisting>
+ * </informalexample>
*
- * Returns: number of items in the features array not including the last NULL,
- * or less then zero in case of error
*/
int mnt_get_library_features(const char ***features)
{