OK, I integrated this one too.  Changed if (!filehdl) to if (filehdl < 0)
for cleanliness.

thanks,
-Kevin

Jeff Dubrule wrote:

> 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);
> +       }
>      }
>  }
>

Reply via email to