| 1 |
#include <glib.h> |
| 2 |
|
| 3 |
#ifndef BD_MPATH |
| 4 |
#define BD_MPATH |
| 5 |
|
| 6 |
GQuark bd_mpath_error_quark (void); |
| 7 |
#define BD_MPATH_ERROR bd_mpath_error_quark () |
| 8 |
typedef enum { |
| 9 |
BD_MPATH_ERROR_TECH_UNAVAIL, |
| 10 |
BD_MPATH_ERROR_INVAL, |
| 11 |
BD_MPATH_ERROR_FLUSH, |
| 12 |
BD_MPATH_ERROR_NOT_ROOT, |
| 13 |
BD_MPATH_ERROR_DM_ERROR, |
| 14 |
} BDMpathError; |
| 15 |
|
| 16 |
typedef enum { |
| 17 |
BD_MPATH_TECH_BASE = 0, |
| 18 |
BD_MPATH_TECH_FRIENDLY_NAMES, |
| 19 |
} BDMpathTech; |
| 20 |
|
| 21 |
typedef enum { |
| 22 |
BD_MPATH_TECH_MODE_QUERY = 1 << 0, |
| 23 |
BD_MPATH_TECH_MODE_MODIFY = 1 << 1, |
| 24 |
} BDMpathTechMode; |
| 25 |
|
| 26 |
|
| 27 |
/* |
| 28 |
* If using the plugin as a standalone library, the following functions should |
| 29 |
* be called to: |
| 30 |
* |
| 31 |
* init() - initialize the plugin, returning TRUE on success |
| 32 |
* close() - clean after the plugin at the end or if no longer used |
| 33 |
* |
| 34 |
*/ |
| 35 |
gboolean bd_mpath_init (void); |
| 36 |
void bd_mpath_close (void); |
| 37 |
|
| 38 |
gboolean bd_mpath_is_tech_avail (BDMpathTech tech, guint64 mode, GError **error); |
| 39 |
|
| 40 |
gboolean bd_mpath_flush_mpaths (GError **error); |
| 41 |
gboolean bd_mpath_is_mpath_member (const gchar *device, GError **error); |
| 42 |
gchar** bd_mpath_get_mpath_members (GError **error); |
| 43 |
gboolean bd_mpath_set_friendly_names (gboolean enabled, GError **error); |
| 44 |
|
| 45 |
#endif /* BD_MPATH */ |