s390: replace 'zvm' with s390

ZVM isn't the right terminology here.  s390 is.
This commit is contained in:
Dan Williams
2010-06-17 21:24:14 -07:00
parent a5d8872c3e
commit 0b41797b49
10 changed files with 53 additions and 53 deletions

View File

@@ -289,7 +289,7 @@ global:
nm_setting_wired_get_auto_negotiate; nm_setting_wired_get_auto_negotiate;
nm_setting_wired_get_mac_address; nm_setting_wired_get_mac_address;
nm_setting_wired_get_mtu; nm_setting_wired_get_mtu;
nm_setting_wired_get_zvm_subchannels; nm_setting_wired_get_s390_subchannels;
nm_setting_wireless_ap_security_compatible; nm_setting_wireless_ap_security_compatible;
nm_setting_wireless_error_get_type; nm_setting_wireless_error_get_type;
nm_setting_wireless_error_quark; nm_setting_wireless_error_quark;

View File

@@ -76,7 +76,7 @@ typedef struct {
gboolean auto_negotiate; gboolean auto_negotiate;
GByteArray *mac_address; GByteArray *mac_address;
guint32 mtu; guint32 mtu;
GPtrArray *zvm_subchannels; GPtrArray *s390_subchannels;
} NMSettingWiredPrivate; } NMSettingWiredPrivate;
enum { enum {
@@ -87,7 +87,7 @@ enum {
PROP_AUTO_NEGOTIATE, PROP_AUTO_NEGOTIATE,
PROP_MAC_ADDRESS, PROP_MAC_ADDRESS,
PROP_MTU, PROP_MTU,
PROP_ZVM_SUBCHANNELS, PROP_S390_SUBCHANNELS,
LAST_PROP LAST_PROP
}; };
@@ -147,11 +147,11 @@ nm_setting_wired_get_mtu (NMSettingWired *setting)
} }
const GPtrArray * const GPtrArray *
nm_setting_wired_get_zvm_subchannels (NMSettingWired *setting) nm_setting_wired_get_s390_subchannels (NMSettingWired *setting)
{ {
g_return_val_if_fail (NM_IS_SETTING_WIRED (setting), NULL); g_return_val_if_fail (NM_IS_SETTING_WIRED (setting), NULL);
return NM_SETTING_WIRED_GET_PRIVATE (setting)->zvm_subchannels; return NM_SETTING_WIRED_GET_PRIVATE (setting)->s390_subchannels;
} }
static gboolean static gboolean
@@ -185,11 +185,11 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
return FALSE; return FALSE;
} }
if (priv->zvm_subchannels && priv->zvm_subchannels->len != 3) { if (priv->s390_subchannels && priv->s390_subchannels->len != 3) {
g_set_error (error, g_set_error (error,
NM_SETTING_WIRED_ERROR, NM_SETTING_WIRED_ERROR,
NM_SETTING_WIRED_ERROR_INVALID_PROPERTY, NM_SETTING_WIRED_ERROR_INVALID_PROPERTY,
NM_SETTING_WIRED_ZVM_SUBCHANNELS); NM_SETTING_WIRED_S390_SUBCHANNELS);
return FALSE; return FALSE;
} }
@@ -245,12 +245,12 @@ set_property (GObject *object, guint prop_id,
case PROP_MTU: case PROP_MTU:
priv->mtu = g_value_get_uint (value); priv->mtu = g_value_get_uint (value);
break; break;
case PROP_ZVM_SUBCHANNELS: case PROP_S390_SUBCHANNELS:
if (priv->zvm_subchannels) { if (priv->s390_subchannels) {
g_ptr_array_foreach (priv->zvm_subchannels, (GFunc) g_free, NULL); g_ptr_array_foreach (priv->s390_subchannels, (GFunc) g_free, NULL);
g_ptr_array_free (priv->zvm_subchannels, TRUE); g_ptr_array_free (priv->s390_subchannels, TRUE);
} }
priv->zvm_subchannels = g_value_dup_boxed (value); priv->s390_subchannels = g_value_dup_boxed (value);
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -283,8 +283,8 @@ get_property (GObject *object, guint prop_id,
case PROP_MTU: case PROP_MTU:
g_value_set_uint (value, nm_setting_wired_get_mtu (setting)); g_value_set_uint (value, nm_setting_wired_get_mtu (setting));
break; break;
case PROP_ZVM_SUBCHANNELS: case PROP_S390_SUBCHANNELS:
g_value_set_boxed (value, nm_setting_wired_get_zvm_subchannels (setting)); g_value_set_boxed (value, nm_setting_wired_get_s390_subchannels (setting));
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -411,7 +411,7 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_class)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
/** /**
* NMSettingWired:zvm-subchannels: * NMSettingWired:s390-subchannels:
* *
* Identifies specific subchannels that this network device uses for * Identifies specific subchannels that this network device uses for
* communcation with z/VM or s390 host. Like #NMSettingWired:mac-address * communcation with z/VM or s390 host. Like #NMSettingWired:mac-address
@@ -421,8 +421,8 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_class)
* composed of hexadecimal characters and the period (.) character. * composed of hexadecimal characters and the period (.) character.
**/ **/
g_object_class_install_property g_object_class_install_property
(object_class, PROP_ZVM_SUBCHANNELS, (object_class, PROP_S390_SUBCHANNELS,
_nm_param_spec_specialized (NM_SETTING_WIRED_ZVM_SUBCHANNELS, _nm_param_spec_specialized (NM_SETTING_WIRED_S390_SUBCHANNELS,
"z/VM Subchannels", "z/VM Subchannels",
"Identifies specific subchannels that this " "Identifies specific subchannels that this "
"network device uses for communcation with z/VM " "network device uses for communcation with z/VM "

View File

@@ -58,7 +58,7 @@ GQuark nm_setting_wired_error_quark (void);
#define NM_SETTING_WIRED_AUTO_NEGOTIATE "auto-negotiate" #define NM_SETTING_WIRED_AUTO_NEGOTIATE "auto-negotiate"
#define NM_SETTING_WIRED_MAC_ADDRESS "mac-address" #define NM_SETTING_WIRED_MAC_ADDRESS "mac-address"
#define NM_SETTING_WIRED_MTU "mtu" #define NM_SETTING_WIRED_MTU "mtu"
#define NM_SETTING_WIRED_ZVM_SUBCHANNELS "zvm-subchannels" #define NM_SETTING_WIRED_S390_SUBCHANNELS "s390-subchannels"
typedef struct { typedef struct {
NMSetting parent; NMSetting parent;
@@ -83,7 +83,7 @@ const char * nm_setting_wired_get_duplex (NMSettingWired *setting)
gboolean nm_setting_wired_get_auto_negotiate (NMSettingWired *setting); gboolean nm_setting_wired_get_auto_negotiate (NMSettingWired *setting);
const GByteArray *nm_setting_wired_get_mac_address (NMSettingWired *setting); const GByteArray *nm_setting_wired_get_mac_address (NMSettingWired *setting);
guint32 nm_setting_wired_get_mtu (NMSettingWired *setting); guint32 nm_setting_wired_get_mtu (NMSettingWired *setting);
const GPtrArray * nm_setting_wired_get_zvm_subchannels (NMSettingWired *setting); const GPtrArray * nm_setting_wired_get_s390_subchannels (NMSettingWired *setting);
G_END_DECLS G_END_DECLS

View File

@@ -554,10 +554,10 @@ parse_subchannels (const char *subchannels, guint32 *a, guint32 *b, guint32 *c)
return TRUE; return TRUE;
} }
#define SUBCHAN_TAG "zvm-subchannels:" #define SUBCHAN_TAG "s390-subchannels:"
gboolean gboolean
nm_match_spec_zvm_subchannels (const GSList *specs, const char *subchannels) nm_match_spec_s390_subchannels (const GSList *specs, const char *subchannels)
{ {
const GSList *iter; const GSList *iter;
guint32 a = 0, b = 0, c = 0; guint32 a = 0, b = 0, c = 0;

View File

@@ -48,7 +48,7 @@ void nm_utils_call_dispatcher (const char *action,
const char *vpn_iface); const char *vpn_iface);
gboolean nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr); gboolean nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr);
gboolean nm_match_spec_zvm_subchannels (const GSList *specs, const char *subchannels); gboolean nm_match_spec_s390_subchannels (const GSList *specs, const char *subchannels);
GHashTable *value_hash_create (void); GHashTable *value_hash_create (void);

View File

@@ -105,7 +105,7 @@ typedef struct {
gboolean disposed; gboolean disposed;
struct ether_addr hw_addr; struct ether_addr hw_addr;
char * zvm_subchannels; char * s390_subchannels;
gboolean carrier; gboolean carrier;
NMNetlinkMonitor * monitor; NMNetlinkMonitor * monitor;
@@ -1528,8 +1528,8 @@ spec_match_list (NMDevice *device, const GSList *specs)
matched = nm_match_spec_hwaddr (specs, hwaddr); matched = nm_match_spec_hwaddr (specs, hwaddr);
g_free (hwaddr); g_free (hwaddr);
if (!matched && priv->zvm_subchannels) if (!matched && priv->s390_subchannels)
matched = nm_match_spec_zvm_subchannels (specs, priv->zvm_subchannels); matched = nm_match_spec_s390_subchannels (specs, priv->s390_subchannels);
return matched; return matched;
} }

View File

@@ -108,7 +108,7 @@ struct _NMSystemConfigInterface {
* Method: mac Data: device MAC address formatted with leading zeros and * Method: mac Data: device MAC address formatted with leading zeros and
* lowercase letters, like 00:0a:0b:0c:0d:0e * lowercase letters, like 00:0a:0b:0c:0d:0e
* *
* Method: zvm-subchannels Data: string of 2 or 3 z/VM subchannels * Method: s390-subchannels Data: string of 2 or 3 s390 subchannels
* separated by commas (,) that identify the * separated by commas (,) that identify the
* device, like "0.0.09a0,0.0.09a1,0.0.09a2". * device, like "0.0.09a0,0.0.09a1,0.0.09a2".
* The string may contain only the following * The string may contain only the following

View File

@@ -2995,12 +2995,12 @@ make_wired_setting (shvarFile *ifcfg,
if (num_chans == 3) if (num_chans == 3)
g_ptr_array_add (array, chans[2]); g_ptr_array_add (array, chans[2]);
g_object_set (s_wired, NM_SETTING_WIRED_ZVM_SUBCHANNELS, array, NULL); g_object_set (s_wired, NM_SETTING_WIRED_S390_SUBCHANNELS, array, NULL);
g_ptr_array_free (array, TRUE); g_ptr_array_free (array, TRUE);
/* set the unmanaged spec too */ /* set the unmanaged spec too */
if (!nm_controlled && !*unmanaged) if (!nm_controlled && !*unmanaged)
*unmanaged = g_strdup_printf ("zvm-subchannels:%s", value); *unmanaged = g_strdup_printf ("s390-subchannels:%s", value);
} }
g_strfreev (chans); g_strfreev (chans);
} }

View File

@@ -5160,17 +5160,17 @@ test_read_wired_qeth_static (void)
NM_SETTING_WIRED_MAC_ADDRESS); NM_SETTING_WIRED_MAC_ADDRESS);
/* Subchannels */ /* Subchannels */
subchannels = nm_setting_wired_get_zvm_subchannels (s_wired); subchannels = nm_setting_wired_get_s390_subchannels (s_wired);
ASSERT (subchannels != NULL, ASSERT (subchannels != NULL,
"wired-qeth-static-verify-wired", "failed to verify %s: missing %s / %s key", "wired-qeth-static-verify-wired", "failed to verify %s: missing %s / %s key",
TEST_IFCFG_WIRED_QETH_STATIC, TEST_IFCFG_WIRED_QETH_STATIC,
NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_SETTING_NAME,
NM_SETTING_WIRED_ZVM_SUBCHANNELS); NM_SETTING_WIRED_S390_SUBCHANNELS);
ASSERT (subchannels->len == 3, ASSERT (subchannels->len == 3,
"wired-qeth-static-verify-wired", "failed to verify %s: invalid %s / %s key (not 3 elements)", "wired-qeth-static-verify-wired", "failed to verify %s: invalid %s / %s key (not 3 elements)",
TEST_IFCFG_WIRED_QETH_STATIC, TEST_IFCFG_WIRED_QETH_STATIC,
NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_SETTING_NAME,
NM_SETTING_WIRED_ZVM_SUBCHANNELS); NM_SETTING_WIRED_S390_SUBCHANNELS);
tmp = (const char *) g_ptr_array_index (subchannels, 0); tmp = (const char *) g_ptr_array_index (subchannels, 0);
ASSERT (strcmp (tmp, expected_channel0) == 0, ASSERT (strcmp (tmp, expected_channel0) == 0,
@@ -8306,7 +8306,7 @@ test_write_wired_qeth_dhcp (void)
g_ptr_array_add (subchans, "0.0.601"); g_ptr_array_add (subchans, "0.0.601");
g_ptr_array_add (subchans, "0.0.602"); g_ptr_array_add (subchans, "0.0.602");
g_object_set (s_wired, g_object_set (s_wired,
NM_SETTING_WIRED_ZVM_SUBCHANNELS, subchans, NM_SETTING_WIRED_S390_SUBCHANNELS, subchans,
NULL); NULL);
g_ptr_array_free (subchans, TRUE); g_ptr_array_free (subchans, TRUE);

View File

@@ -826,7 +826,7 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
const GByteArray *mac; const GByteArray *mac;
char *tmp; char *tmp;
guint32 mtu; guint32 mtu;
const GPtrArray *zvm_subchannels; const GPtrArray *s390_subchannels;
s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED); s_wired = (NMSettingWired *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED);
if (!s_wired) { if (!s_wired) {
@@ -854,17 +854,17 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
} }
svSetValue (ifcfg, "SUBCHANNELS", NULL, FALSE); svSetValue (ifcfg, "SUBCHANNELS", NULL, FALSE);
zvm_subchannels = nm_setting_wired_get_zvm_subchannels (s_wired); s390_subchannels = nm_setting_wired_get_s390_subchannels (s_wired);
if (zvm_subchannels) { if (s390_subchannels) {
if (zvm_subchannels->len == 2) { if (s390_subchannels->len == 2) {
tmp = g_strdup_printf ("%s,%s", tmp = g_strdup_printf ("%s,%s",
(const char *) g_ptr_array_index (zvm_subchannels, 0), (const char *) g_ptr_array_index (s390_subchannels, 0),
(const char *) g_ptr_array_index (zvm_subchannels, 1)); (const char *) g_ptr_array_index (s390_subchannels, 1));
} else if (zvm_subchannels->len == 3) { } else if (s390_subchannels->len == 3) {
tmp = g_strdup_printf ("%s,%s,%s", tmp = g_strdup_printf ("%s,%s,%s",
(const char *) g_ptr_array_index (zvm_subchannels, 0), (const char *) g_ptr_array_index (s390_subchannels, 0),
(const char *) g_ptr_array_index (zvm_subchannels, 1), (const char *) g_ptr_array_index (s390_subchannels, 1),
(const char *) g_ptr_array_index (zvm_subchannels, 2)); (const char *) g_ptr_array_index (s390_subchannels, 2));
} }
svSetValue (ifcfg, "SUBCHANNELS", tmp, FALSE); svSetValue (ifcfg, "SUBCHANNELS", tmp, FALSE);
g_free (tmp); g_free (tmp);