int n, fd;
char buf[256];
- if(*dev == '/')
- sprint(buf, "%s/addr", dev);
+ if(*dev == '/' || *dev == '#')
+ snprint(buf, sizeof buf, "%s/addr", dev);
else
- sprint(buf, "/net/%s/addr", dev);
+ snprint(buf, sizeof buf, "/net/%s/addr", dev);
fd = open(buf, OREAD);
if(fd < 0)