Changeset 0832b4d in mainline


Ignore:
Timestamp:
2009-01-16T16:14:27Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8ea0308
Parents:
6cd3e8a
Message:

OpenBIOS's nextprop is more sensitive than the OBP version.
Use two char arrays instead of one when determining the number of node's
properties.

—This line,
and those below, will be ignored—

M genarch/ofw_tree.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/genarch/ofw_tree.c

    r6cd3e8a r0832b4d  
    8383        static char path[MAX_PATH_LEN+1];
    8484        static char name[OFW_TREE_PROPERTY_MAX_NAMELEN];
     85        static char name2[OFW_TREE_PROPERTY_MAX_NAMELEN];
    8586        phandle peer;
    8687        phandle child;
     
    140141                 */
    141142                name[0] = '\0';
    142                 while (ofw_next_property(current, name, name) == 1)
     143                while (ofw_next_property(current, name, name2) == 1) {
    143144                        current_node->properties++;
    144        
     145                        memcpy(name, name2, OFW_TREE_PROPERTY_MAX_NAMELEN);
     146                }
     147
    145148                if (!current_node->properties)
    146149                        return;
     
    154157               
    155158                name[0] = '\0';
    156                 for (i = 0; ofw_next_property(current, name, name) == 1; i++) {
     159                for (i = 0; ofw_next_property(current, name, name2) == 1; i++) {
    157160                        size_t size;
    158161               
     
    160163                                break;
    161164               
     165                        memcpy(name, name2, OFW_TREE_PROPERTY_MAX_NAMELEN);
    162166                        memcpy(current_node->property[i].name, name,
    163167                                OFW_TREE_PROPERTY_MAX_NAMELEN);
Note: See TracChangeset for help on using the changeset viewer.