/*
* s390.h
* Utility functions specific to the s390 platform.
*
* Copyright (C) 2009 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Author(s): David Cantrell
*/
#ifndef S390_H
#define S390_H
#include
/* Constant paths */
#define PROC_CMDLINE "/proc/cmdline"
#define PROC_CPUINFO "/proc/cpuinfo"
#define PROC_CIO_IGNORE "/proc/cio_ignore"
#define DASD_CONF "/etc/dasd.conf"
#define ZFCP_CONF "/etc/zfcp.conf"
#define SYSFS_CCW_DEVICES "/sys/bus/ccw/devices"
#define SYSFS_FIRMWARE_IPL "/sys/firmware/ipl"
#define SYSFS_ZFCP_DRIVER "/sys/bus/ccw/drivers/zfcp"
/* Dependent utilities (path of util in initrd.img) */
#define CMD_CMSFSCAT "/sbin/cmsfscat"
#define DASD_CIO_FREE "/sbin/dasd_cio_free"
#define ZFCP_CIO_FREE "/sbin/zfcp_cio_free"
#define LSZNET_RAW "/lib/s390-tools/lsznet.raw"
/* Various constants */
#define SUBCHANNEL_TYPE_IO "0"
/* Subchannel structure, stores the components of qeth/lcs/ctc subchannel */
typedef struct _subchannel_t {
gchar *dev_p;
gchar *subch_p;
gchar *subch;
gchar *nettype;
gchar *prefix;
gchar *ssid;
gchar *devno;
gchar **chpids;
gchar *pimchipid;
gchar *cutype;
} subchannel_t;
gboolean dasd_cio_free(gchar *);
gboolean zfcp_cio_free(gchar *, gchar *, gchar *);
gchar *normalize_ccw_devno(gchar *);
gboolean dasd_settle(gchar *);
gboolean is_zvm(void);
gchar **generate_nettable(void);
gboolean is_blacklist_active(void);
void free_from_blacklist(gchar *);
gboolean semantic_check_subchannels(GHashTable *);
#endif