linux/include/uapi/linux/auto_fs.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 * Copyright 1997 Transmeta Corporation - All Rights Reserved
 * Copyright 1999-2000 Jeremy Fitzhardinge <[email protected]>
 * Copyright 2005-2006,2013,2017-2018 Ian Kent <[email protected]>
 *
 * This file is part of the Linux kernel and is made available under
 * the terms of the GNU General Public License, version 2, or at your
 * option, any later version, incorporated herein by reference.
 *
 * ----------------------------------------------------------------------- */

#ifndef _UAPI_LINUX_AUTO_FS_H
#define _UAPI_LINUX_AUTO_FS_H

#include <linux/types.h>
#include <linux/limits.h>
#ifndef __KERNEL__
#include <sys/ioctl.h>
#endif /* __KERNEL__ */

#define AUTOFS_PROTO_VERSION
#define AUTOFS_MIN_PROTO_VERSION
#define AUTOFS_MAX_PROTO_VERSION

#define AUTOFS_PROTO_SUBVERSION

/*
 * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
 * back to the kernel via ioctl from userspace. On architectures where 32- and
 * 64-bit userspace binaries can be executed it's important that the size of
 * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we
 * do not break the binary ABI interface by changing the structure size.
 */
#if defined(__ia64__) || defined(__alpha__) /* pure 64bit architectures */
typedef unsigned long autofs_wqt_t;
#else
autofs_wqt_t;
#endif

/* Packet types */
#define autofs_ptype_missing
#define autofs_ptype_expire

struct autofs_packet_hdr {};

struct autofs_packet_missing {};	

/* v3 expire (via ioctl) */
struct autofs_packet_expire {};

#define AUTOFS_IOCTL

enum {};

#define AUTOFS_IOC_READY
#define AUTOFS_IOC_FAIL
#define AUTOFS_IOC_CATATONIC
#define AUTOFS_IOC_PROTOVER
#define AUTOFS_IOC_SETTIMEOUT32
#define AUTOFS_IOC_SETTIMEOUT
#define AUTOFS_IOC_EXPIRE

/* autofs version 4 and later definitions */

/* Mask for expire behaviour */
#define AUTOFS_EXP_NORMAL
#define AUTOFS_EXP_IMMEDIATE
#define AUTOFS_EXP_LEAVES
#define AUTOFS_EXP_FORCED

#define AUTOFS_TYPE_ANY
#define AUTOFS_TYPE_INDIRECT
#define AUTOFS_TYPE_DIRECT
#define AUTOFS_TYPE_OFFSET

static inline void set_autofs_type_indirect(unsigned int *type)
{}

static inline unsigned int autofs_type_indirect(unsigned int type)
{}

static inline void set_autofs_type_direct(unsigned int *type)
{}

static inline unsigned int autofs_type_direct(unsigned int type)
{}

static inline void set_autofs_type_offset(unsigned int *type)
{}

static inline unsigned int autofs_type_offset(unsigned int type)
{}

static inline unsigned int autofs_type_trigger(unsigned int type)
{}

/*
 * This isn't really a type as we use it to say "no type set" to
 * indicate we want to search for "any" mount in the
 * autofs_dev_ioctl_ismountpoint() device ioctl function.
 */
static inline void set_autofs_type_any(unsigned int *type)
{}

static inline unsigned int autofs_type_any(unsigned int type)
{}

/* Daemon notification packet types */
enum autofs_notify {};

/* Kernel protocol version 4 packet types */

/* Expire entry (umount request) */
#define autofs_ptype_expire_multi

/* Kernel protocol version 5 packet types */

/* Indirect mount missing and expire requests. */
#define autofs_ptype_missing_indirect
#define autofs_ptype_expire_indirect

/* Direct mount missing and expire requests */
#define autofs_ptype_missing_direct
#define autofs_ptype_expire_direct

/* v4 multi expire (via pipe) */
struct autofs_packet_expire_multi {};

autofs_packet_union;

/* autofs v5 common packet struct */
struct autofs_v5_packet {};

autofs_packet_missing_indirect_t;
autofs_packet_expire_indirect_t;
autofs_packet_missing_direct_t;
autofs_packet_expire_direct_t;

autofs_v5_packet_union;

enum {};

#define AUTOFS_IOC_EXPIRE_MULTI
#define AUTOFS_IOC_PROTOSUBVER
#define AUTOFS_IOC_ASKUMOUNT

#endif /* _UAPI_LINUX_AUTO_FS_H */