这篇教程C++ AcpiNsHandleToPathname函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AcpiNsHandleToPathname函数的典型用法代码示例。如果您正苦于以下问题:C++ AcpiNsHandleToPathname函数的具体用法?C++ AcpiNsHandleToPathname怎么用?C++ AcpiNsHandleToPathname使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AcpiNsHandleToPathname函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ns_handle_to_pathnamestatus_tns_handle_to_pathname(acpi_handle targetHandle, acpi_data *buffer){ status_t status = AcpiNsHandleToPathname(targetHandle, (ACPI_BUFFER*)buffer, false); return status == AE_OK ? B_OK : B_ERROR;}
开发者ID:simonsouth,项目名称:haiku,代码行数:7,
示例2: AcpiNsDumpPathnameACPI_STATUSAcpiNsDumpPathname ( ACPI_HANDLE Handle, NATIVE_CHAR *Msg, UINT32 Level, UINT32 Component){ ACPI_BUFFER Buffer; ACPI_STATUS Status; ACPI_FUNCTION_TRACE ("NsDumpPathname"); /* Do this only if the requested debug level and component are enabled */ if (!(AcpiDbgLevel & Level) || !(AcpiDbgLayer & Component)) { return_ACPI_STATUS (AE_OK); } /* Convert handle to a full pathname and print it (with supplied message) */ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (Handle, &Buffer); if (ACPI_SUCCESS (Status)) { AcpiOsPrintf ("%s %s (Node %p)/n", Msg, (char *) Buffer.Pointer, Handle); ACPI_MEM_FREE (Buffer.Pointer); } return_ACPI_STATUS (Status);}
开发者ID:UnitedMarsupials,项目名称:kame,代码行数:34,
示例3: AcpiNsPrintNodePathnamevoidAcpiNsPrintNodePathname ( ACPI_NAMESPACE_NODE *Node, const char *Message){ ACPI_BUFFER Buffer; ACPI_STATUS Status; if (!Node) { AcpiOsPrintf ("[NULL NAME]"); return; } /* Convert handle to full pathname and print it (with supplied message) */ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (Node, &Buffer, TRUE); if (ACPI_SUCCESS (Status)) { if (Message) { AcpiOsPrintf ("%s ", Message); } AcpiOsPrintf ("%s", (char *) Buffer.Pointer); ACPI_FREE (Buffer.Pointer); }}
开发者ID:ariscop,项目名称:reactos,代码行数:31,
示例4: AcpiDbWalkForSpecificObjectsstatic ACPI_STATUSAcpiDbWalkForSpecificObjects ( ACPI_HANDLE ObjHandle, UINT32 NestingLevel, void *Context, void **ReturnValue){ ACPI_WALK_INFO *Info = (ACPI_WALK_INFO *) Context; ACPI_BUFFER Buffer; ACPI_STATUS Status; Info->Count++; /* Get and display the full pathname to this object */ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, FALSE); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could Not get pathname for object %p/n", ObjHandle); return (AE_OK); } AcpiOsPrintf ("%32s", (char *) Buffer.Pointer); ACPI_FREE (Buffer.Pointer); /* Dump short info about the object */ (void) AcpiNsDumpOneObject (ObjHandle, NestingLevel, Info, NULL); return (AE_OK);}
开发者ID:fsheikh,项目名称:acpica,代码行数:32,
示例5: AcpiUtDisplayInitPathnamevoidAcpiUtDisplayInitPathname ( ACPI_HANDLE ObjHandle, char *Path){ ACPI_STATUS Status; UINT32 Length = 128; char Buffer[128]; PROC_NAME ("UtDisplayInitPathname"); Status = AcpiNsHandleToPathname (ObjHandle, &Length, Buffer); if (ACPI_SUCCESS (Status)) { if (Path) { ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "%s.%s/n", Buffer, Path)); } else { ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "%s/n", Buffer)); } }}
开发者ID:MarginC,项目名称:kame,代码行数:26,
示例6: AcpiUtDisplayInitPathnamevoidAcpiUtDisplayInitPathname ( UINT8 Type, ACPI_NAMESPACE_NODE *ObjHandle, char *Path){ ACPI_STATUS Status; ACPI_BUFFER Buffer; ACPI_FUNCTION_ENTRY (); /* Only print the path if the appropriate debug level is enabled */ if (!(AcpiDbgLevel & ACPI_LV_INIT_NAMES)) { return; } /* Get the full pathname to the node */ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (ObjHandle, &Buffer); if (ACPI_FAILURE (Status)) { return; } /* Print what we're doing */ switch (Type) { case ACPI_TYPE_METHOD: AcpiOsPrintf ("Executing "); break; default: AcpiOsPrintf ("Initializing "); break; } /* Print the object type and pathname */ AcpiOsPrintf ("%-12s %s", AcpiUtGetTypeName (Type), (char *) Buffer.Pointer); /* Extra path is used to append names like _STA, _INI, etc. */ if (Path) { AcpiOsPrintf (".%s", Path); } AcpiOsPrintf ("/n"); ACPI_FREE (Buffer.Pointer);}
开发者ID:zenny,项目名称:DragonFlyBSD,代码行数:59,
示例7: globalGPEHandlerstatic voidglobalGPEHandler(UINT32 eventType, ACPI_HANDLE device, UINT32 eventNumber, void* context){ ACPI_BUFFER path; char deviceName[256]; path.Length = sizeof(deviceName); path.Pointer = deviceName; ACPI_STATUS status = AcpiNsHandleToPathname(device, &path); if (ACPI_FAILURE(status)) strcpy(deviceName, "(missing)"); switch (eventType) { case ACPI_EVENT_TYPE_GPE: dprintf("acpi: GPE Event %d for %s/n", eventNumber, deviceName); break; case ACPI_EVENT_TYPE_FIXED: { switch (eventNumber) { case ACPI_EVENT_PMTIMER: dprintf("acpi: PMTIMER(%d) event for %s/n", eventNumber, deviceName); break; case ACPI_EVENT_GLOBAL: dprintf("acpi: Global(%d) event for %s/n", eventNumber, deviceName); break; case ACPI_EVENT_POWER_BUTTON: dprintf("acpi: Powerbutton(%d) event for %s/n", eventNumber, deviceName); break; case ACPI_EVENT_SLEEP_BUTTON: dprintf("acpi: sleepbutton(%d) event for %s/n", eventNumber, deviceName); break; case ACPI_EVENT_RTC: dprintf("acpi: RTC(%d) event for %s/n", eventNumber, deviceName); break; default: dprintf("acpi: unknown fixed(%d) event for %s/n", eventNumber, deviceName); } break; } default: dprintf("acpi: unknown event type (%d:%d) event for %s/n", eventType, eventNumber, deviceName); }}
开发者ID:simonsouth,项目名称:haiku,代码行数:58,
示例8: AcpiDbWalkAndMatchNamestatic ACPI_STATUSAcpiDbWalkAndMatchName ( ACPI_HANDLE ObjHandle, UINT32 NestingLevel, void *Context, void **ReturnValue){ ACPI_STATUS Status; char *RequestedName = (char *) Context; UINT32 i; ACPI_BUFFER Buffer; ACPI_WALK_INFO Info; /* Check for a name match */ for (i = 0; i < 4; i++) { /* Wildcard support */ if ((RequestedName[i] != '?') && (RequestedName[i] != ((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Ascii[i])) { /* No match, just exit */ return (AE_OK); } } /* Get the full pathname to this object */ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could Not get pathname for object %p/n", ObjHandle); } else { Info.Count = 0; Info.OwnerId = ACPI_OWNER_ID_MAX; Info.DebugLevel = ACPI_UINT32_MAX; Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT; AcpiOsPrintf ("%32s", (char *) Buffer.Pointer); (void) AcpiNsDumpOneObject (ObjHandle, NestingLevel, &Info, NULL); ACPI_FREE (Buffer.Pointer); } return (AE_OK);}
开发者ID:kusumi,项目名称:DragonFlyBSD,代码行数:53,
示例9: globalNotifyHandlerstatic void globalNotifyHandler(ACPI_HANDLE device, UINT32 value, void* context){ ACPI_BUFFER path; char deviceName[256]; path.Length = sizeof(deviceName); path.Pointer = deviceName; ACPI_STATUS status = AcpiNsHandleToPathname(device, &path); if (ACPI_FAILURE(status)) strcpy(deviceName, "(missing)"); dprintf("acpi: Notify event %d for %s/n", value, deviceName);}
开发者ID:simonsouth,项目名称:haiku,代码行数:13,
示例10: LsEmitOffsetTableEntrystatic voidLsEmitOffsetTableEntry ( UINT32 FileId, ACPI_NAMESPACE_NODE *Node, UINT32 NamepathOffset, UINT32 Offset, char *OpName, UINT64 Value, UINT8 AmlOpcode, UINT16 ParentOpcode){ ACPI_BUFFER TargetPath; ACPI_STATUS Status; /* Get the full pathname to the namespace node */ TargetPath.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (Node, &TargetPath, FALSE); if (ACPI_FAILURE (Status)) { return; } /* [1] - Skip the opening backslash for the path */ strcpy (MsgBuffer, "/""); strcat (MsgBuffer, &((char *) TargetPath.Pointer)[1]); strcat (MsgBuffer, "/","); ACPI_FREE (TargetPath.Pointer); /* * Max offset is 4G, constrained by 32-bit ACPI table length. * Max Length for Integers is 8 bytes. */ FlPrintFile (FileId, " {%-29s 0x%4.4X, 0x%8.8X, 0x%2.2X, 0x%8.8X, 0x%8.8X%8.8X}, /* %s *//n", MsgBuffer, ParentOpcode, NamepathOffset, AmlOpcode, Offset, ACPI_FORMAT_UINT64 (Value), OpName);}
开发者ID:2asoft,项目名称:freebsd,代码行数:40,
示例11: AcpiNsDumpPathnameACPI_STATUSAcpiNsDumpPathname ( ACPI_HANDLE Handle, NATIVE_CHAR *Msg, UINT32 Level, UINT32 Component){ NATIVE_CHAR *Buffer; UINT32 Length; FUNCTION_TRACE ("NsDumpPathname"); /* Do this only if the requested debug level and component are enabled */ if (!(AcpiDbgLevel & Level) || !(AcpiDbgLayer & Component)) { return_ACPI_STATUS (AE_OK); } Buffer = ACPI_MEM_ALLOCATE (PATHNAME_MAX); if (!Buffer) { return_ACPI_STATUS (AE_NO_MEMORY); } /* Convert handle to a full pathname and print it (with supplied message) */ Length = PATHNAME_MAX; if (ACPI_SUCCESS (AcpiNsHandleToPathname (Handle, &Length, Buffer))) { AcpiOsPrintf ("%s %s (%p)/n", Msg, Buffer, Handle); } ACPI_MEM_FREE (Buffer); return_ACPI_STATUS (AE_OK);}
开发者ID:MarginC,项目名称:kame,代码行数:39,
示例12: NsDoOnePathnamestatic ACPI_STATUSNsDoOnePathname ( ACPI_HANDLE ObjHandle, UINT32 Level, void *Context, void **ReturnValue){ ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; ACPI_STATUS Status; ACPI_BUFFER TargetPath; TargetPath.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (Node, &TargetPath, FALSE); if (ACPI_FAILURE (Status)) { return (Status); } FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%s/n", TargetPath.Pointer); ACPI_FREE (TargetPath.Pointer); return (AE_OK);}
开发者ID:ColinIanKing,项目名称:fwts,代码行数:23,
示例13: AcpiDbBusWalkstatic ACPI_STATUSAcpiDbBusWalk ( ACPI_HANDLE ObjHandle, UINT32 NestingLevel, void *Context, void **ReturnValue){ ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; ACPI_STATUS Status; ACPI_BUFFER Buffer; ACPI_NAMESPACE_NODE *TempNode; ACPI_DEVICE_INFO *Info; UINT32 i; if ((Node->Type != ACPI_TYPE_DEVICE) && (Node->Type != ACPI_TYPE_PROCESSOR)) { return (AE_OK); } /* Exit if there is no _PRT under this device */ Status = AcpiGetHandle (Node, METHOD_NAME__PRT, ACPI_CAST_PTR (ACPI_HANDLE, &TempNode)); if (ACPI_FAILURE (Status)) { return (AE_OK); } /* Get the full path to this device object */ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, FALSE); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could Not get pathname for object %p/n", ObjHandle); return (AE_OK); } Status = AcpiGetObjectInfo (ObjHandle, &Info); if (ACPI_FAILURE (Status)) { return (AE_OK); } /* Display the full path */ AcpiOsPrintf ("%-32s Type %X", (char *) Buffer.Pointer, Node->Type); ACPI_FREE (Buffer.Pointer); if (Info->Flags & ACPI_PCI_ROOT_BRIDGE) { AcpiOsPrintf (" - Is PCI Root Bridge"); } AcpiOsPrintf ("/n"); /* _PRT info */ AcpiOsPrintf ("_PRT: %p/n", TempNode); /* Dump _ADR, _HID, _UID, _CID */ if (Info->Valid & ACPI_VALID_ADR) { AcpiOsPrintf ("_ADR: %8.8X%8.8X/n", ACPI_FORMAT_UINT64 (Info->Address)); } else { AcpiOsPrintf ("_ADR: <Not Present>/n"); } if (Info->Valid & ACPI_VALID_HID) { AcpiOsPrintf ("_HID: %s/n", Info->HardwareId.String); } else { AcpiOsPrintf ("_HID: <Not Present>/n"); } if (Info->Valid & ACPI_VALID_UID) { AcpiOsPrintf ("_UID: %s/n", Info->UniqueId.String); } else { AcpiOsPrintf ("_UID: <Not Present>/n"); } if (Info->Valid & ACPI_VALID_CID) { for (i = 0; i < Info->CompatibleIdList.Count; i++) { AcpiOsPrintf ("_CID: %s/n", Info->CompatibleIdList.Ids[i].String); } } else {//.........这里部分代码省略.........
开发者ID:fsheikh,项目名称:acpica,代码行数:101,
示例14: AcpiGetNameACPI_STATUSAcpiGetName ( ACPI_HANDLE Handle, UINT32 NameType, ACPI_BUFFER *RetPathPtr){ ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node; /* Ensure that ACPI has been initialized */ ACPI_IS_INITIALIZATION_COMPLETE (Status); if (ACPI_FAILURE (Status)) { return (Status); } /* Buffer pointer must be valid always */ if (!RetPathPtr || (NameType > ACPI_NAME_TYPE_MAX)) { return (AE_BAD_PARAMETER); } /* Allow length to be zero and ignore the pointer */ if ((RetPathPtr->Length) && (!RetPathPtr->Pointer)) { return (AE_BAD_PARAMETER); } if (NameType == ACPI_FULL_PATHNAME) { /* Get the full pathname (From the namespace root) */ Status = AcpiNsHandleToPathname (Handle, &RetPathPtr->Length, RetPathPtr->Pointer); return (Status); } /* * Wants the single segment ACPI name. * Validate handle and convert to an Node */ AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); Node = AcpiNsConvertHandleToEntry (Handle); if (!Node) { Status = AE_BAD_PARAMETER; goto UnlockAndExit; } /* Check if name will fit in buffer */ if (RetPathPtr->Length < PATH_SEGMENT_LENGTH) { RetPathPtr->Length = PATH_SEGMENT_LENGTH; Status = AE_BUFFER_OVERFLOW; goto UnlockAndExit; } /* Just copy the ACPI name from the Node and zero terminate it */ STRNCPY (RetPathPtr->Pointer, (NATIVE_CHAR *) &Node->Name, ACPI_NAME_SIZE); ((NATIVE_CHAR *) RetPathPtr->Pointer) [ACPI_NAME_SIZE] = 0; Status = AE_OK;UnlockAndExit: AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return (Status);}
开发者ID:MarginC,项目名称:kame,代码行数:76,
示例15: AcpiPsDisplayObjectPathnameACPI_STATUSAcpiPsDisplayObjectPathname ( ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op){ ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node; ACPI_BUFFER Buffer; UINT32 DebugLevel; /* Save current debug level so we don't get extraneous debug output */ DebugLevel = AcpiDbgLevel; AcpiDbgLevel = 0; /* Just get the Node out of the Op object */ Node = Op->Common.Node; if (!Node) { /* Node not defined in this scope, look it up */ Status = AcpiNsLookup (WalkState->ScopeInfo, Op->Common.Value.String, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState, &(Node)); if (ACPI_FAILURE (Status)) { /* * We can't get the pathname since the object * is not in the namespace. This can happen during single * stepping where a dynamic named object is *about* to be created. */ AcpiOsPrintf (" [Path not found]"); goto Exit; } /* Save it for next time. */ Op->Common.Node = Node; } /* Convert NamedDesc/handle to a full pathname */ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (Node, &Buffer); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("****Could not get pathname****)"); goto Exit; } AcpiOsPrintf (" (Path %s)", (char *) Buffer.Pointer); ACPI_FREE (Buffer.Pointer);Exit: /* Restore the debug level */ AcpiDbgLevel = DebugLevel; return (Status);}
开发者ID:coyizumi,项目名称:cs111,代码行数:63,
示例16: OptOptimizeNamePath//.........这里部分代码省略......... * The node of interest is the parent of this node (the containing * scope). The actual namespace node may be up more than one level * of parse op or it may not exist at all (if we traverse back * up to the root.) */ NextOp = Op->Asl.Parent; while (NextOp && (!NextOp->Asl.Node)) { NextOp = NextOp->Asl.Parent; } if (NextOp && NextOp->Asl.Node) { CurrentNode = NextOp->Asl.Node; } else { CurrentNode = AcpiGbl_RootNode; } } else { /* This is a reference to an existing named object */ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, "REFERENCE/n")); } /* * Obtain the full paths to the two nodes that we are interested in * (Target and current namespace location) in external * format -- something we can easily manipulate */ TargetPath.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (TargetNode, &TargetPath, FALSE); if (ACPI_FAILURE (Status)) { AslCoreSubsystemError (Op, Status, "Getting Target NamePath", ASL_NO_ABORT); return_VOID; } TargetPath.Length--; /* Subtract one for null terminator */ /* CurrentPath is the path to this scope (where we are in the namespace) */ CurrentPath.Length = ACPI_ALLOCATE_LOCAL_BUFFER; Status = AcpiNsHandleToPathname (CurrentNode, &CurrentPath, FALSE); if (ACPI_FAILURE (Status)) { AslCoreSubsystemError (Op, Status, "Getting Current NamePath", ASL_NO_ABORT); return_VOID; } CurrentPath.Length--; /* Subtract one for null terminator */ /* Debug output only */ Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, AmlNameString, NULL, &ExternalNameString); if (ACPI_FAILURE (Status)) { AslCoreSubsystemError (Op, Status, "Externalizing NamePath", ASL_NO_ABORT); return_VOID; }
开发者ID:cailianchun,项目名称:acpica,代码行数:67,
示例17: AcpiRsCreatePciRoutingTable//.........这里部分代码省略......... ACPI_WARNING ((AE_INFO, "(PRT[%X].Source) SourceName and SourceIndex are reversed, fixed", Index)); } /* * 3) Third subobject: Dereference the PRT.SourceName * The name may be unresolved (slack mode), so allow a null object */ ObjDesc = SubObjectList[2]; if (ObjDesc) { switch (ObjDesc->Common.Type) { case ACPI_TYPE_LOCAL_REFERENCE: if (ObjDesc->Reference.Class != ACPI_REFCLASS_NAME) { ACPI_ERROR ((AE_INFO, "(PRT[%u].Source) Need name, found Reference Class 0x%X", Index, ObjDesc->Reference.Class)); return_ACPI_STATUS (AE_BAD_DATA); } Node = ObjDesc->Reference.Node; /* Use *remaining* length of the buffer as max for pathname */ PathBuffer.Length = OutputBuffer->Length - (UINT32) ((UINT8 *) UserPrt->Source - (UINT8 *) OutputBuffer->Pointer); PathBuffer.Pointer = UserPrt->Source; Status = AcpiNsHandleToPathname ((ACPI_HANDLE) Node, &PathBuffer); /* +1 to include null terminator */ UserPrt->Length += (UINT32) ACPI_STRLEN (UserPrt->Source) + 1; break; case ACPI_TYPE_STRING: ACPI_STRCPY (UserPrt->Source, ObjDesc->String.Pointer); /* * Add to the Length field the length of the string * (add 1 for terminator) */ UserPrt->Length += ObjDesc->String.Length + 1; break; case ACPI_TYPE_INTEGER: /* * If this is a number, then the Source Name is NULL, since the * entire buffer was zeroed out, we can leave this alone. * * Add to the Length field the length of the UINT32 NULL */ UserPrt->Length += sizeof (UINT32); break; default: ACPI_ERROR ((AE_INFO, "(PRT[%u].Source) Need Ref/String/Integer, found %s", Index, AcpiUtGetObjectTypeName (ObjDesc))); return_ACPI_STATUS (AE_BAD_DATA); } } /* Now align the current length */ UserPrt->Length = (UINT32) ACPI_ROUND_UP_TO_64BIT (UserPrt->Length); /* 4) Fourth subobject: Dereference the PRT.SourceIndex */ ObjDesc = SubObjectList[3]; if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) { ACPI_ERROR ((AE_INFO, "(PRT[%u].SourceIndex) Need Integer, found %s", Index, AcpiUtGetObjectTypeName (ObjDesc))); return_ACPI_STATUS (AE_BAD_DATA); } UserPrt->SourceIndex = (UINT32) ObjDesc->Integer.Value; /* Point to the next ACPI_OPERAND_OBJECT in the top level package */ TopObjectList++; } ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "OutputBuffer %p Length %X/n", OutputBuffer->Pointer, (UINT32) OutputBuffer->Length)); return_ACPI_STATUS (AE_OK);}
开发者ID:libkeiser,项目名称:illumos-nexenta,代码行数:101,
示例18: AcpiGetNameACPI_STATUSAcpiGetName ( ACPI_HANDLE Handle, UINT32 NameType, ACPI_BUFFER *Buffer){ ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node; /* Parameter validation */ if (NameType > ACPI_NAME_TYPE_MAX) { return (AE_BAD_PARAMETER); } Status = AcpiUtValidateBuffer (Buffer); if (ACPI_FAILURE (Status)) { return (Status); } if (NameType == ACPI_FULL_PATHNAME) { /* Get the full pathname (From the namespace root) */ Status = AcpiNsHandleToPathname (Handle, Buffer); return (Status); } /* * Wants the single segment ACPI name. * Validate handle and convert to a namespace Node */ Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); if (ACPI_FAILURE (Status)) { return (Status); } Node = AcpiNsMapHandleToNode (Handle); if (!Node) { Status = AE_BAD_PARAMETER; goto UnlockAndExit; } /* Validate/Allocate/Clear caller buffer */ Status = AcpiUtInitializeBuffer (Buffer, ACPI_PATH_SEGMENT_LENGTH); if (ACPI_FAILURE (Status)) { goto UnlockAndExit; } /* Just copy the ACPI name from the Node and zero terminate it */ ACPI_STRNCPY (Buffer->Pointer, AcpiUtGetNodeName (Node), ACPI_NAME_SIZE); ((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0; Status = AE_OK;UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return (Status);}
开发者ID:samueldotj,项目名称:AceOS,代码行数:69,
注:本文中的AcpiNsHandleToPathname函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AcpiNsLookup函数代码示例 C++ AcpiNsGetType函数代码示例 |