forked from len0rd/rockbox
Changes to aid incorporation into rbutil, based on part of FS #6643 from Dominik Wenger. Move display_partinfo() function into main.c (where it belongs) and export get_parttype() function from ipodpatcher.c. Also add a targetname variable to struct ipod_t to enable bootloader URLs to be constructed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12264 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
955afed1b7
commit
a6d68bd740
4 changed files with 30 additions and 20 deletions
|
@ -102,6 +102,26 @@ void print_usage(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void display_partinfo(struct ipod_t* ipod)
|
||||
{
|
||||
int i;
|
||||
double sectors_per_MB = (1024.0*1024.0)/ipod->sector_size;
|
||||
|
||||
printf("[INFO] Part Start Sector End Sector Size (MB) Type\n");
|
||||
for ( i = 0; i < 4; i++ ) {
|
||||
if (ipod->pinfo[i].start != 0) {
|
||||
printf("[INFO] %d %10ld %10ld %10.1f %s (0x%02x)\n",
|
||||
i,
|
||||
ipod->pinfo[i].start,
|
||||
ipod->pinfo[i].start+ipod->pinfo[i].size-1,
|
||||
ipod->pinfo[i].size/sectors_per_MB,
|
||||
get_parttype(ipod->pinfo[i].type),
|
||||
ipod->pinfo[i].type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#ifdef WITH_BOOTOBJS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue