Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42880
b: refs/heads/master
c: 403aac9
h: refs/heads/master
v: v3
  • Loading branch information
Yoichi Yuasa authored and Linus Torvalds committed Dec 7, 2006
1 parent 4862dfc commit 7546f81
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: db68b189f4b8026b2f532e1b1bbdba5fcb36638c
refs/heads/master: 403aac965eba17a360a93c3b679f57b21030d4cd
16 changes: 10 additions & 6 deletions trunk/drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static void gotoxy(struct vc_data *vc, int new_x, int new_y);
static void save_cur(struct vc_data *vc);
static void reset_terminal(struct vc_data *vc, int do_clear);
static void con_flush_chars(struct tty_struct *tty);
static void set_vesa_blanking(char __user *p);
static int set_vesa_blanking(char __user *p);
static void set_cursor(struct vc_data *vc);
static void hide_cursor(struct vc_data *vc);
static void console_callback(struct work_struct *ignored);
Expand Down Expand Up @@ -2369,7 +2369,7 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
ret = __put_user(data, p);
break;
case TIOCL_SETVESABLANK:
set_vesa_blanking(p);
ret = set_vesa_blanking(p);
break;
case TIOCL_GETKMSGREDIRECT:
data = kmsg_redirect;
Expand Down Expand Up @@ -3313,11 +3313,15 @@ postcore_initcall(vtconsole_class_init);
* Screen blanking
*/

static void set_vesa_blanking(char __user *p)
static int set_vesa_blanking(char __user *p)
{
unsigned int mode;
get_user(mode, p + 1);
vesa_blank_mode = (mode < 4) ? mode : 0;
unsigned int mode;

if (get_user(mode, p + 1))
return -EFAULT;

vesa_blank_mode = (mode < 4) ? mode : 0;
return 0;
}

void do_blank_screen(int entering_gfx)
Expand Down

0 comments on commit 7546f81

Please sign in to comment.