code: def __impl_read_chain(self, start, read_sector_f, read_fat_f):
          
          sector = start
          check = [ sector ] # keep a list of sectors we've already read
          buffer = StringIO()
          while sector != ENDOFCHAIN:
              buffer.write(read_sector_f(sector))
              next = read_fat_f(sector)
              if next in check:
                  logging.error('infinite loop detected at {0} to {1} starting at {2}'.format(
                      sector, next, sector_start))
                  return buffer.getvalue()
              check.append(next)
              sector = next
          return buffer.getvalue()
docs: Returns the entire contents of a chain starting at the given sector.