]> git.lizzy.rs Git - plan9front.git/commitdiff
B, sam: remove sam srv file
authorFulton Browne <git@fulton.software>
Sat, 12 Jun 2021 17:20:53 +0000 (17:20 +0000)
committerFulton Browne <git@fulton.software>
Sat, 12 Jun 2021 17:20:53 +0000 (17:20 +0000)
No need for 2 programs doing the same job.

rc/bin/B
sys/src/cmd/samterm/io.c
sys/src/cmd/samterm/plan9.c
sys/src/cmd/samterm/samterm.h

index 56cccaa38e5ed6297cfaba964dc3700f3703868e..866242438319e84d6d05016da5254f825c1c0376 100755 (executable)
--- a/rc/bin/B
+++ b/rc/bin/B
@@ -16,27 +16,4 @@ if(test -f /mnt/plumb/edit || test -f /mnt/term/mnt/plumb/edit){
        exit
 }
 
-# using sam srv file
-
-for(i)
-       switch($i){
-       case /*
-               files = ( $files $i )
-       case *
-               files = ( $files `{cleanname `{pwd}^/$i} )
-       }
-
-if(test -f /mnt/term/srv/sam.$user) dest = /mnt/term/srv/sam.$user
-if not if(test -f /srv/sam.$user) dest = /srv/sam.$user
-if not {
-       echo B: can''''t find sam server file >[1=2]
-       exit open
-}
-
-switch($files){
-case *:*
-       for(i in $files)
-               echo $i | sed 's/^/B /;s/:([0-9]+)$/\n\1/g' >> $dest
-case *
-       echo B $files >> $dest
-}
+echo 'no plumber' >[1=2]
index 86fb4ceb3d95c106158c62c9b931dc94d434b48c..bd9b3a3b659df74376a704588f99aae2682ced16 100644 (file)
@@ -43,8 +43,7 @@ initio(void)
                threadexitsall("kbd");
        }
        hoststart();
-       if(plumbstart() < 0)
-               extstart();
+       plumbstart();
 }
 
 void
index 0022d4b2851b4524ad205f8394e39638c415d407..3d2065d82aea20636d842f821372c1741b637f3c 100644 (file)
@@ -147,39 +147,6 @@ extproc(void *argv)
        }
 }
 
-void
-extstart(void)
-{
-       char buf[32];
-       int fd;
-       static int p[2];
-       static void *arg[2];
-
-       if(pipe(p) < 0)
-               return;
-       sprint(exname, "/srv/sam.%s", getuser());
-       fd = create(exname, 1, 0600);
-       if(fd < 0){     /* assume existing guy is more important */
-    Err:
-               close(p[0]);
-               close(p[1]);
-               return;
-       }
-       sprint(buf, "%d", p[0]);
-       if(write(fd, buf, strlen(buf)) <= 0)
-               goto Err;
-       close(fd);
-       /*
-        * leave p[0] open so if the file is removed the event
-        * library won't get an error
-        */
-       plumbc = chancreate(sizeof(int), 0);
-       arg[0] = plumbc;
-       arg[1] = &p[1];
-       proccreate(extproc, arg, STACK);
-       atexit(removeextern);
-}
-
 int
 plumbformat(int i)
 {
index da8fea641743f7d1caedd62791d351a75d71f286..264d148e299555e390e00fc06068098dfe37dd29 100644 (file)
@@ -103,7 +103,6 @@ void        startnewfile(int, Text*);
 void   getmouse(void);
 void   mouseunblock(void);
 void   kbdblock(void);
-void   extstart(void);
 void   hoststart(void);
 int    plumbstart(void);
 int    button(int but);