4 extern const int default_mask;
5 extern const char default_devnode[];
6 extern const char default_wwid[];
7 extern const char default_wwid_1[];
10 BL_BY_DEVNODE = (1 << 0),
11 BL_BY_DEVICE = (1 << 1),
12 BL_BY_WWID = (1 << 2),
13 BL_BY_PROPERTY = (1 << 3),
14 BL_MASK = BL_BY_DEVNODE|BL_BY_DEVICE|BL_BY_WWID|BL_BY_PROPERTY,
15 NEED_SELECT_PRIO = (1 << 8),
17 USE_GETUID = (1 << 10),
18 DEV_HIDDEN = (1 << 11),
30 struct mocked_path *fill_mocked_path(struct mocked_path *mp,
38 struct mocked_path *mocked_path_from_path(struct mocked_path *mp,
39 const struct path *pp);
41 void mock_pathinfo(int mask, const struct mocked_path *mp);
42 void mock_store_pathinfo(int mask, const struct mocked_path *mp);
43 struct path *__mock_path(vector pathvec,
44 const char *vnd, const char *prd,
45 const char *rev, const char *wwid,
47 unsigned int flags, int mask);
49 #define mock_path(v, p) \
50 __mock_path(hwt->vecs->pathvec, (v), (p), "0", NULL, NULL, \
52 #define mock_path_flags(v, p, f) \
53 __mock_path(hwt->vecs->pathvec, (v), (p), "0", NULL, NULL, \
55 #define mock_path_blacklisted(v, p) \
56 __mock_path(hwt->vecs->pathvec, (v), (p), "0", NULL, NULL, \
57 BL_BY_DEVICE, default_mask)
58 #define mock_path_wwid(v, p, w) \
59 __mock_path(hwt->vecs->pathvec, (v), (p), "0", (w), NULL, \
61 #define mock_path_wwid_flags(v, p, w, f) \
62 __mock_path(hwt->vecs->pathvec, (v), (p), "0", (w), \
63 NULL, (f), default_mask)
65 struct multipath *__mock_multipath(struct vectors *vecs, struct path *pp);
66 #define mock_multipath(pp) __mock_multipath(hwt->vecs, (pp))