On Fri, Oct 27, 2000 at 10:21:59AM -0400, Kevin Lawton wrote:
> How about I change to 'unsigned int', rather than 'int', since
> the val is assigned to an unsigned char? Is your compiler cool
> with that?
Yep.
While we're at it... This will allow the plex86 program itself to use
the /dev/misc/plex86, as well as /dev/plex86.
secret-lab:~/src/build/plex86$ cvs diff user/user.c
Index: user/user.c
===================================================================
RCS file: /cvsroot-plex86/plex86/user/user.c,v
retrieving revision 1.13
diff -u -r1.13 user.c
--- user/user.c 2000/10/26 18:24:51 1.13
+++ user/user.c 2000/10/27 14:25:01
@@ -203,13 +203,17 @@
/* open a new VM */
fprintf (stderr, "Opening VM (/dev/plex86)\n");
- filehdl = open ("/dev/plex86", O_RDWR);
+ filehdl = open ("/dev/misc/plex86", O_RDWR);
if (filehdl < 0)
{
- fprintf(stderr, "Did you load the kernel module?"
- " Read the toplevel README file!\n");
- perror ("open");
- exit (1);
+ /* Try the old name */
+ filehdl = open("/dev/plex86", O_RDWR);
+ if (!filehdl) {
+ fprintf(stderr, "Did you load the kernel module?"
+ " Read the toplevel README file!\n");
+ perror ("open");
+ exit (1);
+ }
}
}