Subversion Repositories freemyipod

Rev

Rev 582 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 582 Rev 585
Line 806... Line 806...
806
            statusfile.write(self.emcore.read(0x08000000, 0x00000100))
806
            statusfile.write(self.emcore.read(0x08000000, 0x00000100))
807
        statusfile.close()
807
        statusfile.close()
808
        self.logger.info("done\n")
808
        self.logger.info("done\n")
809
    
809
    
810
    @command
810
    @command
811
    def ipodclassic_writebbt(self, tempaddr, filename):
811
    def ipodclassic_writebbt(self, filename, tempaddr = None):
812
        """
812
        """
813
            Target-specific function: ipodclassic
813
            Target-specific function: ipodclassic
814
            Uploads the bad block table <filename> to
814
            Uploads the bad block table <filename> to memory at <tempaddr>
815
            memory at <tempaddr> and writes it to the hard disk
815
            (or an allocated block if not given) and writes it to the hard disk
816
        """
816
        """
-
 
817
	if tempaddr != None:
817
        tempaddr = to_int(tempaddr)
818
            tempaddr = to_int(tempaddr)
818
        try:
819
        try:
819
            f = open(filename, 'rb')
820
            f = open(filename, 'rb')
820
        except IOError:
821
        except IOError:
821
            raise ArgumentError("File not readable. Does it exist?")
822
            raise ArgumentError("File not readable. Does it exist?")
822
        self.logger.info("Writing bad block table to disk...")
823
        self.logger.info("Writing bad block table to disk...")