Subversion Repositories HelenOS

Rev

Rev 3864 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3864 Rev 4638
Line 143... Line 143...
143
 
143
 
144
    return false;
144
    return false;
145
}
145
}
146
 
146
 
147
/**
147
/**
-
 
148
 * Returns the value of the string property of the given node.
-
 
149
 *
-
 
150
 * @param
-
 
151
 */
-
 
152
bool md_get_string_property(md_node_t node, const char *key,
-
 
153
    const char **result)
-
 
154
{
-
 
155
    md_header_t *md_header = (md_header_t *) mach_desc;
-
 
156
    element_idx_t idx = node;
-
 
157
 
-
 
158
    while (get_element(idx)->tag != NODE_END) {
-
 
159
        idx++;
-
 
160
        md_element_t *element = get_element(idx);
-
 
161
        if (element->tag == PROP_DATA &&
-
 
162
                strcmp(key, get_element_name(idx)) == 0) {
-
 
163
            *result = (char *) mach_desc + sizeof(md_header_t) +
-
 
164
                md_header->node_blk_sz + md_header->name_blk_sz +
-
 
165
                element->d.y.data_offset;
-
 
166
            return true;
-
 
167
        }
-
 
168
    }
-
 
169
 
-
 
170
    return false;
-
 
171
}
-
 
172
 
-
 
173
/**
148
 * Moves the child oterator to the next child (following sibling of the node
174
 * Moves the child oterator to the next child (following sibling of the node
149
 * the oterator currently points to).
175
 * the oterator currently points to).
150
 *
176
 *
151
 * @param it    pointer to the iterator to be moved
177
 * @param it    pointer to the iterator to be moved
152
 */
178
 */