8 * search for a tuple that has the given 'attr=val' and also 'rattr=x'.
9 * copy 'x' into 'buf' and return the whole tuple.
11 * return 0 if not found.
14 csgetvalue(char *netroot, char *attr, char *val, char *rattr, Ndbtuple **pp)
16 Ndbtuple *t, *first, *last;
25 snprint(line, sizeof(line), "%s/cs", netroot);
27 strcpy(line, "/net/cs");
28 fd = open(line, ORDWR);
32 snprint(line, sizeof(line), "!%s=%s %s=*", attr, val, rattr);
33 if(write(fd, line, strlen(line)) < 0){
42 n = read(fd, line, sizeof(line)-2);
48 t = _ndbparseline(line);
57 if(rv == nil && strcmp(rattr, t->attr) == 0)
65 setmalloctag(first, getcallerpc(&netroot));