Fix arguments of CONS_GETINFO

This commit is contained in:
ache 1994-04-07 23:23:01 +00:00
parent 6d829d17b9
commit 50c9f98382
5 changed files with 16 additions and 10 deletions

View File

@ -14,7 +14,7 @@
* DK9210 Aalborg SO Phone: +45 9814 8076
*
* from:@(#)console.h 1.1 940105
* $Id: console.h,v 1.6 1994/02/01 06:18:43 nate Exp $
* $Id: console.h,v 1.7 1994/02/04 10:35:29 chmr Exp $
*/
#ifndef _CONSOLE_H_
@ -55,7 +55,7 @@
#define GIO_FONT8x14 _IOR('c', 67, fnt14_t)
#define PIO_FONT8x16 _IOW('c', 68, fnt16_t)
#define GIO_FONT8x16 _IOR('c', 69, fnt16_t)
#define CONS_GETINFO _IOR('c', 73, vid_info_t)
#define CONS_GETINFO _IOWR('c', 73, vid_info_t)
#define CONS_GETVERS _IOR('c', 74, long)
#define CONS_80x25TEXT _IO('c', 102)
#define CONS_80x50TEXT _IO('c', 103)

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from:@(#)syscons.c 1.3 940129
* $Id: syscons.c,v 1.40 1994/03/21 06:37:04 davidg Exp $
* $Id: syscons.c,v 1.41 1994/04/01 18:33:12 ache Exp $
*
*/
@ -638,8 +638,9 @@ int pcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
return 0;
case CONS_GETINFO: /* get current (virtual) console info */
if (*data == sizeof(struct vid_info)) {
{
vid_info_t *ptr = (vid_info_t*)data;
if (ptr->size == sizeof(struct vid_info)) {
ptr->m_num = get_scr_num();
ptr->mv_col = scp->xpos;
ptr->mv_row = scp->ypos;
@ -656,6 +657,7 @@ int pcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
return 0;
}
return EINVAL;
}
case VT_SETMODE: /* set screen switcher mode */
bcopy(data, &scp->smode, sizeof(struct vt_mode));

View File

@ -14,7 +14,7 @@
* DK9210 Aalborg SO Phone: +45 9814 8076
*
* from:@(#)console.h 1.1 940105
* $Id: console.h,v 1.6 1994/02/01 06:18:43 nate Exp $
* $Id: console.h,v 1.7 1994/02/04 10:35:29 chmr Exp $
*/
#ifndef _CONSOLE_H_
@ -55,7 +55,7 @@
#define GIO_FONT8x14 _IOR('c', 67, fnt14_t)
#define PIO_FONT8x16 _IOW('c', 68, fnt16_t)
#define GIO_FONT8x16 _IOR('c', 69, fnt16_t)
#define CONS_GETINFO _IOR('c', 73, vid_info_t)
#define CONS_GETINFO _IOWR('c', 73, vid_info_t)
#define CONS_GETVERS _IOR('c', 74, long)
#define CONS_80x25TEXT _IO('c', 102)
#define CONS_80x50TEXT _IO('c', 103)

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from:@(#)syscons.c 1.3 940129
* $Id: syscons.c,v 1.40 1994/03/21 06:37:04 davidg Exp $
* $Id: syscons.c,v 1.41 1994/04/01 18:33:12 ache Exp $
*
*/
@ -638,8 +638,9 @@ int pcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
return 0;
case CONS_GETINFO: /* get current (virtual) console info */
if (*data == sizeof(struct vid_info)) {
{
vid_info_t *ptr = (vid_info_t*)data;
if (ptr->size == sizeof(struct vid_info)) {
ptr->m_num = get_scr_num();
ptr->mv_col = scp->xpos;
ptr->mv_row = scp->ypos;
@ -656,6 +657,7 @@ int pcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
return 0;
}
return EINVAL;
}
case VT_SETMODE: /* set screen switcher mode */
bcopy(data, &scp->smode, sizeof(struct vt_mode));

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from:@(#)syscons.c 1.3 940129
* $Id: syscons.c,v 1.40 1994/03/21 06:37:04 davidg Exp $
* $Id: syscons.c,v 1.41 1994/04/01 18:33:12 ache Exp $
*
*/
@ -638,8 +638,9 @@ int pcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
return 0;
case CONS_GETINFO: /* get current (virtual) console info */
if (*data == sizeof(struct vid_info)) {
{
vid_info_t *ptr = (vid_info_t*)data;
if (ptr->size == sizeof(struct vid_info)) {
ptr->m_num = get_scr_num();
ptr->mv_col = scp->xpos;
ptr->mv_row = scp->ypos;
@ -656,6 +657,7 @@ int pcioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
return 0;
}
return EINVAL;
}
case VT_SETMODE: /* set screen switcher mode */
bcopy(data, &scp->smode, sizeof(struct vt_mode));