Closed GoogleCodeExporter closed 9 years ago
I've changed sys-dial(2) to declare those routines deprecated, in favour of
dial(2) as you say. Much though I'd like to remove them, until there's a big
change overall to justify it, it's probably not worth making existing Dis files
fail.
Original comment by Charles....@gmail.com
on 13 Jun 2014 at 11:57
Would you be interested in patches for the few programs that still use
sys->announce and ->listen that convert them to the dial(2) functions?
Original comment by kristofwycz
on 13 Jun 2014 at 4:00
Maybe I'm not too lazy to copy the fix from Plan 9.
diff -r 01665ab22684 emu/port/dial.c
--- a/emu/port/dial.c Sat Sep 07 11:32:50 2013 +0100
+++ b/emu/port/dial.c Fri Jun 13 16:48:44 2014 +0000
@@ -408,7 +408,14 @@
*p++ = 0;
strncpy(naddr, p, na);
naddr[na-1] = 0;
- strncpy(file, buf, nf);
- file[nf-1] = 0;
+
+ if(buf[0] == '/'){
+ p = strchr(buf+1, '/');
+ if(p == nil)
+ p = buf;
+ else
+ p++;
+ }
+ snprint(file, nf, "%s/%s", netdir, p);
return 0;
}
Original comment by kristofwycz
on 13 Jun 2014 at 5:07
Actually, given the number of programs still using it, it would be better to
make that small change. I had converted most existing programs, but that was
lost in a small disaster. Laptops. SSDs. Ext2 (not its fault, but it confused
things). I've put the status back to Accepted and I'll merge in that code.
Thanks.
Original comment by Charles....@gmail.com
on 13 Jun 2014 at 7:22
I've changed both emu/port/dial.c and os/port/dial.c
Original comment by Charles....@gmail.com
on 16 Jun 2014 at 10:43
Original issue reported on code.google.com by
kristofwycz
on 13 Jun 2014 at 12:31