901 |
break; |
break; |
902 |
} |
} |
903 |
|
|
904 |
free(line->elements[i].indent); |
line->elements[i + 1].indent = line->elements[i].indent; |
905 |
line->elements[i].indent = strdup(indent); |
line->elements[i].indent = strdup(indent); |
906 |
*p++ = '\0'; |
*p++ = '\0'; |
907 |
i++; |
i++; |
908 |
line->elements[i].item = strdup(p); |
line->elements[i].item = strdup(p); |
|
line->elements[i].indent = strdup(""); |
|
|
p = line->elements[i].item; |
|
909 |
} |
} |
910 |
} |
} |
911 |
} |
} |
993 |
dbgPrintf("found 'set' command (%d elements): ", line->numElements); |
dbgPrintf("found 'set' command (%d elements): ", line->numElements); |
994 |
dbgPrintf("%s", line->indent); |
dbgPrintf("%s", line->indent); |
995 |
for (i = 0; i < line->numElements; i++) |
for (i = 0; i < line->numElements; i++) |
996 |
dbgPrintf("%s\"%s\"", line->elements[i].indent, line->elements[i].item); |
dbgPrintf("\"%s\"%s", line->elements[i].item, line->elements[i].indent); |
997 |
dbgPrintf("\n"); |
dbgPrintf("\n"); |
998 |
struct keywordTypes *kwType = getKeywordByType(LT_DEFAULT, cfi); |
struct keywordTypes *kwType = getKeywordByType(LT_DEFAULT, cfi); |
999 |
if (kwType && line->numElements == 3 && |
if (kwType && line->numElements == 3 && |
1101 |
/* get extras */ |
/* get extras */ |
1102 |
int count = 0; |
int count = 0; |
1103 |
for (i = 0; i < line->numElements; i++) { |
for (i = 0; i < line->numElements; i++) { |
1104 |
if (count == 2) { |
if (count >= 2) { |
1105 |
strcat(extras, line->elements[i].item); |
strcat(extras, line->elements[i].item); |
1106 |
strcat(extras, line->elements[i].indent); |
strcat(extras, line->elements[i].indent); |
1107 |
} |
} |
3585 |
} |
} |
3586 |
|
|
3587 |
if (!cfi) { |
if (!cfi) { |
3588 |
|
if (grub2FindConfig(&grub2ConfigType)) |
3589 |
|
cfi = &grub2ConfigType; |
3590 |
|
else |
3591 |
#ifdef __ia64__ |
#ifdef __ia64__ |
3592 |
cfi = &eliloConfigType; |
cfi = &eliloConfigType; |
3593 |
#elif __powerpc__ |
#elif __powerpc__ |
3594 |
cfi = &yabootConfigType; |
cfi = &yabootConfigType; |
3595 |
#elif __sparc__ |
#elif __sparc__ |
3596 |
cfi = &siloConfigType; |
cfi = &siloConfigType; |
3597 |
#elif __s390__ |
#elif __s390__ |
3598 |
cfi = &ziplConfigType; |
cfi = &ziplConfigType; |
3599 |
#elif __s390x__ |
#elif __s390x__ |
3600 |
cfi = &ziplConfigtype; |
cfi = &ziplConfigtype; |
3601 |
#else |
#else |
|
if (grub2FindConfig(&grub2ConfigType)) |
|
|
cfi = &grub2ConfigType; |
|
|
else |
|
3602 |
cfi = &grubConfigType; |
cfi = &grubConfigType; |
3603 |
#endif |
#endif |
3604 |
} |
} |