devsrv.ed (494B)
1 g/^srvgen/ s/char\*, Dirtab\*, int/char *name, Dirtab *dt, int i/ 2 ,s!ref(sp->chan)!ref(\&sp->chan->ref)! 3 g/^srv/ s/long)/long off)/ 4 /c1 = fdtochan/a 5 srvadd(c, c1); 6 return n; 7 } 8 9 // Plan 9 VX split srvadd out from srvwrite. 10 static void 11 srvadd(Chan *c, Chan *c1) 12 { 13 Srv *sp; 14 15 /* c1 already incref'ed */ 16 . 17 /^ return n/d 18 /^srvwrite/;# 19 /^ Srv/d 20 /^srvwrite/-2i 21 static void srvadd(Chan*, Chan*); 22 23 . 24 $a 25 26 // Plan 9 VX addition 27 void 28 ksrvadd(Chan *c, Chan *c1) 29 { 30 incref(&c1->ref); 31 srvadd(c, c1); 32 } 33 34 .