@@ -81,7 +81,7 @@ static droidboot_error validate_mbr_partition(const struct mbr_part *part)
8181 * Return 0 on valid signature
8282 */
8383static unsigned int
84- partition_parse_gpt_header (unsigned char * buffer , struct gpt_header * header )
84+ partition_parse_gpt_header (const char * buffer , struct gpt_header * header )
8585{
8686 /* Check GPT Signature */
8787 if (((uint32_t * ) buffer )[0 ] != GPT_SIGNATURE_2 ||
@@ -135,7 +135,7 @@ droidboot_error droidboot_parse_gpt_on_sd()
135135 unsigned int i , j , n ;
136136 int gpt_partitions_exist = 0 ;
137137
138- dridboot_sd_read_block (buf , 0 , 1 );
138+ droidboot_sd_read_block (buf , 0 , 1 );
139139
140140 /* look for the aa55 tag */
141141 //if (buf[510] != 0x55 || buf[511] != 0xaa)
@@ -164,16 +164,16 @@ droidboot_error droidboot_parse_gpt_on_sd()
164164 if (!gpt_partitions_exist ) return DROIDBOOT_ENOENT ;
165165 droidboot_log (DROIDBOOT_LOG_INFO , "found GPT\n" );
166166
167- dridboot_sd_read_block (buf , 1 , 1 );
167+ droidboot_sd_read_block (buf , 1 , 1 );
168168
169169 struct gpt_header gpthdr ;
170- int err = partition_parse_gpt_header (buf , & gpthdr );
170+ uint err = partition_parse_gpt_header (buf , & gpthdr );
171171 droidboot_dump_hex (DROIDBOOT_LOG_TRACE , buf , 16 );
172172 if (err ) {
173173 /* Check the backup gpt */
174174
175175 uint64_t backup_header_lba = droidboot_sd_blkcnt () - 1 ;
176- dridboot_sd_read_block (buf , backup_header_lba , 1 );
176+ droidboot_sd_read_block (buf , backup_header_lba , 1 );
177177
178178 err = partition_parse_gpt_header (buf , & gpthdr );
179179 if (err ) {
@@ -187,7 +187,7 @@ droidboot_error droidboot_parse_gpt_on_sd()
187187 /* Read GPT Entries */
188188 droidboot_log (DROIDBOOT_LOG_INFO , "Partition entries offset: %d\n" , partition_0 );
189189 for (i = 0 ; i < (DROIDBOOT_ROUNDUP (gpthdr .max_partition_count , part_entry_cnt )) / part_entry_cnt ; i ++ ) {
190- dridboot_sd_read_block (buf , 2 + i , 1 );
190+ droidboot_sd_read_block (buf , 2 + i , 1 );
191191 droidboot_dump_hex (DROIDBOOT_LOG_TRACE , buf , 16 );
192192
193193 for (j = 0 ; j < part_entry_cnt ; j ++ ) {
0 commit comments