Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 271605
Collapse All | Expand All

(-)mkinitrd-4.2.0.3/grubby.orig/grubby.c (-3 / +6 lines)
Lines 32-37 Link Here
32
32
33
#define CODE_SEG_SIZE	  128	/* code segment checked by --bootloader-probe */
33
#define CODE_SEG_SIZE	  128	/* code segment checked by --bootloader-probe */
34
34
35
/* Already strndup is defined in gcc-4.4 ? */
36
#define strndup _strndup
37
35
/* comments get lumped in with indention */
38
/* comments get lumped in with indention */
36
struct lineElement {
39
struct lineElement {
37
    char * item;
40
    char * item;
Lines 1753-1759 Link Here
1753
    return 2;
1756
    return 2;
1754
}
1757
}
1755
1758
1756
int checkLiloOnRaid(char * mdDev, const char * boot) {
1759
int checkLiloOnRaid(char * mdDev, const unsigned char * boot) {
1757
    int fd;
1760
    int fd;
1758
    char buf[65536];
1761
    char buf[65536];
1759
    char * end;
1762
    char * end;
Lines 1848-1854 Link Here
1848
1851
1849
int checkForLilo(struct grubConfig * config) {
1852
int checkForLilo(struct grubConfig * config) {
1850
    int fd;
1853
    int fd;
1851
    unsigned char boot[512];
1854
    const unsigned char boot[512];
1852
    struct singleLine * line;
1855
    struct singleLine * line;
1853
1856
1854
    for (line = config->theLines; line; line = line->next)
1857
    for (line = config->theLines; line; line = line->next)
Lines 1869-1875 Link Here
1869
	return 1;
1872
	return 1;
1870
    }
1873
    }
1871
1874
1872
    if (read(fd, boot, 512) != 512) {
1875
    if (read(fd, (void *) boot, 512) != 512) {
1873
	fprintf(stderr, _("grubby: unable to read %s: %s\n"),
1876
	fprintf(stderr, _("grubby: unable to read %s: %s\n"),
1874
		"/boot/boot.b", strerror(errno));
1877
		"/boot/boot.b", strerror(errno));
1875
	return 1;
1878
	return 1;

Return to bug 271605