1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-01 12:57:29 +03:00

replace deprecated u_char with u8

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8887 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
matteo 2007-09-20 19:33:00 +00:00
parent b377dac440
commit 81df3b167a

View File

@ -71,7 +71,7 @@ static int create_mtd_partitions(struct mtd_info *master,
do { /* Try 10 blocks starting from master->erasesize */ do { /* Try 10 blocks starting from master->erasesize */
offset = pre_size; offset = pre_size;
master->read(master, offset, master->read(master, offset,
sizeof(header), &len, (u_char *)&header); sizeof(header), &len, (u8 *)&header);
if (!strncmp((char *)&header, "TIENV0.8", 8)) if (!strncmp((char *)&header, "TIENV0.8", 8))
ar7_parts[1].offset = pre_size; ar7_parts[1].offset = pre_size;
if (header.checksum == LOADER_MAGIC1) if (header.checksum == LOADER_MAGIC1)
@ -93,7 +93,7 @@ static int create_mtd_partitions(struct mtd_info *master,
while (header.length) { while (header.length) {
offset += sizeof(header) + header.length; offset += sizeof(header) + header.length;
master->read(master, offset, sizeof(header), master->read(master, offset, sizeof(header),
&len, (u_char *)&header); &len, (u8 *)&header);
} }
root_offset = offset + sizeof(header) + 4; root_offset = offset + sizeof(header) + 4;
break; break;
@ -101,7 +101,7 @@ static int create_mtd_partitions(struct mtd_info *master,
while (header.length) { while (header.length) {
offset += sizeof(header) + header.length; offset += sizeof(header) + header.length;
master->read(master, offset, sizeof(header), master->read(master, offset, sizeof(header),
&len, (u_char *)&header); &len, (u8 *)&header);
} }
root_offset = offset + sizeof(header) + 4 + 0xff; root_offset = offset + sizeof(header) + 4 + 0xff;
root_offset &= ~(u32)0xff; root_offset &= ~(u32)0xff;
@ -112,7 +112,7 @@ static int create_mtd_partitions(struct mtd_info *master,
} }
master->read(master, root_offset, master->read(master, root_offset,
sizeof(header), &len, (u_char *)&header); sizeof(header), &len, (u8 *)&header);
if (header.checksum != SQUASHFS_MAGIC) { if (header.checksum != SQUASHFS_MAGIC) {
root_offset += master->erasesize - 1; root_offset += master->erasesize - 1;
root_offset &= ~(master->erasesize - 1); root_offset &= ~(master->erasesize - 1);