Blame include/linux/auto_fs.h

Packit 8480eb
/* -*- linux-c -*- ------------------------------------------------------- *
Packit 8480eb
 *   
Packit 8480eb
 * linux/include/linux/auto_fs.h
Packit 8480eb
 *
Packit 8480eb
 *   Copyright 1997 Transmeta Corporation - All Rights Reserved
Packit 8480eb
 *
Packit 8480eb
 * This file is part of the Linux kernel and is made available under
Packit 8480eb
 * the terms of the GNU General Public License, version 2, or at your
Packit 8480eb
 * option, any later version, incorporated herein by reference.
Packit 8480eb
 *
Packit 8480eb
 * ----------------------------------------------------------------------- */
Packit 8480eb
Packit 8480eb
Packit 8480eb
#ifndef _LINUX_AUTO_FS_H
Packit 8480eb
#define _LINUX_AUTO_FS_H
Packit 8480eb
Packit 8480eb
#include <linux/types.h>
Packit 8480eb
#ifndef __KERNEL__
Packit 8480eb
#include <sys/ioctl.h>
Packit 8480eb
#endif /* __KERNEL__ */
Packit 8480eb
Packit 8480eb
/* This file describes autofs v3 */
Packit 8480eb
#define AUTOFS_PROTO_VERSION	3
Packit 8480eb
Packit 8480eb
/* Range of protocol versions defined */
Packit 8480eb
#define AUTOFS_MAX_PROTO_VERSION	AUTOFS_PROTO_VERSION
Packit 8480eb
#define AUTOFS_MIN_PROTO_VERSION	AUTOFS_PROTO_VERSION
Packit 8480eb
Packit 8480eb
/*
Packit 8480eb
 * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
Packit 8480eb
 * back to the kernel via ioctl from userspace. On architectures where 32- and
Packit 8480eb
 * 64-bit userspace binaries can be executed it's important that the size of
Packit 8480eb
 * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we
Packit 8480eb
 * do not break the binary ABI interface by changing the structure size.
Packit 8480eb
 */
Packit 8480eb
#if defined(__ia64__) || defined(__alpha__) /* pure 64bit architectures */
Packit 8480eb
typedef unsigned long autofs_wqt_t;
Packit 8480eb
#else
Packit 8480eb
typedef unsigned int autofs_wqt_t;
Packit 8480eb
#endif
Packit 8480eb
Packit 8480eb
/* Packet types */
Packit 8480eb
#define autofs_ptype_missing	0	/* Missing entry (mount request) */
Packit 8480eb
#define autofs_ptype_expire	1	/* Expire entry (umount request) */
Packit 8480eb
Packit 8480eb
struct autofs_packet_hdr {
Packit 8480eb
	int proto_version;		/* Protocol version */
Packit 8480eb
	int type;			/* Type of packet */
Packit 8480eb
};
Packit 8480eb
Packit 8480eb
/* v3 missing */
Packit 8480eb
struct autofs_packet_missing {
Packit 8480eb
	struct autofs_packet_hdr hdr;
Packit 8480eb
        autofs_wqt_t wait_queue_token;
Packit 8480eb
	int len;
Packit 8480eb
	char name[NAME_MAX+1];
Packit 8480eb
};	
Packit 8480eb
Packit 8480eb
/* v3 expire (via ioctl) */
Packit 8480eb
struct autofs_packet_expire {
Packit 8480eb
	struct autofs_packet_hdr hdr;
Packit 8480eb
	int len;
Packit 8480eb
	char name[NAME_MAX+1];
Packit 8480eb
};
Packit 8480eb
Packit 8480eb
#define AUTOFS_IOC_READY      _IO(0x93,0x60)
Packit 8480eb
#define AUTOFS_IOC_FAIL       _IO(0x93,0x61)
Packit 8480eb
#define AUTOFS_IOC_CATATONIC  _IO(0x93,0x62)
Packit 8480eb
#define AUTOFS_IOC_PROTOVER   _IOR(0x93,0x63,int)
Packit 8480eb
#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,compat_ulong_t)
Packit 8480eb
#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)
Packit 8480eb
#define AUTOFS_IOC_EXPIRE     _IOR(0x93,0x65,struct autofs_packet_expire)
Packit 8480eb
Packit 8480eb
#endif /* _LINUX_AUTO_FS_H */