Skip to content
Snippets Groups Projects
Commit a3f065e3 authored by Alessandro Rubini's avatar Alessandro Rubini
Browse files

sdbfs/lib: fix offset in returned devices when scanning


Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
parent 290089ef
No related merge requests found
......@@ -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;
}
......
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