MAJOR=7
MINOR=2
DEVNAME=loop2
DEVTYPE=disk
DISKSEQ=7
  A   ˆl–ß=¿J*i?u4 �p¸ÛJbÑ¿�þ^•ØÖpNºÈQ6�üÿÊ„eÇYÉ_ˆI|¥�+y,ÉÈ ?÷     /* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * libmount.h - libmount API
 *
 * This file is part of libmount from util-linux project.
 *
 * Copyright (C) 2008-2018 Karel Zak <kzak@redhat.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef _LIBMOUNT_MOUNT_H
#define _LIBMOUNT_MOUNT_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdio.h>
#include <mntent.h>
#include <sys/types.h>

/* Make sure libc MS_* definitions are used by default. Note that MS_* flags
 * may be already defined by linux/fs.h or another file -- in this case we
 * don't want to include sys/mount.h at all to avoid collisions.
 */
#if defined(__linux__) && !defined(MS_RDONLY)
# include <sys/mount.h>
#endif

#define LIBMOUNT_VERSION   "2.38.1"
#define LIBMOUNT_MAJOR_VERSION   2
#define LIBMOUNT_MINOR_VERSION   38
#define LIBMOUNT_PATCH_VERSION   1

/**
 * libmnt_cache:
 *
 * Stores canonicalized paths and evaluated tags
 */
struct libmnt_cache;

/**
 * libmnt_lock:
 *
 * Stores information about the locked file (e.g. /etc/mtab)
 */
struct libmnt_lock;

/**
 * libmnt_iter:
 *
 * Generic iterator (stores state about lists)
 */
struct libmnt_iter;

/**
 * libmnt_optmap:
 * @name: option name[=type] where type is printf-like type specifier")
 * @id: option ID or MS_* flags (e.g MS_RDONLY)
 * @mask: MNT_{NOMTAB,INVERT,...} mask
 *
 * Mount options description (map)
 */
struct libmnt_optmap
{
	const char	*name;
	int		id;
	int		mask;
};

/*
 * mount options map masks
 */
#define MNT_INVERT	(1 << 1) /* invert the mountflag */
#define MNT_NOMTAB	(1 << 2) /* skip in the mtab option string */
#define MNT_PREFIX	(1 << 3) /* prefix used for some options (e.g. "x-foo") */
#define MNT_NOHLPS	(1 << 4) /* don't add the option to mount.<type> helpers command line */

/**
 * libmnt_fs:
 *
 * Parsed fstab/mtab/mountinfo entry
 */
struct libmnt_fs;

/**
 * libmnt_table:
 *
 * List of struct libmnt_fs entries (parsed fstab/mtab/mountinfo)
 */
struct libmnt_table;

/**
 * libmnt_update
 *
 * /etc/mtab or utab update description
 */
struct libmnt_update;

/**
 * libmnt_context
 *
 * Mount/umount status
 */
struct libmnt_context;

/**
 * libmnt_monitor
 *
 * Mount tables monitor
 */
struct libmnt_monitor;

/**
 * libmnt_tabdiff:
 *
 * Stores mountinfo state
 */
struct libmnt_tabdiff;

/**
 * libmnt_ns:
 *
 * Describes mount namespace
 */
struct libmnt_ns;

/*
 * Actions
 */
enum {
	MNT_ACT_MOUNT = 1,
	MNT_ACT_UMOUNT
};

/*
 * Errors -- by default libmount returns -errno for generic errors (ENOMEM,
 * EINVAL, ...) and for mount(2) errors, but for some specific operations it
 * returns private error codes. Note that maximum system errno value should be
 * 4095 on UNIXes.
 *
 * See also mnt_context_get_syscall_errno() and mnt_context_get_helper_status().
 */
/**
 * 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 M