hlfw.ca

plumb

Download patch

ref: f2d99a6d520996b471f92bed87dcf422bb3892ce
parent: 554ebef513b83b5170f3777a9a46de8e7b1e38af
author: Michael Misch <michealmisch1985@gmail.com>
date: Tue Jul 13 05:44:07 PDT 2021

Make it work for 'nix, plan9 testing will have to follow later

--- a/plumb.go
+++ b/plumb.go
@@ -10,10 +10,11 @@
 	"strings"
 
 	"9fans.net/go/plumb"
+        "9fans.net/go/plan9"
 )
 
 var (
-	plumbfile = flag.String("p", "/mnt/plumb/send", "write the message to plumbfile (default /mnt/plumb/send)")
+	plumbfile = flag.String("p", "send", "write the message to plumbfile (default send)")
 	attributes = flag.String("a", "", "set the attr field of the message (default is empty), expects key=value")
 	source = flag.String("s", "", "set the src field of the message (default is store)")
 	destination = flag.String("d", "", "set the dst filed of the message (default is store)")
@@ -31,7 +32,7 @@
 }
 
 func (s storeMsg) send() error {
-	fd, err := os.OpenFile(*plumbfile, os.O_WRONLY, 0644)
+	fd, err := plumb.Open("send", plan9.OWRITE)
 	if err != nil {
 		return err
 	}