def dent_node(ubifs, lnum, offset=0): """Get dir entry node at given LEB number + offset. Arguments: Obj:ubifs -- UBIFS object. Int:lnum -- LEB number dir entry node is in. Int:offset -- Offset in LEB of dir entry node. Returns: Obj:dent_node -- Dir entry node found at lnum/offset. """ ubifs.file.seek((ubifs.leb_size * lnum) + offset) den = nodes.dent_node(ubifs.file.read(UBIFS_DENT_NODE_SZ)) den.name = '%s' % ubifs.file.read(den.nlen) return den
def dent_node(ubifs, lnum, offset = 0): ubifs.file.seek(ubifs.leb_size * lnum + offset) den = nodes.dent_node(ubifs.file.read(UBIFS_DENT_NODE_SZ)) den.name = '%s' % ubifs.file.read(den.nlen) return den
def dent_node(ubifs, lnum, offset=0): ubifs.file.seek(ubifs.leb_size * lnum + offset) den = nodes.dent_node(ubifs.file.read(UBIFS_DENT_NODE_SZ)) den.name = "%s" % ubifs.file.read(den.nlen) return den