Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100303
b: refs/heads/master
c: f97259e
h: refs/heads/master
i:
  100301: f0fd566
  100299: 26d3e0d
  100295: 1250fcf
  100287: 4c3e5c4
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 40f584e commit 86a848d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 609f9e92b570f390a457a81effe0af6b758dc582
refs/heads/master: f97259e35de1f99ba0ac19383408e247fd763cf0
9 changes: 7 additions & 2 deletions trunk/drivers/char/vc_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/kbd_kern.h>
#include <linux/console.h>
#include <linux/device.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>
#include <asm/byteorder.h>
Expand Down Expand Up @@ -460,9 +461,13 @@ static int
vcs_open(struct inode *inode, struct file *filp)
{
unsigned int currcons = iminor(inode) & 127;
int ret = 0;

lock_kernel();
if(currcons && !vc_cons_allocated(currcons-1))
return -ENXIO;
return 0;
ret = -ENXIO;
unlock_kernel();
return ret;
}

static const struct file_operations vcs_fops = {
Expand Down

0 comments on commit 86a848d

Please sign in to comment.