Print this page
9042 multiples of tty streams modules cause weirdness
Reviewed by: Randy Fishel <randyf@sibernet.com>
Reviewed by: Carlos Neira <cneirabustos@gmail.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ptem.c
          +++ new/usr/src/uts/common/io/ptem.c
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  23   23  /*        All Rights Reserved   */
  24   24  
  25   25  
  26   26  /*
  27   27   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28   28   * Use is subject to license terms.
       29 + * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
  29   30   */
  30   31  
  31   32  /*
  32   33   * Description:
  33   34   *
  34   35   * The PTEM streams module is used as a pseudo driver emulator.  Its purpose
  35   36   * is to emulate the ioctl() functions of a terminal device driver.
  36   37   */
  37   38  
  38   39  #include <sys/types.h>
↓ open down ↓ 16 lines elided ↑ open up ↑
  55   56  #include <sys/ddi.h>
  56   57  #include <sys/sunddi.h>
  57   58  #include <sys/conf.h>
  58   59  #include <sys/modctl.h>
  59   60  
  60   61  extern struct streamtab pteminfo;
  61   62  
  62   63  static struct fmodsw fsw = {
  63   64          "ptem",
  64   65          &pteminfo,
  65      -        D_MTQPAIR | D_MP
       66 +        D_MTQPAIR | D_MP | _D_SINGLE_INSTANCE
  66   67  };
  67   68  
  68   69  static struct modlstrmod modlstrmod = {
  69   70          &mod_strmodops, "pty hardware emulator", &fsw
  70   71  };
  71   72  
  72   73  static struct modlinkage modlinkage = {
  73   74          MODREV_1, &modlstrmod, NULL
  74   75  };
  75   76  
↓ open down ↓ 1015 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX