Imported Upstream version 0.8.7
[platform/upstream/multipath-tools.git] / libmultipath / configure.h
1 /*
2  * configurator actions
3  */
4 #define ACT_NOTHING_STR         "unchanged"
5 #define ACT_REJECT_STR          "reject"
6 #define ACT_RELOAD_STR          "reload"
7 #define ACT_SWITCHPG_STR        "switchpg"
8 #define ACT_RENAME_STR          "rename"
9 #define ACT_CREATE_STR          "create"
10 #define ACT_RESIZE_STR          "resize"
11
12 enum actions {
13         ACT_UNDEF,
14         ACT_NOTHING,
15         ACT_REJECT,
16         ACT_RELOAD,
17         ACT_SWITCHPG,
18         ACT_RENAME,
19         ACT_CREATE,
20         ACT_RESIZE,
21         ACT_FORCERENAME,
22         ACT_DRY_RUN,
23         ACT_IMPOSSIBLE,
24 };
25
26 /*
27  * Return value of domap()
28  * DAEMON_RETRY is only used for ACT_CREATE (see domap()).
29  */
30 enum {
31         DOMAP_RETRY     = -1,
32         DOMAP_FAIL      = 0,
33         DOMAP_OK        = 1,
34         DOMAP_EXIST     = 2,
35         DOMAP_DRY       = 3
36 };
37
38 /*
39  * Return value of coalesce_paths()
40  * CP_RETRY is only used in non-daemon case (multipath).
41  */
42 enum {
43         CP_OK = 0,
44         CP_FAIL,
45         CP_RETRY,
46 };
47
48 struct vectors;
49
50 int setup_map (struct multipath * mpp, char **params, struct vectors *vecs);
51 void select_action (struct multipath *mpp, const struct _vector *curmp,
52                     int force_reload);
53 int domap (struct multipath * mpp, char * params, int is_daemon);
54 int reinstate_paths (struct multipath *mpp);
55 int coalesce_paths (struct vectors *vecs, vector curmp, char * refwwid, int force_reload, enum mpath_cmds cmd);
56 int get_refwwid (enum mpath_cmds cmd, const char *dev, enum devtypes dev_type,
57                  vector pathvec, char **wwid);
58 struct udev_device *get_udev_device(const char *dev, enum devtypes dev_type);
59 void trigger_paths_udev_change(struct multipath *mpp, bool is_mpath);
60 void trigger_partitions_udev_change(struct udev_device *dev, const char *action,
61                                     int len);
62 int check_daemon(void);