URI: 
       tchange Tcreate message in 9P2000.u - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit b5c7be2fd69c027f5de9772e117885cb1c89f907
   DIR parent 1190a7aa7a1dba5964688c4bb8ee09fc8930c488
  HTML Author: rsc <devnull@localhost>
       Date:   Fri,  3 Mar 2006 16:34:49 +0000
       
       change Tcreate message in 9P2000.u
       
       Diffstat:
         M include/fcall.h                     |       1 +
         M src/cmd/9pserve.c                   |       8 +++++++-
         M src/lib9/convM2S.c                  |       2 ++
         M src/lib9/convS2M.c                  |       4 ++++
       
       4 files changed, 14 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/include/fcall.h b/include/fcall.h
       t@@ -44,6 +44,7 @@ struct        Fcall
                
                /* 9P2000.u extensions */
                int        errornum;        /* Rerror */
       +        char        *extension;        /* Tcreate */
        } Fcall;
        
        
   DIR diff --git a/src/cmd/9pserve.c b/src/cmd/9pserve.c
       t@@ -449,6 +449,12 @@ connthread(void *arg)
                                }
                                m->afid->ref++;
                                break;
       +                case Tcreate:
       +                        if(dotu && !c->dotu && (m->tx.perm&(DMSYMLINK|DMDEVICE|DMNAMEDPIPE|DMSOCKET))){
       +                                err(m, "unsupported file type");
       +                                continue;
       +                        }
       +                        goto caseTopen;
                        case Topenfd:
                                if(m->tx.mode&~(OTRUNC|3)){
                                        err(m, "bad openfd mode");
       t@@ -458,7 +464,7 @@ connthread(void *arg)
                                m->tx.type = Topen;
                                m->tpkt[4] = Topen;
                                /* fall through */
       -                case Tcreate:
       +                caseTopen:
                        case Topen:
                        case Tclunk:
                        case Tread:
   DIR diff --git a/src/lib9/convM2S.c b/src/lib9/convM2S.c
       t@@ -161,6 +161,8 @@ convM2Su(uchar *ap, uint nap, Fcall *f, int dotu)
                        p += BIT32SZ;
                        f->mode = GBIT8(p);
                        p += BIT8SZ;
       +                if(dotu)
       +                        p = gstring(p, ep, &f->extension);
                        break;
        
                case Tread:
   DIR diff --git a/src/lib9/convS2M.c b/src/lib9/convS2M.c
       t@@ -102,6 +102,8 @@ sizeS2Mu(Fcall *f, int dotu)
                        n += stringsz(f->name);
                        n += BIT32SZ;
                        n += BIT8SZ;
       +                if(dotu)
       +                        n += stringsz(f->extension);
                        break;
        
                case Tread:
       t@@ -287,6 +289,8 @@ convS2Mu(Fcall *f, uchar *ap, uint nap, int dotu)
                        p += BIT32SZ;
                        PBIT8(p, f->mode);
                        p += BIT8SZ;
       +                if(dotu)
       +                        p = pstring(p, f->extension);
                        break;
        
                case Tread: