nsxfname.c (197104) | nsxfname.c (200553) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: nsxfname - Public interfaces to the ACPI subsystem 4 * ACPI Namespace oriented interfaces 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** --- 164 unchanged lines hidden (view full) --- 173 { 174 return (AE_BAD_PARAMETER); 175 } 176 177 /* Convert a parent handle to a prefix node */ 178 179 if (Parent) 180 { | 1/****************************************************************************** 2 * 3 * Module Name: nsxfname - Public interfaces to the ACPI subsystem 4 * ACPI Namespace oriented interfaces 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** --- 164 unchanged lines hidden (view full) --- 173 { 174 return (AE_BAD_PARAMETER); 175 } 176 177 /* Convert a parent handle to a prefix node */ 178 179 if (Parent) 180 { |
181 PrefixNode = AcpiNsMapHandleToNode (Parent); | 181 PrefixNode = AcpiNsValidateHandle (Parent); |
182 if (!PrefixNode) 183 { 184 return (AE_BAD_PARAMETER); 185 } 186 } 187 188 /* 189 * Valid cases are: --- 5 unchanged lines hidden (view full) --- 195 if (AcpiNsValidRootPrefix (Pathname[0])) 196 { 197 /* Pathname is fully qualified (starts with '\') */ 198 199 /* Special case for root-only, since we can't search for it */ 200 201 if (!ACPI_STRCMP (Pathname, ACPI_NS_ROOT_PATH)) 202 { | 182 if (!PrefixNode) 183 { 184 return (AE_BAD_PARAMETER); 185 } 186 } 187 188 /* 189 * Valid cases are: --- 5 unchanged lines hidden (view full) --- 195 if (AcpiNsValidRootPrefix (Pathname[0])) 196 { 197 /* Pathname is fully qualified (starts with '\') */ 198 199 /* Special case for root-only, since we can't search for it */ 200 201 if (!ACPI_STRCMP (Pathname, ACPI_NS_ROOT_PATH)) 202 { |
203 *RetHandle = AcpiNsConvertEntryToHandle (AcpiGbl_RootNode); | 203 *RetHandle = ACPI_CAST_PTR (ACPI_HANDLE, AcpiGbl_RootNode); |
204 return (AE_OK); 205 } 206 } 207 else if (!PrefixNode) 208 { 209 /* Relative path with null prefix is disallowed */ 210 211 return (AE_BAD_PARAMETER); 212 } 213 214 /* Find the Node and convert to a handle */ 215 216 Status = AcpiNsGetNode (PrefixNode, Pathname, ACPI_NS_NO_UPSEARCH, &Node); 217 if (ACPI_SUCCESS (Status)) 218 { | 204 return (AE_OK); 205 } 206 } 207 else if (!PrefixNode) 208 { 209 /* Relative path with null prefix is disallowed */ 210 211 return (AE_BAD_PARAMETER); 212 } 213 214 /* Find the Node and convert to a handle */ 215 216 Status = AcpiNsGetNode (PrefixNode, Pathname, ACPI_NS_NO_UPSEARCH, &Node); 217 if (ACPI_SUCCESS (Status)) 218 { |
219 *RetHandle = AcpiNsConvertEntryToHandle (Node); | 219 *RetHandle = ACPI_CAST_PTR (ACPI_HANDLE, Node); |
220 } 221 222 return (Status); 223} 224 225ACPI_EXPORT_SYMBOL (AcpiGetHandle) 226 227 --- 49 unchanged lines hidden (view full) --- 277 * Validate handle and convert to a namespace Node 278 */ 279 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 280 if (ACPI_FAILURE (Status)) 281 { 282 return (Status); 283 } 284 | 220 } 221 222 return (Status); 223} 224 225ACPI_EXPORT_SYMBOL (AcpiGetHandle) 226 227 --- 49 unchanged lines hidden (view full) --- 277 * Validate handle and convert to a namespace Node 278 */ 279 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 280 if (ACPI_FAILURE (Status)) 281 { 282 return (Status); 283 } 284 |
285 Node = AcpiNsMapHandleToNode (Handle); | 285 Node = AcpiNsValidateHandle (Handle); |
286 if (!Node) 287 { 288 Status = AE_BAD_PARAMETER; 289 goto UnlockAndExit; 290 } 291 292 /* Validate/Allocate/Clear caller buffer */ 293 --- 100 unchanged lines hidden (view full) --- 394 } 395 396 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 397 if (ACPI_FAILURE (Status)) 398 { 399 goto Cleanup; 400 } 401 | 286 if (!Node) 287 { 288 Status = AE_BAD_PARAMETER; 289 goto UnlockAndExit; 290 } 291 292 /* Validate/Allocate/Clear caller buffer */ 293 --- 100 unchanged lines hidden (view full) --- 394 } 395 396 Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 397 if (ACPI_FAILURE (Status)) 398 { 399 goto Cleanup; 400 } 401 |
402 Node = AcpiNsMapHandleToNode (Handle); | 402 Node = AcpiNsValidateHandle (Handle); |
403 if (!Node) 404 { 405 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); 406 return (AE_BAD_PARAMETER); 407 } 408 409 /* Get the namespace node data while the namespace is locked */ 410 --- 366 unchanged lines hidden --- | 403 if (!Node) 404 { 405 (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); 406 return (AE_BAD_PARAMETER); 407 } 408 409 /* Get the namespace node data while the namespace is locked */ 410 --- 366 unchanged lines hidden --- |