devroot: Fix stat and clean up rootgen.
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 30 Mar 2017 18:01:28 +0000 (14:01 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 30 Mar 2017 18:01:28 +0000 (14:01 -0400)
commit3d5acacd20b6a7cba6d7fe73298f6a937304d66c
treee0f626467055c4e515bc98fc53f9441aa30e1e00
parent8f025b9bd7fe7a1cbc22d9ab5d3e702bb231d07b
devroot: Fix stat and clean up rootgen.

Stat on directories didn't work.  It was doing the usual devstat() thing
where devstat() makes a fake entry.  But we can actually do better, by
implementing rootstat directly.  Since we're trying to be a filesystem, we
shouldn't be using the synthetic solutions (e.g. devstat), which get the
timestamps and usernames wrong.

Likewise, I cleaned up rootgen() a little.  We had been taking a dirtab
pointer, but not actually using it (except in one odd case), which was
confusing.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/root.c
kern/src/ns/dev.c