⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 devfs.patch

📁 gpm-1.20.0.tar.gz
💻 PATCH
字号:
From gpm-request@prosa.it  Thu Apr 27 12:07:30 2000Received: from localhost (rubini@localhost [127.0.0.1])	by morgana.systemy.it (8.9.3/8.9.3/Debian/GNU) with ESMTP id MAA19031	for <rubini@localhost>; Thu, 27 Apr 2000 12:07:29 +0200Received: from pop	by fetchmail-4.6.4 POP3	for <rubini/localhost> (single-drop); Thu, 27 Apr 2000 12:07:29 MESTReceived: from giga.prosa.it (root@[213.255.48.147]) by pop.systemy.it (8.8.8/8.8.3) with ESMTP id NAA03517 for <rubini@pop.systemy.it>; Mon, 24 Apr 2000 13:30:37 +0200Received: (from lists@localhost)	by giga.prosa.it (8.9.3/8.9.3/Debian/GNU) id NAA16706;	Mon, 24 Apr 2000 13:30:35 +0200Resent-Date: Mon, 24 Apr 2000 13:30:35 +0200X-Authentication-Warning: giga.prosa.it: lists set sender to gpm-request@lists.prosa.it using -fFrom: "Adam J. Richter" <adam@yggdrasil.com>Date: Mon, 24 Apr 2000 03:43:11 -0700Message-Id: <200004241043.DAA28678@adam.yggdrasil.com>To: gpm@prosa.itSubject: Patch adding devfs support to gpm-1.19.2Resent-Message-ID: <Do4YZC.A.jEE.sADB5@giga>Resent-From: gpm@prosa.itReply-To: gpm@prosa.itX-Mailing-List: <gpm@lists.prosa.it> archive/latest/717X-Loop: gpm@lists.prosa.itPrecedence: bulkResent-Sender: gpm-request@prosa.itX-UIDL: a6c102abee205325fb8ebf43077d9567Status: RO	The following patch fixes gpm-1.19.2 to allow use ofthe virtual console names built into devfs (at least forlinux-2.3.99pre5.5).  Although it is possible to add theold names (or some other names) to a devfs-based system, thesenames will always be present on all devfs-based systems, eliminatinganother potential incompatability.  If you apply this patch, gpmshould still work on all of the systems that it worked on before,although I have not tested it on a non-devfs system.  I hope youwill apply this patch or some variant of it for the next release.Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104adam@yggdrasil.com     \ /                  San Jose, California 95129-1034+1 408 261-6630         | g g d r a s i l   United States of Americafax +1 408 261-6631      "Free Software For The Rest Of Us."diff -u -r gpm-1.19.2/gpm-root.c gpm/gpm-root.c--- gpm-1.19.2/gpm-root.c	Tue Apr 18 22:53:38 2000+++ gpm/gpm-root.c	Mon Apr 24 03:35:00 2000@@ -1868,6 +1868,10 @@   sprintf(dumpname,"/dev/vcsa%i",vc);   dumpfd=open(dumpname,O_RDONLY);   if (dumpfd<0) {+    sprintf(dumpname,"/dev/vcc/a%i",vc);+    dumpfd=open(dumpname,O_RDONLY);+  }+  if (dumpfd<0) {     gpm_debug_log(LOG_ERR,"%s: %s", dumpname, strerror(errno));     return;   } /*if*/@@ -1888,6 +1892,10 @@    sprintf(dumpname,"/dev/vcsa%i",vc);   dumpfd=open(dumpname,O_WRONLY);+  if (dumpfd < 0) {+    sprintf(dumpname,"/dev/vcc/a%i",vc);+    dumpfd=open(dumpname,O_WRONLY);+  }   if (dumpfd<0) {     gpm_debug_log(LOG_ERR,"%s: %s", dumpname, strerror(errno));     return;@@ -2090,9 +2098,11 @@         exit(1);       } -    if (stat("/dev/vcs0",&sbuf)<0 && stat("/dev/vcs",&sbuf)<0)+    if (stat("/dev/vcs0",&sbuf)<0+	&& stat("/dev/vcs",&sbuf)<0+	&& stat("/dev/vcc/0",&sbuf)<0)       {-        fprintf(stderr,"%s: /dev/vcs0: %s\n",prgname,strerror(errno));+        fprintf(stderr,"%s: /dev/vcc/0: %s\n",prgname,strerror(errno));         fprintf(stderr,"%s: do you have vcs devices? Refer to the manpage\n",                 prgname);         exit(1);diff -u -r gpm-1.19.2/hltest.c gpm/hltest.c--- gpm-1.19.2/hltest.c	Mon Jan 17 13:34:00 2000+++ gpm/hltest.c	Mon Apr 24 03:35:32 2000@@ -456,7 +456,11 @@   /* open your dump/restore buffers */    sprintf(devname,"/dev/vcsa%i",vc);-  if ((dev_vcs=open(devname,O_RDWR))<0)+  if ((dev_vcs=open(devname,O_RDWR))<0) {+    sprintf(devname,"/dev/vcc/a%i",vc);+    dev_vcs=open(devname,O_RDWR);+  }+  if (dev_vcs<0) 	{ perror(devname); exit(1); }    if (Gpm_Open(&conn,0)==-1)diff -u -r gpm-1.19.2/liblow.c gpm/liblow.c--- gpm-1.19.2/liblow.c	Thu Jan 27 14:09:00 2000+++ gpm/liblow.c	Mon Apr 24 03:05:21 2000@@ -226,6 +226,8 @@         {  /* forced vc number */           conn->vc=flag;           sprintf(tty,"/dev/tty%i",flag);+	  if (access(tty, F_OK) < 0)+	      sprintf(tty,"/dev/vc/%i",flag);         }       else if (flag==0)  /* use your current vc */         {@@ -235,7 +237,8 @@           if (!t && isatty(2)) t = ttyname(2); /* stderr */           if (!t) goto err;           strcpy(tty,t);-          if (strncmp(tty,"/dev/tty",8) || !isdigit(tty[8]))+          if ((strncmp(tty,"/dev/tty",8) && strncmp(tty, "/dev/vc/",8))+	       || !isdigit(tty[8]))             goto err;           conn->vc=atoi(tty+8);         }-- Bored?      echo unsubscribe | mail gpm-request@lists.prosa.it

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -