2350 |
char * boot = NULL; |
char * boot = NULL; |
2351 |
int lba; |
int lba; |
2352 |
|
|
2353 |
if (!isSuseSystem()) { |
if (isSuseSystem()) { |
2354 |
if (parseSysconfigGrub(&lba, &boot)) { |
if (parseSuseGrubConf(&lba, &boot)) { |
2355 |
free(boot); |
free(boot); |
2356 |
return; |
return; |
2357 |
} |
} |
2358 |
} else { |
} else { |
2359 |
if (parseSuseGrubConf(&lba, &boot)) { |
if (parseSysconfigGrub(&lba, &boot)) { |
2360 |
free(boot); |
free(boot); |
2361 |
return; |
return; |
2362 |
} |
} |
3179 |
int fd; |
int fd; |
3180 |
unsigned char bootSect[512]; |
unsigned char bootSect[512]; |
3181 |
char * boot; |
char * boot; |
3182 |
int onSuse; |
int onSuse = isSuseSystem(); |
3183 |
|
|
3184 |
onSuse = isSuseSystem(); |
|
3185 |
if (!onSuse) { |
if (onSuse) { |
3186 |
if (parseSysconfigGrub(NULL, &boot)) return 0; |
if (parseSuseGrubConf(NULL, &boot)) |
3187 |
|
return 0; |
3188 |
} else { |
} else { |
3189 |
if (parseSuseGrubConf(NULL, &boot)) return 0; |
if (parseSysconfigGrub(NULL, &boot)) |
3190 |
|
return 0; |
3191 |
} |
} |
3192 |
|
|
3193 |
/* assume grub is not installed -- not an error condition */ |
/* assume grub is not installed -- not an error condition */ |
3207 |
} |
} |
3208 |
close(fd); |
close(fd); |
3209 |
|
|
3210 |
if (!onSuse) |
/* The more elaborate checks do not work on SuSE. The checks done |
3211 |
return checkDeviceBootloader(boot, bootSect); |
* seem to be reasonble (at least for now), so just return success |
3212 |
else |
*/ |
3213 |
/* |
if (onSuse) |
|
* The more elaborate checks do not work on SuSE. The checks done |
|
|
* seem to be reasonble (at least for now), so just return success |
|
|
*/ |
|
3214 |
return 2; |
return 2; |
3215 |
|
|
3216 |
|
return checkDeviceBootloader(boot, bootSect); |
3217 |
} |
} |
3218 |
|
|
3219 |
int checkForExtLinux(struct grubConfig * config) { |
int checkForExtLinux(struct grubConfig * config) { |