mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
ipodpatcher: Fix case of "iPod" in logs
Functions, structs and variables not modified. Change-Id: I4c0ea679e3e2225d3d4d0bcbe5db5071e5a18b47
This commit is contained in:
parent
e28511a757
commit
626643b46d
2 changed files with 26 additions and 26 deletions
|
|
@ -257,7 +257,7 @@ int read_partinfo(struct ipod_t* ipod, int silent)
|
||||||
if ((ipod->pinfo[0].type != 0) || (ipod->pinfo[0].size == 0) ||
|
if ((ipod->pinfo[0].type != 0) || (ipod->pinfo[0].size == 0) ||
|
||||||
((ipod->pinfo[1].type != 0xb) && (ipod->pinfo[1].type != 0xc) &&
|
((ipod->pinfo[1].type != 0xb) && (ipod->pinfo[1].type != 0xc) &&
|
||||||
(ipod->pinfo[1].type != PARTTYPE_HFS))) {
|
(ipod->pinfo[1].type != PARTTYPE_HFS))) {
|
||||||
if (!silent) fprintf(stderr,"[ERR] Partition layout is not an ipod\n");
|
if (!silent) fprintf(stderr,"[ERR] Partition layout is not an iPod\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -650,7 +650,7 @@ int add_new_image(struct ipod_t* ipod, char* imagename, char* filename, int type
|
||||||
}
|
}
|
||||||
|
|
||||||
if (memcmp(header+4, ipod->modelname,4)!=0) {
|
if (memcmp(header+4, ipod->modelname,4)!=0) {
|
||||||
fprintf(stderr,"[ERR] Model name in input file (%c%c%c%c) doesn't match ipod model (%s)\n",
|
fprintf(stderr,"[ERR] Model name in input file (%c%c%c%c) doesn't match iPod model (%s)\n",
|
||||||
header[4],header[5],header[6],header[7], ipod->modelname);
|
header[4],header[5],header[6],header[7], ipod->modelname);
|
||||||
close(infile);
|
close(infile);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -936,7 +936,7 @@ int add_bootloader(struct ipod_t* ipod, char* filename, int type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (memcmp(header+4, ipod->modelname,4)!=0) {
|
if (memcmp(header+4, ipod->modelname,4)!=0) {
|
||||||
fprintf(stderr,"[ERR] Model name in input file (%c%c%c%c) doesn't match ipod model (%s)\n",
|
fprintf(stderr,"[ERR] Model name in input file (%c%c%c%c) doesn't match iPod model (%s)\n",
|
||||||
header[4],header[5],header[6],header[7], ipod->modelname);
|
header[4],header[5],header[6],header[7], ipod->modelname);
|
||||||
close(infile);
|
close(infile);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -1233,7 +1233,7 @@ int write_firmware(struct ipod_t* ipod, char* filename, int type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (memcmp(header+4, ipod->modelname,4)!=0) {
|
if (memcmp(header+4, ipod->modelname,4)!=0) {
|
||||||
fprintf(stderr,"[ERR] Model name in input file (%c%c%c%c) doesn't match ipod model (%s)\n",
|
fprintf(stderr,"[ERR] Model name in input file (%c%c%c%c) doesn't match iPod model (%s)\n",
|
||||||
header[4],header[5],header[6],header[7], ipod->modelname);
|
header[4],header[5],header[6],header[7], ipod->modelname);
|
||||||
close(infile);
|
close(infile);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -1810,10 +1810,10 @@ int ipod_scan(struct ipod_t* ipod)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
printf("[INFO] Ipod found - %s (\"%s\") - disk device %d\n",
|
printf("[INFO] iPod found - %s (\"%s\") - disk device %d\n",
|
||||||
ipod->modelstr,ipod->macpod ? "macpod" : "winpod",i);
|
ipod->modelstr,ipod->macpod ? "macpod" : "winpod",i);
|
||||||
#else
|
#else
|
||||||
printf("[INFO] Ipod found - %s (\"%s\") - %s\n",
|
printf("[INFO] iPod found - %s (\"%s\") - %s\n",
|
||||||
ipod->modelstr,ipod->macpod ? "macpod" : "winpod",ipod->diskname);
|
ipod->modelstr,ipod->macpod ? "macpod" : "winpod",ipod->diskname);
|
||||||
#endif
|
#endif
|
||||||
n++;
|
n++;
|
||||||
|
|
@ -1828,7 +1828,7 @@ int ipod_scan(struct ipod_t* ipod)
|
||||||
memcpy(ipod, &ipod_found, sizeof(struct ipod_t));
|
memcpy(ipod, &ipod_found, sizeof(struct ipod_t));
|
||||||
}
|
}
|
||||||
else if(n == 0 && denied) {
|
else if(n == 0 && denied) {
|
||||||
printf("[ERR] FATAL: Permission denied on %d device(s) and no ipod detected.\n", denied);
|
printf("[ERR] FATAL: Permission denied on %d device(s) and no iPod detected.\n", denied);
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
printf("[ERR] You need to run this program with administrator priviledges!\n");
|
printf("[ERR] You need to run this program with administrator priviledges!\n");
|
||||||
#else
|
#else
|
||||||
|
|
@ -1855,7 +1855,7 @@ int write_dos_partition_table(struct ipod_t* ipod)
|
||||||
/* Only support 512-byte sectors at the moment */
|
/* Only support 512-byte sectors at the moment */
|
||||||
if ( ipod->sector_size != 512 )
|
if ( ipod->sector_size != 512 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"[ERR] Only ipods with 512 bytes per sector are supported.\n");
|
fprintf(stderr,"[ERR] Only iPods with 512 bytes per sector are supported.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(ipod->sectorbuf == NULL) {
|
if(ipod->sectorbuf == NULL) {
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@ void print_macpod_warning(void)
|
||||||
{
|
{
|
||||||
printf("[INFO] ************************************************************************\n");
|
printf("[INFO] ************************************************************************\n");
|
||||||
printf("[INFO] *** WARNING FOR ROCKBOX USERS\n");
|
printf("[INFO] *** WARNING FOR ROCKBOX USERS\n");
|
||||||
printf("[INFO] *** You must convert this ipod to FAT32 format (aka a \"winpod\")\n");
|
printf("[INFO] *** You must convert this iPod to FAT32 format (aka a \"winpod\")\n");
|
||||||
printf("[INFO] *** if you want to run Rockbox. Rockbox WILL NOT work on this ipod.\n");
|
printf("[INFO] *** if you want to run Rockbox. Rockbox WILL NOT work on this iPod.\n");
|
||||||
printf("[INFO] *** See http://www.rockbox.org/wiki/IpodConversionToFAT32\n");
|
printf("[INFO] *** See http://www.rockbox.org/wiki/IpodConversionToFAT32\n");
|
||||||
printf("[INFO] ************************************************************************\n");
|
printf("[INFO] ************************************************************************\n");
|
||||||
}
|
}
|
||||||
|
|
@ -103,21 +103,21 @@ void print_usage(void)
|
||||||
fprintf(stderr,"The .ipodx extension is used for encrypted images for the 2nd Gen Nano.\n\n");
|
fprintf(stderr,"The .ipodx extension is used for encrypted images for the 2nd Gen Nano.\n\n");
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
fprintf(stderr,"DISKNO is the number (e.g. 2) Windows has assigned to your ipod's hard disk.\n");
|
fprintf(stderr,"DISKNO is the number (e.g. 2) Windows has assigned to your iPod's hard disk.\n");
|
||||||
fprintf(stderr,"The first hard disk in your computer (i.e. C:\\) will be disk 0, the next disk\n");
|
fprintf(stderr,"The first hard disk in your computer (i.e. C:\\) will be disk 0, the next disk\n");
|
||||||
fprintf(stderr,"will be disk 1 etc. ipodpatcher will refuse to access a disk unless it\n");
|
fprintf(stderr,"will be disk 1 etc. ipodpatcher will refuse to access a disk unless it\n");
|
||||||
fprintf(stderr,"can identify it as being an ipod.\n");
|
fprintf(stderr,"can identify it as being an iPod.\n");
|
||||||
fprintf(stderr,"\n");
|
fprintf(stderr,"\n");
|
||||||
#else
|
#else
|
||||||
#if defined(linux) || defined (__linux)
|
#if defined(linux) || defined (__linux)
|
||||||
fprintf(stderr,"\"device\" is the device node (e.g. /dev/sda) assigned to your ipod.\n");
|
fprintf(stderr,"\"device\" is the device node (e.g. /dev/sda) assigned to your iPod.\n");
|
||||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
fprintf(stderr,"\"device\" is the device node (e.g. /dev/da1) assigned to your ipod.\n");
|
fprintf(stderr,"\"device\" is the device node (e.g. /dev/da1) assigned to your iPod.\n");
|
||||||
#elif defined(__APPLE__) && defined(__MACH__)
|
#elif defined(__APPLE__) && defined(__MACH__)
|
||||||
fprintf(stderr,"\"device\" is the device node (e.g. /dev/disk1) assigned to your ipod.\n");
|
fprintf(stderr,"\"device\" is the device node (e.g. /dev/disk1) assigned to your iPod.\n");
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr,"ipodpatcher will refuse to access a disk unless it can identify it as being\n");
|
fprintf(stderr,"ipodpatcher will refuse to access a disk unless it can identify it as being\n");
|
||||||
fprintf(stderr,"an ipod.\n");
|
fprintf(stderr,"an iPod.\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
if ((argc > 1) && (strcmp(argv[1],"--scan")==0)) {
|
if ((argc > 1) && (strcmp(argv[1],"--scan")==0)) {
|
||||||
if (ipod_scan(&ipod) == 0)
|
if (ipod_scan(&ipod) == 0)
|
||||||
fprintf(stderr,"[ERR] No ipods found.\n");
|
fprintf(stderr,"[ERR] No iPods found.\n");
|
||||||
return IPOD_NOT_FOUND;
|
return IPOD_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,10 +186,10 @@ int main(int argc, char* argv[])
|
||||||
/* Autoscan for ipods */
|
/* Autoscan for ipods */
|
||||||
n = ipod_scan(&ipod);
|
n = ipod_scan(&ipod);
|
||||||
if (n==0) {
|
if (n==0) {
|
||||||
fprintf(stderr,"[ERR] No ipods found, aborting\n");
|
fprintf(stderr,"[ERR] No iPods found, aborting\n");
|
||||||
fprintf(stderr,"[ERR] Please connect your ipod and ensure it is in disk mode\n");
|
fprintf(stderr,"[ERR] Please connect your iPod and ensure it is in disk mode\n");
|
||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
fprintf(stderr,"[ERR] Also ensure that itunes is closed, and that your ipod is not mounted.\n");
|
fprintf(stderr,"[ERR] Also ensure that itunes is closed, and that your iPod is not mounted.\n");
|
||||||
#elif !defined(__WIN32__)
|
#elif !defined(__WIN32__)
|
||||||
if (geteuid()!=0) {
|
if (geteuid()!=0) {
|
||||||
fprintf(stderr,"[ERR] You may also need to run ipodpatcher as root.\n");
|
fprintf(stderr,"[ERR] You may also need to run ipodpatcher as root.\n");
|
||||||
|
|
@ -197,8 +197,8 @@ int main(int argc, char* argv[])
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr,"[ERR] Please refer to the Rockbox manual if you continue to have problems.\n");
|
fprintf(stderr,"[ERR] Please refer to the Rockbox manual if you continue to have problems.\n");
|
||||||
} else if (n > 1) {
|
} else if (n > 1) {
|
||||||
fprintf(stderr,"[ERR] %d ipods found, aborting\n",n);
|
fprintf(stderr,"[ERR] %d iPods found, aborting\n",n);
|
||||||
fprintf(stderr,"[ERR] Please connect only one ipod and re-run ipodpatcher.\n");
|
fprintf(stderr,"[ERR] Please connect only one iPod and re-run ipodpatcher.\n");
|
||||||
return IPOD_MULTIPLE_DEVICES;
|
return IPOD_MULTIPLE_DEVICES;
|
||||||
} else if (n == 1 && ipod.macpod) {
|
} else if (n == 1 && ipod.macpod) {
|
||||||
return IPOD_WRONG_TYPE;
|
return IPOD_WRONG_TYPE;
|
||||||
|
|
@ -396,7 +396,7 @@ int main(int argc, char* argv[])
|
||||||
ipod_get_ramsize(&ipod);
|
ipod_get_ramsize(&ipod);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("[INFO] Ipod model: %s ",ipod.modelstr);
|
printf("[INFO] iPod model: %s ",ipod.modelstr);
|
||||||
if (ipod.ramsize > 0) { printf("(%dMB RAM) ",ipod.ramsize); }
|
if (ipod.ramsize > 0) { printf("(%dMB RAM) ",ipod.ramsize); }
|
||||||
printf("(\"%s\")\n",ipod.macpod ? "macpod" : "winpod");
|
printf("(\"%s\")\n",ipod.macpod ? "macpod" : "winpod");
|
||||||
|
|
||||||
|
|
@ -564,7 +564,7 @@ int main(int argc, char* argv[])
|
||||||
} else if (action==FORMAT_PARTITION) {
|
} else if (action==FORMAT_PARTITION) {
|
||||||
printf("WARNING!!! YOU ARE ABOUT TO USE AN EXPERIMENTAL FEATURE.\n");
|
printf("WARNING!!! YOU ARE ABOUT TO USE AN EXPERIMENTAL FEATURE.\n");
|
||||||
printf("ALL DATA ON YOUR IPOD WILL BE ERASED.\n");
|
printf("ALL DATA ON YOUR IPOD WILL BE ERASED.\n");
|
||||||
printf("Are you sure you want to format your ipod? (y/n):");
|
printf("Are you sure you want to format your iPod? (y/n):");
|
||||||
|
|
||||||
if (fgets(yesno,4,stdin)) {
|
if (fgets(yesno,4,stdin)) {
|
||||||
if (yesno[0]=='y') {
|
if (yesno[0]=='y') {
|
||||||
|
|
@ -581,11 +581,11 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
} else if (action==CONVERT_TO_FAT32) {
|
} else if (action==CONVERT_TO_FAT32) {
|
||||||
if (!ipod.macpod) {
|
if (!ipod.macpod) {
|
||||||
printf("[ERR] Ipod is already FAT32, aborting\n");
|
printf("[ERR] iPod is already FAT32, aborting\n");
|
||||||
} else {
|
} else {
|
||||||
printf("WARNING!!! YOU ARE ABOUT TO USE AN EXPERIMENTAL FEATURE.\n");
|
printf("WARNING!!! YOU ARE ABOUT TO USE AN EXPERIMENTAL FEATURE.\n");
|
||||||
printf("ALL DATA ON YOUR IPOD WILL BE ERASED.\n");
|
printf("ALL DATA ON YOUR IPOD WILL BE ERASED.\n");
|
||||||
printf("Are you sure you want to convert your ipod to FAT32? (y/n):");
|
printf("Are you sure you want to convert your iPod to FAT32? (y/n):");
|
||||||
|
|
||||||
if (fgets(yesno,4,stdin)) {
|
if (fgets(yesno,4,stdin)) {
|
||||||
if (yesno[0]=='y') {
|
if (yesno[0]=='y') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue