| get9root, unsharp \- get path to root of Plan 9 tree |
| char* unsharp(char *path) |
| This tree of Plan 9 software is conventionally installed in |
| but may be installed in other places (for example, users without |
| may with to install it in their own home directories). |
| should contain the path to the root. |
| returns a static pointer to the pathname of root, first checking |
| The lack of a fixed location for the Plan 9 tree |
| makes it difficult to hard-code paths |
| with the root of the tree. |
| with the path to the underlying system's file descriptor dup device, |
| As a convention, programs should never |
| paths obtained from user input. |
| uses this code to find unrooted file names included by plumb rules. |
| snprint(buf, sizeof buf, "#9/plumb/%s", name); |
| fd = open(unsharp(buf), OREAD); |
| could be smarter about finding the tree when |