Commit d8c65941 authored by Alessandro Rubini's avatar Alessandro Rubini

sdbfs/lib: fix offset in returned devices when scanning

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 22cc346c
......@@ -157,7 +157,7 @@ scan:
if (newdir) {
dev = scan_newdir(fs, depth);
if (dev)
return dev;
goto out;
/* Otherwise the directory is not there: no intercon */
if (!depth)
return NULL; /* no entries at all */
......@@ -175,6 +175,9 @@ scan:
dev = fs->currentp = sdbfs_readentry(fs, fs->this[depth]);
fs->this[depth] += sizeof(*dev);
fs->nleft[depth]--;
out:
fs->f_offset = fs->base[fs->depth]
+ htonll(fs->currentp->sdb_component.addr_first);
return dev;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment