Add a symlink from /dev/vga to /dev/ttyv0 when using DEVFS

for programs like doscmd.

PR:		6920
Submitted by:	Luoqi Chen <luoqi@chen.ml.org>
This commit is contained in:
steve 1998-06-13 18:53:22 +00:00
parent b09c767c67
commit b0538909c0
3 changed files with 9 additions and 3 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.261 1998/05/17 11:52:18 phk Exp $
* $Id: syscons.c,v 1.262 1998/06/07 17:11:02 dfr Exp $
*/
#include "sc.h"
@ -131,6 +131,7 @@ static scr_stat main_console;
static scr_stat *console[MAXCONS];
#ifdef DEVFS
static void *sc_devfs_token[MAXCONS];
static void *sc_vga_devfs_token;
static void *sc_mouse_devfs_token;
static void *sc_console_devfs_token;
#endif
@ -800,6 +801,7 @@ scattach(struct isa_device *dev)
for (vc = 0; vc < MAXCONS; vc++)
sc_devfs_token[vc] = devfs_add_devswf(&scdevsw, vc, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "ttyv%n", vc);
sc_vga_devfs_token = devfs_link(sc_devfs_token[0], "vga");
sc_mouse_devfs_token = devfs_add_devswf(&scdevsw, SC_MOUSE, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "sysmouse");
sc_console_devfs_token = devfs_add_devswf(&scdevsw, SC_CONSOLE, DV_CHR,

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.261 1998/05/17 11:52:18 phk Exp $
* $Id: syscons.c,v 1.262 1998/06/07 17:11:02 dfr Exp $
*/
#include "sc.h"
@ -131,6 +131,7 @@ static scr_stat main_console;
static scr_stat *console[MAXCONS];
#ifdef DEVFS
static void *sc_devfs_token[MAXCONS];
static void *sc_vga_devfs_token;
static void *sc_mouse_devfs_token;
static void *sc_console_devfs_token;
#endif
@ -800,6 +801,7 @@ scattach(struct isa_device *dev)
for (vc = 0; vc < MAXCONS; vc++)
sc_devfs_token[vc] = devfs_add_devswf(&scdevsw, vc, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "ttyv%n", vc);
sc_vga_devfs_token = devfs_link(sc_devfs_token[0], "vga");
sc_mouse_devfs_token = devfs_add_devswf(&scdevsw, SC_MOUSE, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "sysmouse");
sc_console_devfs_token = devfs_add_devswf(&scdevsw, SC_CONSOLE, DV_CHR,

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: syscons.c,v 1.261 1998/05/17 11:52:18 phk Exp $
* $Id: syscons.c,v 1.262 1998/06/07 17:11:02 dfr Exp $
*/
#include "sc.h"
@ -131,6 +131,7 @@ static scr_stat main_console;
static scr_stat *console[MAXCONS];
#ifdef DEVFS
static void *sc_devfs_token[MAXCONS];
static void *sc_vga_devfs_token;
static void *sc_mouse_devfs_token;
static void *sc_console_devfs_token;
#endif
@ -800,6 +801,7 @@ scattach(struct isa_device *dev)
for (vc = 0; vc < MAXCONS; vc++)
sc_devfs_token[vc] = devfs_add_devswf(&scdevsw, vc, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "ttyv%n", vc);
sc_vga_devfs_token = devfs_link(sc_devfs_token[0], "vga");
sc_mouse_devfs_token = devfs_add_devswf(&scdevsw, SC_MOUSE, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "sysmouse");
sc_console_devfs_token = devfs_add_devswf(&scdevsw, SC_CONSOLE, DV_CHR,