On sparc32 the prom_{first,next}prop() interfaces work
a little differently. The buffer argument is ignored on
sparc32 and the firmware just returns a raw pointer to
the property name.
Signed-off-by: David S. Miller <davem@davemloft.net>
static struct property *tmp = NULL;
struct property *p;
int len;
static struct property *tmp = NULL;
struct property *p;
int len;
p->name = (char *) (p + 1);
if (special_name) {
p->name = (char *) (p + 1);
if (special_name) {
+ strcpy(p->name, special_name);
p->length = special_len;
p->value = prom_early_alloc(special_len);
memcpy(p->value, special_val, special_len);
} else {
if (prev == NULL) {
p->length = special_len;
p->value = prom_early_alloc(special_len);
memcpy(p->value, special_val, special_len);
} else {
if (prev == NULL) {
- prom_firstprop(node, p->name);
+ name = prom_firstprop(node, NULL);
- prom_nextprop(node, prev, p->name);
+ name = prom_nextprop(node, prev, NULL);
- if (strlen(p->name) == 0) {
+ if (strlen(name) == 0) {
p->length = prom_getproplen(node, p->name);
if (p->length <= 0) {
p->length = 0;
p->length = prom_getproplen(node, p->name);
if (p->length <= 0) {
p->length = 0;