It is easier to use an empty string when the root directory is intended.
Adjust the code to drop use of "/" and NULL and just use and empty
string.
Signed-off-by: Simon Glass <sjg@chromium.org>
Rather than creating a new stream, which gets lost, virtio_fs_dir_open()
should use the existing one. Fix it, so that the fh member is preserved
for future use.
This fixes a problem where the fh value is not preserved, thus causing
a subsequent 'ls' on the same directory to fail.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: #15
Add an implementation of virtio-fs directories, including looking them
up and reading them.
This requires some information in struct fs_dir_stream to maintain the
state of the directory read.
Signed-off-by: Simon Glass <sjg@chromium.org>