.. | .. |
---|
13 | 13 | #define _COMPONENT ACPI_NAMESPACE |
---|
14 | 14 | ACPI_MODULE_NAME("nsnames") |
---|
15 | 15 | |
---|
16 | | -/* Local Prototypes */ |
---|
17 | | -static void acpi_ns_normalize_pathname(char *original_path); |
---|
18 | | - |
---|
19 | 16 | /******************************************************************************* |
---|
20 | 17 | * |
---|
21 | 18 | * FUNCTION: acpi_ns_get_external_pathname |
---|
.. | .. |
---|
30 | 27 | * for error and debug statements. |
---|
31 | 28 | * |
---|
32 | 29 | ******************************************************************************/ |
---|
33 | | - |
---|
34 | 30 | char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) |
---|
35 | 31 | { |
---|
36 | 32 | char *name_buffer; |
---|
.. | .. |
---|
108 | 104 | /* Just copy the ACPI name from the Node and zero terminate it */ |
---|
109 | 105 | |
---|
110 | 106 | node_name = acpi_ut_get_node_name(node); |
---|
111 | | - ACPI_MOVE_NAME(buffer->pointer, node_name); |
---|
112 | | - ((char *)buffer->pointer)[ACPI_NAME_SIZE] = 0; |
---|
| 107 | + ACPI_COPY_NAMESEG(buffer->pointer, node_name); |
---|
| 108 | + ((char *)buffer->pointer)[ACPI_NAMESEG_SIZE] = 0; |
---|
113 | 109 | |
---|
114 | 110 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%4.4s\n", (char *)buffer->pointer)); |
---|
115 | 111 | return_ACPI_STATUS(AE_OK); |
---|
.. | .. |
---|
164 | 160 | /* Build the path in the caller buffer */ |
---|
165 | 161 | |
---|
166 | 162 | (void)acpi_ns_build_normalized_path(node, buffer->pointer, |
---|
167 | | - required_size, no_trailing); |
---|
| 163 | + (u32)required_size, no_trailing); |
---|
168 | 164 | |
---|
169 | 165 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X]\n", |
---|
170 | 166 | (char *)buffer->pointer, (u32) required_size)); |
---|
.. | .. |
---|
198 | 194 | char *full_path, u32 path_size, u8 no_trailing) |
---|
199 | 195 | { |
---|
200 | 196 | u32 length = 0, i; |
---|
201 | | - char name[ACPI_NAME_SIZE]; |
---|
| 197 | + char name[ACPI_NAMESEG_SIZE]; |
---|
202 | 198 | u8 do_no_trailing; |
---|
203 | 199 | char c, *left, *right; |
---|
204 | 200 | struct acpi_namespace_node *next_node; |
---|
.. | .. |
---|
315 | 311 | |
---|
316 | 312 | /* Build the path in the allocated buffer */ |
---|
317 | 313 | |
---|
318 | | - (void)acpi_ns_build_normalized_path(node, name_buffer, size, |
---|
| 314 | + (void)acpi_ns_build_normalized_path(node, name_buffer, (u32)size, |
---|
319 | 315 | no_trailing); |
---|
320 | 316 | |
---|
321 | 317 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_NAMES, "%s: Path \"%s\"\n", |
---|
.. | .. |
---|
346 | 342 | char *full_path = NULL; |
---|
347 | 343 | char *external_path = NULL; |
---|
348 | 344 | char *prefix_path = NULL; |
---|
349 | | - u32 prefix_path_length = 0; |
---|
| 345 | + acpi_size prefix_path_length = 0; |
---|
350 | 346 | |
---|
351 | 347 | /* If there is a prefix, get the pathname to it */ |
---|
352 | 348 | |
---|
.. | .. |
---|
411 | 407 | * |
---|
412 | 408 | ******************************************************************************/ |
---|
413 | 409 | |
---|
414 | | -static void acpi_ns_normalize_pathname(char *original_path) |
---|
| 410 | +void acpi_ns_normalize_pathname(char *original_path) |
---|
415 | 411 | { |
---|
416 | 412 | char *input_path = original_path; |
---|
417 | 413 | char *new_path_buffer; |
---|
.. | .. |
---|
446 | 442 | |
---|
447 | 443 | /* Do one nameseg at a time */ |
---|
448 | 444 | |
---|
449 | | - for (i = 0; (i < ACPI_NAME_SIZE) && *input_path; i++) { |
---|
| 445 | + for (i = 0; (i < ACPI_NAMESEG_SIZE) && *input_path; i++) { |
---|
450 | 446 | if ((i == 0) || (*input_path != '_')) { /* First char is allowed to be underscore */ |
---|
451 | 447 | *new_path = *input_path; |
---|
452 | 448 | new_path++; |
---|