home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / a / ibcs2 / ibcs-1.2-9 < prev    next >
Encoding:
Text File  |  1995-10-10  |  2.1 KB  |  77 lines

  1. Index: socksys.c
  2. ===================================================================
  3. RCS file: /usr/CVS/ibcs/iBCSemul/socksys.c,v
  4. retrieving revision 1.40
  5. diff -u -r1.40 socksys.c
  6. --- socksys.c    1995/07/31 12:28:22    1.40
  7. +++ socksys.c    1995/08/04 13:04:03
  8. @@ -699,9 +699,12 @@
  9.                  current->pid, (unsigned long)filep);
  10.  #endif
  11.      if (MINOR(ino->i_rdev) == 1) {
  12. +        /* Special - minor 1 is fake spx for X. */
  13. +        args[0] = AF_UNIX;
  14. +        args[1] = SOCK_STREAM;
  15. +        args[2] = 0;
  16.      } else switch ((args[0] = ((MINOR(ino->i_rdev) >> 4) & 0x0f))) {
  17. -        case 0:
  18. -            /* Special - minor 1 is fake spx for X. */
  19. +        case AF_UNIX:
  20.              args[0] = AF_UNIX;
  21.              args[1] = SOCK_STREAM;
  22.              args[2] = 0;
  23. Index: stream.c
  24. ===================================================================
  25. RCS file: /usr/CVS/ibcs/iBCSemul/stream.c,v
  26. retrieving revision 1.4
  27. diff -u -r1.4 stream.c
  28. --- stream.c    1995/07/03 12:51:54    1.4
  29. +++ stream.c    1995/08/08 10:33:39
  30. @@ -49,14 +49,19 @@
  31.      fd = (int)get_fs_long(((unsigned long *)regs->esp) + 1);
  32.  
  33.      if (!current->FD[fd]
  34. -    || !(ino = current->FD[fd]->f_inode)
  35. -    || !ino->i_sock)
  36. +    || !(ino = current->FD[fd]->f_inode))
  37.          return -EBADF;
  38.  
  39. -    /* Ignore the /dev/spx device used for local X connections. */
  40. -    if (MINOR(ino->i_rdev) == 1)
  41. +    /* Ignore the /dev/spx device used for local X connections
  42. +     * and /dev/null (aka /dev/X0R).
  43. +     */
  44. +    if (MINOR(ino->i_rdev) == 1
  45. +    || (MAJOR(ino->i_rdev) == 1 && MINOR(ino->i_rdev) == 3))
  46.          return 0;
  47.  
  48. +    if (!ino->i_sock)
  49. +        return -EBADF;
  50. +
  51.  #ifdef EMU_XTI
  52.      return timod_getmsg(fd, ino, regs);
  53.  #else
  54. @@ -74,13 +79,18 @@
  55.      fd = (int)get_fs_long(((unsigned long *)regs->esp) + 1);
  56.  
  57.      if (!current->FD[fd]
  58. -    || !(ino = current->FD[fd]->f_inode)
  59. -    || !ino->i_sock)
  60. +    || !(ino = current->FD[fd]->f_inode))
  61.          return -EBADF;
  62.  
  63. -    /* Ignore the /dev/spx device used for local X connections. */
  64. -    if (MINOR(ino->i_rdev) == 1)
  65. +    /* Ignore the /dev/spx device used for local X connections
  66. +     * and /dev/null (aka /dev/X0R).
  67. +     */
  68. +    if (MINOR(ino->i_rdev) == 1
  69. +    || (MAJOR(ino->i_rdev) == 1 && MINOR(ino->i_rdev) == 3))
  70.          return 0;
  71. +
  72. +    if (!ino->i_sock)
  73. +        return -EBADF;
  74.  
  75.  #ifdef EMU_XTI
  76.      return timod_putmsg(fd, ino, regs);
  77.