tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Enhance ptyfs to handle multiple instances.



On Mar 26,  2:09pm, netbsd%izyk.ru@localhost (Ilya Zykov) wrote:
-- Subject: Re: Enhance ptyfs to handle multiple instances.

| Index: fs/ptyfs/ptyfs_subr.c
| ===================================================================
| RCS file: /cvsil/nbcur/src/sys/fs/ptyfs/ptyfs_subr.c,v
| retrieving revision 1.3
| diff -u -r1.3 ptyfs_subr.c
| --- fs/ptyfs/ptyfs_subr.c     24 Mar 2014 20:48:08 -0000      1.3
| +++ fs/ptyfs/ptyfs_subr.c     26 Mar 2014 09:44:44 -0000
| @@ -116,7 +116,7 @@
|  static void
|  ptyfs_getinfo(struct ptyfsnode *ptyfs, struct lwp *l)
|  {
| -     extern struct ptm_pty *ptyfs_save_ptm, ptm_ptyfspty;
| +     extern struct ptm_pty *ptyfs_save_ptm;
|  
|       if (ptyfs->ptyfs_type == PTYFSroot) {
|               ptyfs->ptyfs_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|
| @@ -126,7 +126,7 @@
|               ptyfs->ptyfs_mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|
|                   S_IROTH|S_IWOTH;
|  
| -     if (ptyfs_save_ptm != NULL && ptyfs_save_ptm != &ptm_ptyfspty) {
| +     if (ptyfs_save_ptm != NULL) {
|               int error;
|               struct pathbuf *pb;
|               struct nameidata nd;

Ok,

| Index: kern/tty_bsdpty.c
| ===================================================================
| RCS file: /cvsil/nbcur/src/sys/kern/tty_bsdpty.c,v
| retrieving revision 1.1.1.1
| diff -u -r1.1.1.1 tty_bsdpty.c
| --- kern/tty_bsdpty.c 4 Mar 2014 18:16:04 -0000       1.1.1.1
| +++ kern/tty_bsdpty.c 26 Mar 2014 09:44:44 -0000
| @@ -121,7 +121,7 @@
|       struct nameidata nd;
|       char name[TTY_NAMESIZE];
|  
| -     error = (*ptm->makename)(ptm, l, name, sizeof(name), dev, ms);
| +     error = pty_makename(ptm, l, name, sizeof(name), dev, ms);
|       if (error)
|               return error;
|  

Are you sure about this one? It is used when ptyfs is mounted and you have
old pty nodes around (so you get consistent names).

christos


Home | Main Index | Thread Index | Old Index