]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IORegistryEntry.cpp
xnu-6153.141.1.tar.gz
[apple/xnu.git] / iokit / Kernel / IORegistryEntry.cpp
index 45b3f42e6c25ba6892f7372f9a432577fb5c3d80..456f93729f4c5aea60f01b2a4d65afa47380d5dd 100644 (file)
@@ -664,6 +664,25 @@ runPropertyAction(Action inAction, OSObject *target,
        return res;
 }
 
+static IOReturn
+IORegistryEntryActionToBlock(OSObject *target,
+    void *arg0, void *arg1,
+    void *arg2, void *arg3)
+{
+       IORegistryEntry::ActionBlock block = (typeof(block))arg0;
+       return block();
+}
+
+IOReturn
+IORegistryEntry::runPropertyActionBlock(ActionBlock block)
+{
+       IOReturn res;
+
+       res = runPropertyAction(&IORegistryEntryActionToBlock, this, block);
+
+       return res;
+}
+
 OSObject *
 IORegistryEntry::getProperty( const OSString * aKey) const
 {