Debian Codegraph @

src/plugins/s390.h

raw
1 #include <glib.h>
2 #include <blockdev/utils.h>
3
4 #ifndef BD_S390
5 #define BD_S390
6
7 GQuark bd_s390_error_quark (void);
8 #define BD_S390_ERROR bd_s390_error_quark ()
9 typedef enum {
10 BD_S390_ERROR_TECH_UNAVAIL,
11 BD_S390_ERROR_DEVICE,
12 BD_S390_ERROR_FORMAT_FAILED,
13 BD_S390_ERROR_DASDFMT,
14 BD_S390_ERROR_IO,
15 } BDS390Error;
16
17 typedef enum {
18 BD_S390_TECH_DASD = 0,
19 BD_S390_TECH_ZFCP,
20 } BDS390Tech;
21
22 typedef enum {
23 BD_S390_TECH_MODE_MODIFY = 1 << 0,
24 BD_S390_TECH_MODE_QUERY = 1 << 1,
25 } BDS390TechMode;
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_s390_init (void);
36 void bd_s390_close (void);
37
38 gboolean bd_s390_is_tech_avail (BDS390Tech tech, guint64 mode, GError **error);
39
40 gboolean bd_s390_dasd_format (const gchar *dasd, const BDExtraArg **extra, GError **error);
41 gboolean bd_s390_dasd_needs_format (const gchar *dasd, GError **error);
42 gboolean bd_s390_dasd_online (const gchar *dasd, GError **error);
43 gboolean bd_s390_dasd_is_ldl (const gchar *dasd, GError **error);
44 gboolean bd_s390_dasd_is_fba (const gchar *dasd, GError **error);
45
46 gchar* bd_s390_sanitize_dev_input (const gchar *dev, GError **error);
47
48 gchar* bd_s390_zfcp_sanitize_wwpn_input (const gchar *wwpn, GError **error);
49 gchar* bd_s390_zfcp_sanitize_lun_input (const gchar *lun, GError **error);
50 gboolean bd_s390_zfcp_online (const gchar *devno, const gchar *wwpn, const gchar *lun, GError **error);
51 gboolean bd_s390_zfcp_scsi_offline(const gchar *devno, const gchar *wwpn, const gchar *lun, GError **error);
52 gboolean bd_s390_zfcp_offline(const gchar *devno, const gchar *wwpn, const gchar *lun, GError **error);
53
54 #endif /* BD_S390 */