summaryrefslogtreecommitdiffstats
path: root/filter-x86_64.sh
diff options
context:
space:
mode:
Diffstat (limited to 'filter-x86_64.sh')
-rw-r--r--filter-x86_64.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/filter-x86_64.sh b/filter-x86_64.sh
new file mode 100644
index 000000000..2a0b2d7b0
--- /dev/null
+++ b/filter-x86_64.sh
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+# This is the x86_64 override file for the core/drivers package split. The
+# module directories listed here and in the generic list in filter-modules.sh
+# will be moved to the resulting kernel-drivers package for this arch.
+# Anything not listed in those files will be in the kernel-core package.
+#
+# Please review the default list in filter-modules.sh before making
+# modifications to the overrides below. If something should be removed across
+# all arches, remove it in the default instead of per-arch.
+
+# Defaults work so no need to override
esenting command context""" def __init__(self, initial=None, parent=None, **kwargs): super(CommandContextBase, self).__init__(initial=initial, **kwargs) if parent is not None: self._parent = parent @property def anabasis(self): """Traverse nested contexts hierarchy upwards""" cur = self while True: yield cur if cur is cur._parent: break cur = cur._parent @property def parent(self): return self._parent def __setitem__(self, key, value): # XXX value could be also any valid dict constructor argument if any(getattr(p, '_notaint', False) for p in self.anabasis): raise RuntimeError("Cannot set item in notaint context") self._dict[key] = CommandContextBase(initial=value, parent=self) \ if isinstanceexcept(value, MutableMapping, CommandContextBase) \ else value class CommandContext(CommandContextBase): class notaint_context(CommandContextBase.notaint_context): def __init__(self, self_outer, exit_off): super(self.__class__, self).__init__(self_outer, exit_off) self._fc = self_outer['__filter_context__'] \ .prevented_taint(exit_off) def __enter__(self): super(self.__class__, self).__enter__() self._fc.__enter__() def __exit__(self, *exc): self._fc.__exit__() super(self.__class__, self).__exit__() def __init__(self, *args, **kwargs): # filter_context ... where global arguments for filters to be stored # filters ... where filter instance + arguments hybrid is stored super(CommandContext, self).__init__(*args, **kwargs) # could be cycle up to self if not bypassed self['__filter_context__'] = {} # here we actually want a fallback self['__filters__'] = CommandContextBase() @staticmethod def _wrapping_nested_context(obj): class wrapped(CommandContextBase): def __getattribute__(self, name): if name == 'ctxt_wrapped': ret = obj elif name == 'ctxt_set': ret = lambda self, **kwargs: self.update(kwargs) elif name.startswith('ctxt_'): # by convention, ctxt_* methods are using second # argument to pass the respective (nested) context ret = obj.__getattribute__(name) if callable(ret): ret = \ lambda *args, **kwargs: \ obj.__getattribute__(name)(self, *args, **kwargs) else: try: if name.startswith('_'): raise KeyError # dot=index access not for internals ret = self.__getitem__(name) except KeyError: try: ret = super(wrapped, self).__getattribute__(name) except AttributeError: ret = obj.__getattribute__(name) return ret def __setattribute__(self, name, value): obj.__setattribute__(name, value) return wrapped def ensure_filter(self, flt):