File: configure.h

package info (click to toggle)
multipath-tools 0.14.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,088 kB
  • sloc: ansic: 64,885; perl: 1,622; makefile: 742; sh: 732; pascal: 155
file content (68 lines) | stat: -rw-r--r-- 1,756 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef CONFIGURE_H_INCLUDED
#define CONFIGURE_H_INCLUDED

/*
 * configurator actions
 */
#define ACT_NOTHING_STR         "unchanged"
#define ACT_REJECT_STR          "reject"
#define ACT_RELOAD_STR          "reload"
#define ACT_SWITCHPG_STR        "switchpg"
#define ACT_RENAME_STR          "rename"
#define ACT_CREATE_STR          "create"
#define ACT_RESIZE_STR          "resize"

enum actions {
	ACT_UNDEF,
	ACT_NOTHING,
	ACT_REJECT,
	ACT_RELOAD,
	ACT_SWITCHPG,
	ACT_RENAME,
	ACT_CREATE,
	ACT_RESIZE,
	ACT_RELOAD_RENAME,
	ACT_DRY_RUN,
	ACT_IMPOSSIBLE,
	ACT_RESIZE_RENAME,
	ACT_SWITCHPG_RENAME,
};

/*
 * Return value of domap()
 * DAEMON_RETRY is only used for ACT_CREATE (see domap()).
 */
enum {
	DOMAP_RETRY	= -1,
	DOMAP_FAIL	= 0,
	DOMAP_OK	= 1,
	DOMAP_EXIST	= 2,
	DOMAP_DRY	= 3
};

/*
 * Return value of coalesce_paths()
 * CP_RETRY is only used in non-daemon case (multipath).
 */
enum {
	CP_OK = 0,
	CP_FAIL,
	CP_RETRY,
};

struct vectors;

int setup_map (struct multipath * mpp, char **params, struct vectors *vecs);
void select_action (struct multipath *mpp, const struct vector_s *curmp,
		    int force_reload);
int domap (struct multipath * mpp, char * params, int is_daemon);
int coalesce_paths (struct vectors *vecs, vector curmp, char * refwwid, int force_reload, enum mpath_cmds cmd);
int get_refwwid (enum mpath_cmds cmd, const char *dev, enum devtypes dev_type,
		 vector pathvec, char **wwid);
struct udev_device *get_udev_device(const char *dev, enum devtypes dev_type);
void trigger_path_udev_change(struct path *pp, bool is_mpath);
void trigger_paths_udev_change(struct multipath *mpp, bool is_mpath);
void trigger_partitions_udev_change(struct udev_device *dev, const char *action,
				    int len);
int check_daemon(void);
#endif