X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=src%2Fpartition.c;h=7dbbc5d99261a2772aa630fedcfa278cfa6c1181;hb=4c40441b58cc78e33debffd93afa884a45136590;hp=da26fc27ed500ac16fef952818f293cf0f8238c1;hpb=23c77cc092dbbb1e12c47c2b0021d4476b543702;p=rrq%2Fmaintain_lilo.git diff --git a/src/partition.c b/src/partition.c index da26fc2..7dbbc5d 100644 --- a/src/partition.c +++ b/src/partition.c @@ -56,10 +56,10 @@ source directory. #endif static -int anywhere(void *buf, char *str) +int anywhere(unsigned char *buf, char *str) { int k, n; - void *s; + char *s; k = strlen(str); n = SECTOR_SIZE-k; @@ -67,7 +67,7 @@ int anywhere(void *buf, char *str) while(s) { if (!strncmp(s, str, k)) return 1; s++; - n = SECTOR_SIZE - k - (int)(s-buf); + n = SECTOR_SIZE - k - (int)(s-(char*)buf); s = memchr(s, *str, n); } return 0; @@ -381,7 +381,7 @@ static void add_rule(unsigned char bios,unsigned char offset, int i; if (curr_prt_map == PRTMAP_SIZE) - cfg_error("Too many change rules (more than %s)",PRTMAP_SIZE); + cfg_error("Too many change rules (more than %d)",PRTMAP_SIZE); if (verbose >= 3) printf(" Adding rule: disk 0x%02x, offset 0x%x, 0x%02x -> 0x%02x\n", bios,PART_TABLE_OFFSET+offset,expect,set);