s390

s390 — plugin for operations with s390

Synopsis

#include <s390.h>

gboolean            bd_s390_check_deps                  ();
gboolean            bd_s390_init                        ();
void                bd_s390_close                       ();
GQuark              bd_s390_error_quark                 (void);
enum                BDS390Error;
gboolean            bd_s390_dasd_format                 (const gchar *dasd,
                                                         const BDExtraArg **extra,
                                                         GError **error);
gboolean            bd_s390_dasd_needs_format           (const gchar *dasd,
                                                         GError **error);
gchar *             bd_s390_sanitize_dev_input          (const gchar *dev,
                                                         GError **error);
gboolean            bd_s390_dasd_online                 (const gchar *dasd,
                                                         GError **error);
gboolean            bd_s390_dasd_is_ldl                 (const gchar *dasd,
                                                         GError **error);
gboolean            bd_s390_dasd_is_fba                 (const gchar *dasd,
                                                         GError **error);
gchar *             bd_s390_zfcp_sanitize_wwpn_input    (const gchar *wwpn,
                                                         GError **error);
gchar *             bd_s390_zfcp_sanitize_lun_input     (const gchar *lun,
                                                         GError **error);
gboolean            bd_s390_zfcp_online                 (const gchar *devno,
                                                         const gchar *wwpn,
                                                         const gchar *lun,
                                                         GError **error);
gboolean            bd_s390_zfcp_scsi_offline           (const gchar *devno,
                                                         const gchar *wwpn,
                                                         const gchar *lun,
                                                         GError **error);
gboolean            bd_s390_zfcp_offline                (const gchar *devno,
                                                         const gchar *wwpn,
                                                         const gchar *lun,
                                                         GError **error);

Description

A plugin for operations with s390 devices.

Details

bd_s390_check_deps ()

gboolean            bd_s390_check_deps                  ();

Returns :

whether the plugin's runtime dependencies are satisfied or not Function checking plugin's runtime dependencies.

bd_s390_init ()

gboolean            bd_s390_init                        ();

Initializes the plugin. **This function is called automatically by the library's initialization functions.**


bd_s390_close ()

void                bd_s390_close                       ();

Cleans up after the plugin. **This function is called automatically by the library's functions that unload it.**


bd_s390_error_quark ()

GQuark              bd_s390_error_quark                 (void);

enum BDS390Error

typedef enum {
    BD_S390_ERROR_DEVICE,
    BD_S390_ERROR_FORMAT_FAILED,
    BD_S390_ERROR_DASDFMT,
    BD_S390_ERROR_IO,
} BDS390Error;

BD_S390_ERROR_DEVICE

BD_S390_ERROR_FORMAT_FAILED

BD_S390_ERROR_DASDFMT

BD_S390_ERROR_IO


bd_s390_dasd_format ()

gboolean            bd_s390_dasd_format                 (const gchar *dasd,
                                                         const BDExtraArg **extra,
                                                         GError **error);

dasd :

dasd to format

extra :

extra options for the formatting (right now passed to the 'dasdfmt' utility). [allow-none][array zero-terminated=1]

error :

place to store error (if any). [out]

Returns :

whether dasdfmt was successful or not

bd_s390_dasd_needs_format ()

gboolean            bd_s390_dasd_needs_format           (const gchar *dasd,
                                                         GError **error);

dasd :

dasd to check, whether it needs dasdfmt run on it

error :

place to store error (if any). [out]

Returns :

whether a dasd needs dasdfmt run against it

bd_s390_sanitize_dev_input ()

gchar *             bd_s390_sanitize_dev_input          (const gchar *dev,
                                                         GError **error);

error :

place to store error (if any). [out]

Returns :

a synthesized dasd or zfcp device number. [transfer full]

bd_s390_dasd_online ()

gboolean            bd_s390_dasd_online                 (const gchar *dasd,
                                                         GError **error);

dasd :

dasd to switch online

error :

place to store error (if any). [out]

Returns :

whether a dasd was successfully switched online

bd_s390_dasd_is_ldl ()

gboolean            bd_s390_dasd_is_ldl                 (const gchar *dasd,
                                                         GError **error);

dasd :

dasd to check, whether it is LDL formatted

error :

place to store error (if any). [out]

Returns :

whether a dasd is LDL formatted

bd_s390_dasd_is_fba ()

gboolean            bd_s390_dasd_is_fba                 (const gchar *dasd,
                                                         GError **error);

dasd :

dasd to check, whether it is FBA

error :

place to store error (if any). [out]

Returns :

whether a dasd is FBA

bd_s390_zfcp_sanitize_wwpn_input ()

gchar *             bd_s390_zfcp_sanitize_wwpn_input    (const gchar *wwpn,
                                                         GError **error);

error :

place to store error (if any). [out]

Returns :

a synthesized zFCP WWPN. [transfer full]

bd_s390_zfcp_sanitize_lun_input ()

gchar *             bd_s390_zfcp_sanitize_lun_input     (const gchar *lun,
                                                         GError **error);

error :

place to store error (if any). [out]

Returns :

a synthesized zFCP LUN. [transfer full]

bd_s390_zfcp_online ()

gboolean            bd_s390_zfcp_online                 (const gchar *devno,
                                                         const gchar *wwpn,
                                                         const gchar *lun,
                                                         GError **error);

error :

place to store error (if any). [out]

Returns :

whether a zFCP device was successfully switched online

bd_s390_zfcp_scsi_offline ()

gboolean            bd_s390_zfcp_scsi_offline           (const gchar *devno,
                                                         const gchar *wwpn,
                                                         const gchar *lun,
                                                         GError **error);

devno: zfcp device number wwpn: zfcp WWPN (World Wide Port Number) lun: zfcp LUN (Logical Unit Number) error: (out): place to store error (if any)

Returns :

whether a LUN was successfully removed from its associated WWPN This function looks through /proc/scsi/scsi and manually removes LUNs from associated WWPNs. zFCP devices are SCSI devices accessible over FCP protocol. In z/OS the IODF (I/O definition file) contains basic information about the I/O config, but WWPN and LUN configuration is done at the OS level, hence this function becomes necessary when switching the device offline. This particular sequence of actions is for some reason unnecessary when switching the device offline. Chalk it up to s390x being s390x.

bd_s390_zfcp_offline ()

gboolean            bd_s390_zfcp_offline                (const gchar *devno,
                                                         const gchar *wwpn,
                                                         const gchar *lun,
                                                         GError **error);

devno :

zfcp device number

wwpn :

zfcp WWPN (World Wide Port Number)

lun :

zfcp LUN (Logical Unit Number)

error :

place to store error (if any). [out]

Returns :

whether a zfcp device was successfully switched offline