Blame include/mounts.h

Packit Service a4b2a9
/* ----------------------------------------------------------------------- *
Packit Service a4b2a9
 *
Packit Service a4b2a9
 *  mounts.h - header file for mount utilities module.
Packit Service a4b2a9
 *
Packit Service a4b2a9
 *   Copyright 2008 Red Hat, Inc. All rights reserved.
Packit Service a4b2a9
 *   Copyright 2004-2006 Ian Kent <raven@themaw.net> - All Rights Reserved.
Packit Service a4b2a9
 *
Packit Service a4b2a9
 *   This program is free software; you can redistribute it and/or modify
Packit Service a4b2a9
 *   it under the terms of the GNU General Public License as published by
Packit Service a4b2a9
 *   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
Packit Service a4b2a9
 *   USA; either version 2 of the License, or (at your option) any later
Packit Service a4b2a9
 *   version; incorporated herein by reference.
Packit Service a4b2a9
 *
Packit Service a4b2a9
 * ----------------------------------------------------------------------- */
Packit Service a4b2a9
Packit Service a4b2a9
#ifndef MOUNTS_H
Packit Service a4b2a9
#define MOUNTS_H
Packit Service a4b2a9
Packit Service a4b2a9
#include <linux/version.h>
Packit Service a4b2a9
#include <sys/utsname.h>
Packit Service a4b2a9
Packit Service a4b2a9
#ifndef AUTOFS_TYPE_ANY
Packit Service a4b2a9
#define AUTOFS_TYPE_ANY		0x0000
Packit Service a4b2a9
#endif
Packit Service a4b2a9
#ifndef AUTOFS_TYPE_INDIRECT
Packit Service a4b2a9
#define AUTOFS_TYPE_INDIRECT	0x0001
Packit Service a4b2a9
#endif
Packit Service a4b2a9
#ifndef AUTOFS_TYPE_DIRECT
Packit Service a4b2a9
#define AUTOFS_TYPE_DIRECT	0x0002
Packit Service a4b2a9
#endif
Packit Service a4b2a9
#ifndef AUTOFS_TYPE_OFFSET
Packit Service a4b2a9
#define AUTOFS_TYPE_OFFSET	0x0004
Packit Service a4b2a9
#endif
Packit Service a4b2a9
Packit Service a4b2a9
#define MNTS_ALL	0x0001
Packit Service a4b2a9
#define MNTS_REAL	0x0002
Packit Service a4b2a9
#define MNTS_AUTOFS	0x0004
Packit Service 9c3f8f
#define MNTS_INDIRECT	0x0008
Packit Service 9c3f8f
#define MNTS_DIRECT	0x0010
Packit Service 9c3f8f
#define MNTS_OFFSET	0x0020
Packit Service a4b2a9
Packit Service a4b2a9
#define REMOUNT_SUCCESS		0x0000
Packit Service a4b2a9
#define REMOUNT_FAIL		0x0001
Packit Service a4b2a9
#define REMOUNT_OPEN_FAIL	0x0002
Packit Service a4b2a9
#define REMOUNT_STAT_FAIL	0x0004
Packit Service a4b2a9
#define REMOUNT_READ_MAP	0x0008
Packit Service a4b2a9
Packit Service a4b2a9
extern const unsigned int t_indirect;
Packit Service a4b2a9
extern const unsigned int t_direct;
Packit Service a4b2a9
extern const unsigned int t_offset;
Packit Service a4b2a9
Packit Service a4b2a9
struct mapent;
Packit Service a4b2a9
Packit Service a4b2a9
struct mnt_list {
Packit Service 2c4bba
	char *mp;
Packit Service 9c3f8f
	unsigned int flags;
Packit Service a4b2a9
	/*
Packit Service a4b2a9
	 * List operations ie. get_mnt_list.
Packit Service a4b2a9
	 */
Packit Service a4b2a9
	struct mnt_list *next;
Packit Service a4b2a9
	/*
Packit Service a4b2a9
	 * Tree operations ie. tree_make_tree,
Packit Service a4b2a9
	 * tree_get_mnt_list etc.
Packit Service a4b2a9
	 */
Packit Service a4b2a9
	struct mnt_list *left;
Packit Service a4b2a9
	struct mnt_list *right;
Packit Service a4b2a9
	struct list_head self;
Packit Service a4b2a9
	struct list_head list;
Packit Service a4b2a9
	struct list_head entries;
Packit Service a4b2a9
	struct list_head sublist;
Packit Service a4b2a9
};
Packit Service a4b2a9
Packit Service a4b2a9
Packit Service a4b2a9
struct nfs_mount_vers {
Packit Service a4b2a9
	unsigned int major;
Packit Service a4b2a9
	unsigned int minor;
Packit Service a4b2a9
	unsigned int fix;
Packit Service a4b2a9
};
Packit Service a4b2a9
unsigned int linux_version_code(void);
Packit Service a4b2a9
int check_nfs_mount_version(struct nfs_mount_vers *, struct nfs_mount_vers *);
Packit Service a4b2a9
extern unsigned int nfs_mount_uses_string_options;
Packit Service a4b2a9
Packit Service a4b2a9
struct amd_entry;
Packit Service a4b2a9
Packit Service a4b2a9
struct substvar *addstdenv(struct substvar *sv, const char *prefix);
Packit Service a4b2a9
struct substvar *removestdenv(struct substvar *sv, const char *prefix);
Packit Service a4b2a9
void add_std_amd_vars(struct substvar *sv);
Packit Service a4b2a9
void remove_std_amd_vars(void);
Packit Service a4b2a9
struct amd_entry *new_amd_entry(const struct substvar *sv);
Packit Service a4b2a9
void clear_amd_entry(struct amd_entry *entry);
Packit Service a4b2a9
void free_amd_entry(struct amd_entry *entry);
Packit Service a4b2a9
void free_amd_entry_list(struct list_head *entries);
Packit Service a4b2a9
Packit Service a4b2a9
unsigned int query_kproto_ver(void);
Packit Service a4b2a9
unsigned int get_kver_major(void);
Packit Service a4b2a9
unsigned int get_kver_minor(void);
Packit Service a4b2a9
char *make_options_string(char *path, int kernel_pipefd, const char *extra);
Packit Service a4b2a9
char *make_mnt_name_string(char *path);
Packit Service a4b2a9
int ext_mount_add(struct list_head *, const char *, unsigned int);
Packit Service a4b2a9
int ext_mount_remove(struct list_head *, const char *);
Packit Service a4b2a9
int ext_mount_inuse(const char *);
Packit Service a4b2a9
struct mnt_list *get_mnt_list(const char *table, const char *path, int include);
Packit Service a4b2a9
void free_mnt_list(struct mnt_list *list);
Packit Service 2c4bba
int is_mounted(const char *table, const char *mp, unsigned int type);
Packit Service a4b2a9
void tree_free_mnt_tree(struct mnt_list *tree);
Packit Service a4b2a9
struct mnt_list *tree_make_mnt_tree(const char *table, const char *path);
Packit Service a4b2a9
int tree_get_mnt_list(struct mnt_list *mnts, struct list_head *list, const char *path, int include);
Packit Service a4b2a9
int tree_get_mnt_sublist(struct mnt_list *mnts, struct list_head *list, const char *path, int include);
Packit Service a4b2a9
int tree_find_mnt_ents(struct mnt_list *mnts, struct list_head *list, const char *path);
Packit Service a4b2a9
int tree_is_mounted(struct mnt_list *mnts, const char *path, unsigned int type);
Packit Service a4b2a9
void set_tsd_user_vars(unsigned int, uid_t, gid_t);
Packit Service a4b2a9
const char *mount_type_str(unsigned int);
Packit Service a4b2a9
void set_exp_timeout(struct autofs_point *ap, struct map_source *source, time_t timeout);
Packit Service a4b2a9
time_t get_exp_timeout(struct autofs_point *ap, struct map_source *source);
Packit Service a4b2a9
void notify_mount_result(struct autofs_point *, const char *, time_t, const char *);
Packit Service a4b2a9
int try_remount(struct autofs_point *, struct mapent *, unsigned int);
Packit Service a4b2a9
void set_indirect_mount_tree_catatonic(struct autofs_point *);
Packit Service a4b2a9
void set_direct_mount_tree_catatonic(struct autofs_point *, struct mapent *);
Packit Service a4b2a9
int umount_ent(struct autofs_point *, const char *);
Packit Service a4b2a9
int umount_amd_ext_mount(struct autofs_point *, struct amd_entry *);
Packit Service a4b2a9
int mount_multi_triggers(struct autofs_point *, struct mapent *, const char *, unsigned int, const char *);
Packit Service a4b2a9
int umount_multi_triggers(struct autofs_point *, struct mapent *, char *, const char *);
Packit Service a4b2a9
int clean_stale_multi_triggers(struct autofs_point *, struct mapent *, char *, const char *);
Packit Service a4b2a9
Packit Service a4b2a9
#endif