Subversion Repositories freemyipod

Rev

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

Rev 398 Rev 399
Line 607... Line 607...
607
        return result
607
        return result
608
    
608
    
609
    @command(timeout = 50000)
609
    @command(timeout = 50000)
610
    def storage_read_sectors_md(self, volume, sector, count, addr):
610
    def storage_read_sectors_md(self, volume, sector, count, addr):
611
        """ Read sectors from as storage device """
611
        """ Read sectors from as storage device """
612
        result = self.lib.monitorcommand(struct.pack("IIQIIII", 28, volume, sector, count, addr, 0, 0), "III", ("rc", None, None, None))
612
        result = self.lib.monitorcommand(struct.pack("IIQIIII", 28, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
613
        if result.rc > 0x80000000:
613
        if result.rc > 0x80000000:
614
            raise DeviceError("storage_read_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, rc))
614
            raise DeviceError("storage_read_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, rc))
615
    
615
    
616
    @command(timeout = 50000)
616
    @command(timeout = 50000)
617
    def storage_write_sectors_md(self, volume, sector, count, addr):
617
    def storage_write_sectors_md(self, volume, sector, count, addr):
618
        """ Read sectors from as storage device """
618
        """ Read sectors from as storage device """
619
        result = self.lib.monitorcommand(struct.pack("IIQIIII", 29, volume, sector, count, addr, 0, 0), "III", ("rc", None, None, None))
619
        result = self.lib.monitorcommand(struct.pack("IIQIIII", 29, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
620
        if result.rc > 0x80000000:
620
        if result.rc > 0x80000000:
621
            raise DeviceError("storage_read_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, rc))
621
            raise DeviceError("storage_read_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, rc))
622
    
622
    
623
    @command(timeout = 30000)
623
    @command(timeout = 30000)
624
    def file_open(self, filename, mode):
624
    def file_open(self, filename, mode):