Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 298683 Details for
Bug 438316
Various bugs in check_console.c
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch
console_check.c.patch (text/plain), 1.41 KB, created by
David Woodhouse
on 2008-03-20 11:20:29 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
David Woodhouse
Created:
2008-03-20 11:20:29 UTC
Size:
1.41 KB
patch
obsolete
>--- console_check.c~ 2008-03-11 21:48:05.000000000 +0000 >+++ console_check.c 2008-03-19 17:21:10.000000000 +0000 >@@ -9,6 +9,7 @@ > #include <sys/ioctl.h> > > #include <linux/serial.h> >+#include <linux/serial_core.h> > > struct speeds > { >@@ -79,7 +80,7 @@ int compare_termios_to_console(char *dev > tcgetattr(cfd, &cmode); > close(cfd); > >- fd = open(dev, O_RDONLY); >+ fd = open(dev, O_RDONLY|O_NONBLOCK); > tcgetattr(fd, &mode); > > if (!termcmp(&cmode, &mode)) { >@@ -91,12 +92,28 @@ int compare_termios_to_console(char *dev > return 0; > } > >+char *serial_tty_name(int type) >+{ >+ switch(type) { >+ case PORT_8250...PORT_MAX_8250: return "ttyS"; >+ case PORT_PMAC_ZILOG: return "ttyPZ"; >+ case PORT_MPSC: return "ttyMM"; >+ case PORT_CPM: return "ttyCPM"; >+ case PORT_MPC52xx: return "ttyPSC"; >+ default: return NULL; >+ } >+} >+ > char *check_serial_console(int *speed) { > int fd; > char *ret = NULL, *device; > char twelve = 12; > struct serial_struct si, si2; >+ char *tty_name; > >+ memset(&si, 0, sizeof(si)); >+ memset(&si2, 0, sizeof(si)); >+ > fd = open("/dev/console", O_RDWR); > if (ioctl (fd, TIOCLINUX, &twelve) >= 0) > goto out; >@@ -105,7 +122,11 @@ char *check_serial_console(int *speed) { > goto out; > close(fd); > >- asprintf(&device, "ttyS%d", si.line); >+ tty_name = serial_tty_name(si.type); >+ if (!tty_name) >+ goto out; >+ >+ asprintf(&device, "%s%d", tty_name, si.line); > fd = open(device, O_RDWR|O_NONBLOCK); > if (fd == -1) > goto out;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 438316
: 298683