Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/a/m/amitools-HEAD/amitools/fs/blkdev/HDFBlockDevice.py   amitools(Download)
  def create(self, geo, reserved=2):
    self._set_geometry(geo.cyls, geo.heads, geo.secs, reserved=reserved)
    self.img_file.create(geo.get_num_blocks())
    self.img_file.open()
 
  def open(self, geo, reserved=2):
    self._set_geometry(geo.cyls, geo.heads, geo.secs, reserved=reserved)

src/a/m/amitools-HEAD/amitools/fs/blkdev/PartBlockDevice.py   amitools(Download)
    if boot_blocks == 0:
      boot_blocks = 2
    self._set_geometry(cyls, heads, secs, block_bytes, reserved, boot_blocks)
    # calc block offset of partition
    self.blk_off = heads * secs * lo_cyl

src/a/m/amitools-HEAD/amitools/fs/blkdev/ADFBlockDevice.py   amitools(Download)
  def create(self):
    if self.read_only:
      raise IOError("ADF creation not allowed in read-only mode!")    
    self._set_geometry() # set default geometry
    # allocate image in memory
    self.data = ctypes.create_string_buffer(self.num_bytes)
    self.dirty = True
 
  def open(self):
    self._set_geometry() # set default geometry