summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/modemmanager/files/modemmanager-1.0.0-logging-serial.patch')
-rw-r--r--net-misc/modemmanager/files/modemmanager-1.0.0-logging-serial.patch76
1 files changed, 0 insertions, 76 deletions
diff --git a/net-misc/modemmanager/files/modemmanager-1.0.0-logging-serial.patch b/net-misc/modemmanager/files/modemmanager-1.0.0-logging-serial.patch
deleted file mode 100644
index 6114a9ea13a2..000000000000
--- a/net-misc/modemmanager/files/modemmanager-1.0.0-logging-serial.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From e900ed645afe5d8d871152fb264994ecfab77778 Mon Sep 17 00:00:00 2001
-From: Dan Williams <dcbw@redhat.com>
-Date: Tue, 23 Jul 2013 15:00:23 +0000
-Subject: serial: add logging to serial port open failures
-
----
-diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
-index 0f81c7b..8774d40 100644
---- a/src/mm-serial-port.c
-+++ b/src/mm-serial-port.c
-@@ -868,6 +868,7 @@ mm_serial_port_open (MMSerialPort *self, GError **error)
- const char *device;
- struct serial_struct sinfo = { 0 };
- GTimeVal tv_start, tv_end;
-+ int errno_save;
-
- g_return_val_if_fail (MM_IS_SERIAL_PORT (self), FALSE);
-
-@@ -897,6 +898,7 @@ mm_serial_port_open (MMSerialPort *self, GError **error)
- devfile = g_strdup_printf ("/dev/%s", device);
- errno = 0;
- priv->fd = open (devfile, O_RDWR | O_EXCL | O_NONBLOCK | O_NOCTTY);
-+ errno_save = errno;
- g_free (devfile);
- }
-
-@@ -908,13 +910,16 @@ mm_serial_port_open (MMSerialPort *self, GError **error)
- g_set_error (error,
- MM_SERIAL_ERROR,
- (errno == ENODEV) ? MM_SERIAL_ERROR_OPEN_FAILED_NO_DEVICE : MM_SERIAL_ERROR_OPEN_FAILED,
-- "Could not open serial device %s: %s", device, strerror (errno));
-+ "Could not open serial device %s: %s", device, strerror (errno_save));
-+ mm_warn ("(%s) could not open serial device (%d)", device, errno_save);
- return FALSE;
- }
-
- if (ioctl (priv->fd, TIOCEXCL) < 0) {
-+ errno_save = errno;
- g_set_error (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_OPEN_FAILED,
-- "Could not lock serial device %s: %s", device, strerror (errno));
-+ "Could not lock serial device %s: %s", device, strerror (errno_save));
-+ mm_warn ("(%s) could not lock serial device (%d)", device, errno_save);
- goto error;
- }
-
-@@ -922,14 +927,18 @@ mm_serial_port_open (MMSerialPort *self, GError **error)
- tcflush (priv->fd, TCIOFLUSH);
-
- if (tcgetattr (priv->fd, &priv->old_t) < 0) {
-+ errno_save = errno;
- g_set_error (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_OPEN_FAILED,
-- "Could not open serial device %s: %s", device, strerror (errno));
-+ "Could not set attributes on serial device %s: %s", device, strerror (errno_save));
-+ mm_warn ("(%s) could not set attributes on serial device (%d)", device, errno_save);
- goto error;
- }
-
- g_warn_if_fail (MM_SERIAL_PORT_GET_CLASS (self)->config_fd);
-- if (!MM_SERIAL_PORT_GET_CLASS (self)->config_fd (self, priv->fd, error))
-+ if (!MM_SERIAL_PORT_GET_CLASS (self)->config_fd (self, priv->fd, error)) {
-+ mm_dbg ("(%s) failed to configure serial device", device);
- goto error;
-+ }
-
- /* Don't wait for pending data when closing the port; this can cause some
- * stupid devices that don't respond to URBs on a particular port to hang
-@@ -966,6 +975,7 @@ success:
- return TRUE;
-
- error:
-+ mm_warn ("(%s) failed to open serial device", device);
- close (priv->fd);
- priv->fd = -1;
- return FALSE;
---
-cgit v0.9.0.2-2-gbebe