Exemple #1
0
    def __same__(self, o):
        if not Node.__same__(self, o):
            return False

        # IRQ order is not significant
        if same_sets((i.id for i in self.irqs), (i.id for i in o.irqs)):
            return True
        return False
Exemple #2
0
    def __same__(self, o):
        if type(self) is not type(o):
            return False

        # Descriptions order is not significant
        if same_sets(self.descriptions, o.descriptions):
            return True
        return False
Exemple #3
0
    def __same__(self, o):
        if not Node.__same__(self, o):
            return False

        if not same(idon(self.parent_device), idon(o.parent_device)):
            return False

        for a in ("c_type", "cast", "child_name", "force_index"):
            if not same(getattr(self, a), getattr(o, a)):
                return False

        # device order is not significant
        if same_sets((d.id for d in self.devices), (d.id for d in o.devices)):
            return True
        return False
Exemple #4
0
    def __same__(self, o):
        if not Node.__same__(self, o):
            return False

        for a in ("name", "size", "offset", "may_overlap", "priority",
                  "alias_offset"):
            if not same(getattr(self, a), getattr(o, a)):
                return False

        if not same(idon(self.parent), idon(o.parent)):
            return False
        if not same(idon(self.alias_to), idon(o.alias_to)):
            return False

        # children order is not significant
        if same_sets((c.id for c in self.children),
                     (c.id for c in o.children)):
            return True
        return False
Exemple #5
0
    def __same__(self, o):
        if not Node.__same__(self, o):
            return False

        if not same(idon(self.parent_bus), idon(o.parent_bus)):
            return False

        if not same_attrs(self, o, "qom_type", "properties"):
            return False

        # order of buses is significant
        if not same_vectors((b.id for b in self.buses),
                            (b.id for b in o.buses)):
            return False

        # order of IRQs is not significant
        if same_sets((i.id for i in self.irqs), (i.id for i in o.irqs)):
            return True
        return False