diff --git a/sdbfs/lib/glue.c b/sdbfs/lib/glue.c index ff06986c211899121de02eaab6261009871f503d..e268f8fd51af7d03fe08d4d33bc72dcd10155ea4 100644 --- a/sdbfs/lib/glue.c +++ b/sdbfs/lib/glue.c @@ -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; }