diff options
author | Dan Winship <danw@gnome.org> | 2014-09-22 12:28:06 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-10-22 08:29:08 -0400 |
commit | fd7b9df47d6598af91b76af64584039ddc5037dc (patch) | |
tree | b258df16c89a1356400379db6b4caf909285c799 /src/devices/nm-device-vlan.c | |
parent | 4f75ff92b4d5a52d453b77b050f38f8c3e421256 (diff) | |
download | NetworkManager-fd7b9df47d6598af91b76af64584039ddc5037dc.tar.gz |
devices: drop device-type-specific error domains
Most NMDevice types defined their own error domain but then never used
it. A few did use their errors, but some of those errors are redundant
with NMDeviceError, and others can be added to it.
Diffstat (limited to 'src/devices/nm-device-vlan.c')
-rw-r--r-- | src/devices/nm-device-vlan.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index 8ca39be64b..1c78dd1ea2 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -50,8 +50,6 @@ G_DEFINE_TYPE (NMDeviceVlan, nm_device_vlan, NM_TYPE_DEVICE) #define NM_DEVICE_VLAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_VLAN, NMDeviceVlanPrivate)) -#define NM_VLAN_ERROR (nm_vlan_error_quark ()) - typedef struct { char *initial_hw_addr; @@ -74,17 +72,6 @@ enum { /******************************************************************/ -static GQuark -nm_vlan_error_quark (void) -{ - static GQuark quark = 0; - if (!quark) - quark = g_quark_from_static_string ("nm-vlan-error"); - return quark; -} - -/******************************************************************/ - static void update_initial_hw_address (NMDevice *dev) { @@ -232,7 +219,7 @@ complete_connection (NMDevice *device, s_vlan = nm_connection_get_setting_vlan (connection); if (!s_vlan) { - g_set_error_literal (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID, + g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INVALID_CONNECTION, "A 'vlan' setting is required."); return FALSE; } @@ -242,7 +229,7 @@ complete_connection (NMDevice *device, */ if ( !nm_setting_vlan_get_parent (s_vlan) && !match_hwaddr (device, connection, TRUE)) { - g_set_error_literal (error, NM_VLAN_ERROR, NM_VLAN_ERROR_CONNECTION_INVALID, + g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INVALID_CONNECTION, "The 'vlan' setting had no interface name, parent, or hardware address."); return FALSE; } @@ -591,8 +578,6 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) nm_dbus_manager_register_exported_type (nm_dbus_manager_get (), G_TYPE_FROM_CLASS (klass), &dbus_glib_nm_device_vlan_object_info); - - dbus_g_error_domain_register (NM_VLAN_ERROR, NULL, NM_TYPE_VLAN_ERROR); } /*************************************************************/ |