Exemplo n.º 1
0
def ino_node(ubifs, lnum, offset=0):
    """Get inode node at given LEB number + offset.

    Arguments:
    Obj:ubifs   -- UBIFS object.
    Int:lnum    -- LEB number inode node is in.
    Int:offset  -- Offset in LEB of inode node.

    Returns:
    Obj:ino_node    -- Inode node found at lnum/offset.
    """
    ubifs.file.seek((ubifs.leb_size * lnum) + offset)
    inon = nodes.ino_node(ubifs.file.read(UBIFS_INO_NODE_SZ))
    inon.data = ubifs.file.read(inon.data_len)
    return inon
Exemplo n.º 2
0
def ino_node(ubifs, lnum, offset=0):
    """Get inode node at given LEB number + offset.

    Arguments:
    Obj:ubifs   -- UBIFS object.
    Int:lnum    -- LEB number inode node is in.
    Int:offset  -- Offset in LEB of inode node.

    Returns:
    Obj:ino_node    -- Inode node found at lnum/offset.
    """
    ubifs.file.seek((ubifs.leb_size * lnum) + offset)
    inon = nodes.ino_node(ubifs.file.read(UBIFS_INO_NODE_SZ))
    inon.data = ubifs.file.read(inon.data_len)
    return inon
Exemplo n.º 3
0
def ino_node(ubifs, lnum, offset = 0):
    ubifs.file.seek(ubifs.leb_size * lnum + offset)
    inon = nodes.ino_node(ubifs.file.read(UBIFS_INO_NODE_SZ))
    inon.data = ubifs.file.read(inon.data_len)
    return inon
Exemplo n.º 4
0
def ino_node(ubifs, lnum, offset=0):
    ubifs.file.seek(ubifs.leb_size * lnum + offset)
    inon = nodes.ino_node(ubifs.file.read(UBIFS_INO_NODE_SZ))
    inon.data = ubifs.file.read(inon.data_len)
    return inon