def __init__(self, buf): fields = dict(zip(UBIFS_DENT_NODE_FIELDS, struct.unpack(UBIFS_DENT_NODE_FORMAT,buf))) for key in fields: if key == 'key': setattr(self, key, parse_key(fields[key])) else: setattr(self, key, fields[key]) setattr(self, 'name', '')
def __init__(self, buf): fields = dict(zip(UBIFS_DENT_NODE_FIELDS, struct.unpack(UBIFS_DENT_NODE_FORMAT, buf))) for key in fields: if key == 'key': setattr(self, key, parse_key(fields[key])) else: setattr(self, key, fields[key]) setattr(self, 'name', '')
def __init__(self, buf): fields = dict(zip(UBIFS_DATA_NODE_FIELDS, struct.unpack(UBIFS_DATA_NODE_FORMAT,buf))) for key in fields: if key == 'key': setattr(self, key, parse_key(fields[key])) else: setattr(self, key, fields[key]) setattr(self, 'offset', 0) setattr(self, 'compr_len', 0)
def __init__(self, buf): fields = dict(zip(UBIFS_DATA_NODE_FIELDS, struct.unpack(UBIFS_DATA_NODE_FORMAT, buf))) for key in fields: if key == 'key': setattr(self, key, parse_key(fields[key])) else: setattr(self, key, fields[key]) setattr(self, 'offset', 0) setattr(self, 'compr_len', 0)