Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e7b18a2d
Commit
e7b18a2d
authored
Jul 22, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/linux-2.5_ppc64drivers
parents
eb0c5161
c8f65802
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
arch/ppc64/kernel/pSeries_lpar.c
arch/ppc64/kernel/pSeries_lpar.c
+7
-2
drivers/char/hvc_console.c
drivers/char/hvc_console.c
+25
-1
No files found.
arch/ppc64/kernel/pSeries_lpar.c
View file @
e7b18a2d
...
...
@@ -355,8 +355,13 @@ static int udbg_getc_pollLP(void)
/* get some more chars. */
inbuflen
=
0
;
rc
=
plpar_get_term_char
(
vtermno
,
&
inbuflen
,
buf
);
if
(
inbuflen
==
0
&&
rc
==
H_Success
)
return
-
1
;
if
(
rc
!=
H_Success
)
inbuflen
=
0
;
/* otherwise inbuflen is garbage */
}
if
(
inbuflen
<=
0
||
inbuflen
>
16
)
{
/* Catch error case as well as other oddities (corruption) */
inbuflen
=
0
;
return
-
1
;
}
ch
=
buf
[
0
];
for
(
i
=
1
;
i
<
inbuflen
;
i
++
)
/* shuffle them down. */
...
...
drivers/char/hvc_console.c
View file @
e7b18a2d
...
...
@@ -22,6 +22,7 @@
#include <linux/console.h>
#include <linux/major.h>
#include <linux/kernel.h>
#include <linux/sysrq.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/sched.h>
...
...
@@ -46,6 +47,9 @@ static struct tty_struct *hvc_table[MAX_NR_HVC_CONSOLES];
static
struct
termios
*
hvc_termios
[
MAX_NR_HVC_CONSOLES
];
static
struct
termios
*
hvc_termios_locked
[
MAX_NR_HVC_CONSOLES
];
static
int
hvc_offset
;
#ifdef CONFIG_MAGIC_SYSRQ
static
int
sysrq_pressed
;
#endif
#define N_OUTBUF 16
...
...
@@ -98,6 +102,14 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
spin_unlock_irqrestore
(
&
hp
->
lock
,
flags
);
}
static
void
hvc_hangup
(
struct
tty_struct
*
tty
)
{
struct
hvc_struct
*
hp
=
tty
->
driver_data
;
hp
->
count
=
0
;
hp
->
tty
=
NULL
;
}
/* called with hp->lock held */
static
void
hvc_push
(
struct
hvc_struct
*
hp
)
{
...
...
@@ -186,8 +198,19 @@ static void hvc_poll(int index)
n
=
hvc_get_chars
(
index
+
hvc_offset
,
buf
,
sizeof
(
buf
));
if
(
n
<=
0
)
break
;
for
(
i
=
0
;
i
<
n
;
++
i
)
for
(
i
=
0
;
i
<
n
;
++
i
)
{
#ifdef CONFIG_MAGIC_SYSRQ
/* Handle the SysRq Hack */
if
(
buf
[
i
]
==
'\x0f'
)
{
/* ^O -- should support a sequence */
sysrq_pressed
=
1
;
continue
;
}
else
if
(
sysrq_pressed
)
{
handle_sysrq
(
buf
[
i
],
NULL
,
NULL
,
tty
);
sysrq_pressed
=
0
;
continue
;
}
#endif
tty_insert_flip_char
(
tty
,
buf
[
i
],
0
);
}
}
if
(
tty
->
flip
.
count
)
tty_schedule_flip
(
tty
);
...
...
@@ -246,6 +269,7 @@ int __init hvc_init(void)
hvc_driver
.
open
=
hvc_open
;
hvc_driver
.
close
=
hvc_close
;
hvc_driver
.
write
=
hvc_write
;
hvc_driver
.
hangup
=
hvc_hangup
;
hvc_driver
.
write_room
=
hvc_write_room
;
hvc_driver
.
chars_in_buffer
=
hvc_chars_in_buffer
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment