From 9b4bb47dfb7e8917abcd13ab89d532e3ec16563e Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Tue, 6 Mar 2007 14:07:38 +0000 Subject: Bump version to 0.9 ready for release with version 1.0 bootloaders, and add an uninstall option to the interactive mode git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12645 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/ipodpatcher/main.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'rbutil/ipodpatcher') diff --git a/rbutil/ipodpatcher/main.c b/rbutil/ipodpatcher/main.c index 476aeff9d2..e60b1d7034 100644 --- a/rbutil/ipodpatcher/main.c +++ b/rbutil/ipodpatcher/main.c @@ -29,7 +29,7 @@ #include "ipodpatcher.h" #include "ipodio.h" -#define VERSION "0.8 with r12194-070204 bootloaders" +#define VERSION "0.9 with v1.0 bootloaders" int verbose = 0; @@ -326,9 +326,10 @@ int main(int argc, char* argv[]) #ifdef WITH_BOOTOBJS } else if (action==INTERACTIVE) { - printf("Do you wish to install the rockbox bootloader? (y/n) :"); + printf("Enter i to install the Rockbox bootloader, u to uninstall\n or c to cancel and do nothing (i/u/c) :"); + if (fgets(yesno,4,stdin)) { - if (yesno[0]=='y') { + if (yesno[0]=='i') { if (ipod_reopen_rw(&ipod) < 0) { return 5; } @@ -338,6 +339,16 @@ int main(int argc, char* argv[]) } else { fprintf(stderr,"[ERR] --install failed.\n"); } + } else if (yesno[0]=='u') { + if (ipod_reopen_rw(&ipod) < 0) { + return 5; + } + + if (delete_bootloader(&ipod)==0) { + fprintf(stderr,"[INFO] Bootloader removed.\n"); + } else { + fprintf(stderr,"[ERR] Bootloader removal failed.\n"); + } } } #endif -- cgit