mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Yank out Christoph Robitschko's hack for the hanging console problem as
it didn't actually fix it, and because starting the getty on /dev/console instead of /dev/vga is a good work-around.
This commit is contained in:
parent
73853682e5
commit
519471cc84
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=629
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id$
|
||||
* $Id: cons.c,v 1.3 1993/10/16 14:14:49 rgrimes Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -49,7 +49,6 @@
|
||||
#include "sys/tty.h"
|
||||
#include "sys/file.h"
|
||||
#include "sys/conf.h"
|
||||
#include "sys/vnode.h"
|
||||
|
||||
#include "cons.h"
|
||||
|
||||
@ -99,25 +98,14 @@ cninit()
|
||||
(*cp->cn_init)(cp);
|
||||
}
|
||||
|
||||
static struct vnode *cnopenvp = NULLVP;
|
||||
|
||||
|
||||
cnopen(dev, flag, mode, p)
|
||||
dev_t dev;
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
if (cn_tab == NULL)
|
||||
return (0);
|
||||
dev = cn_tab->cn_dev;
|
||||
if (cnopenvp == NULLVP)
|
||||
if ((error = getdevvp(dev, &cnopenvp, VCHR))) {
|
||||
printf("cnopen: getdevvp returned %d !\n", error);
|
||||
return(error);
|
||||
}
|
||||
return ((*cdevsw[major(dev)].d_open)(dev, flag, mode, p));
|
||||
}
|
||||
|
||||
@ -126,21 +114,10 @@ cnclose(dev, flag, mode, p)
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
if (cn_tab == NULL)
|
||||
return (0);
|
||||
dev = cn_tab->cn_dev;
|
||||
if (vcount(cnopenvp) <= 1)
|
||||
error = (*cdevsw[major(dev)].d_close)(dev, flag, mode, p);
|
||||
else
|
||||
error = 0;
|
||||
if (error == 0) {
|
||||
vrele(cnopenvp);
|
||||
cnopenvp = NULLVP;
|
||||
return(error);
|
||||
}
|
||||
return ((*cdevsw[major(dev)].d_close)(dev, flag, mode, p));
|
||||
}
|
||||
|
||||
cnread(dev, uio, flag)
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id$
|
||||
* $Id: cons.c,v 1.3 1993/10/16 14:14:49 rgrimes Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -49,7 +49,6 @@
|
||||
#include "sys/tty.h"
|
||||
#include "sys/file.h"
|
||||
#include "sys/conf.h"
|
||||
#include "sys/vnode.h"
|
||||
|
||||
#include "cons.h"
|
||||
|
||||
@ -99,25 +98,14 @@ cninit()
|
||||
(*cp->cn_init)(cp);
|
||||
}
|
||||
|
||||
static struct vnode *cnopenvp = NULLVP;
|
||||
|
||||
|
||||
cnopen(dev, flag, mode, p)
|
||||
dev_t dev;
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
if (cn_tab == NULL)
|
||||
return (0);
|
||||
dev = cn_tab->cn_dev;
|
||||
if (cnopenvp == NULLVP)
|
||||
if ((error = getdevvp(dev, &cnopenvp, VCHR))) {
|
||||
printf("cnopen: getdevvp returned %d !\n", error);
|
||||
return(error);
|
||||
}
|
||||
return ((*cdevsw[major(dev)].d_open)(dev, flag, mode, p));
|
||||
}
|
||||
|
||||
@ -126,21 +114,10 @@ cnclose(dev, flag, mode, p)
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
{
|
||||
int error;
|
||||
|
||||
|
||||
if (cn_tab == NULL)
|
||||
return (0);
|
||||
dev = cn_tab->cn_dev;
|
||||
if (vcount(cnopenvp) <= 1)
|
||||
error = (*cdevsw[major(dev)].d_close)(dev, flag, mode, p);
|
||||
else
|
||||
error = 0;
|
||||
if (error == 0) {
|
||||
vrele(cnopenvp);
|
||||
cnopenvp = NULLVP;
|
||||
return(error);
|
||||
}
|
||||
return ((*cdevsw[major(dev)].d_close)(dev, flag, mode, p));
|
||||
}
|
||||
|
||||
cnread(dev, uio, flag)
|
||||
|
Loading…
Reference in New Issue
Block a user