Lines Matching refs:pnum

273                 pnum, start, end, size, fstype = line.split(':')[:5]
274 partition = parttype(int(pnum), int(start[:-1]), int(end[:-1]),
276 self._partitions[pnum] = partition
292 def _get_part_image(self, pnum): argument
293 if pnum not in self.partitions:
294 raise WicError("Partition %s is not in the image" % pnum)
295 part = self.partitions[pnum]
302 if pnum not in self._partimages:
307 self._partimages[pnum] = dst_fname
309 return self._partimages[pnum]
311 def _put_part_image(self, pnum): argument
313 sparse_copy(self._partimages[pnum], self.imagepath,
314 seek=self.partitions[pnum].start)
316 def dir(self, pnum, path): argument
317 if pnum not in self.partitions:
318 raise WicError("Partition %s is not in the image" % pnum)
320 if self.partitions[pnum].fstype.startswith('ext'):
322 self._get_part_image(pnum),
326 self._get_part_image(pnum),
331 pnum = dest.part if isinstance(src, str) else src.part
333 if self.partitions[pnum].fstype.startswith('ext'):
337 self.debugfs, self._get_part_image(pnum))
343 self._get_part_image(pnum))
347 self._get_part_image(pnum),
351 self._get_part_image(pnum),
355 self._put_part_image(pnum)
357 def remove_ext(self, pnum, path, recursive): argument
364 self._get_part_image(pnum),
373 subdirs = iter(self.dir(pnum, abs_path).splitlines())
378 self.remove_ext(pnum, "%s/%s" % (abs_path, dir), recursive)
381 self._get_part_image(pnum),
397 def remove(self, pnum, path, recursive): argument
399 partimg = self._get_part_image(pnum)
400 if self.partitions[pnum].fstype.startswith('ext'):
401 self.remove_ext(pnum, path, recursive)
416 self._put_part_image(pnum)
500 pnum = str(num)
501 fstype = self.partitions[pnum].fstype
504 if part['size'] == self.partitions[pnum].size // self._lsector_size:
505 logger.info("copying unchanged partition {}".format(pnum))
506 … sparse_copy(self._get_part_image(pnum), target, seek=part['start'] * self._lsector_size)
514 with tempfile.NamedTemporaryFile(prefix="wic-part{}-".format(pnum)) as partf:
518 logger.info("resizing ext partition {}".format(pnum))
519 partimg = self._get_part_image(pnum)
525 logger.info("copying content of the fat partition {}".format(pnum))
529 self._get_part_image(pnum),
543 logger.info("creating swap partition {}".format(pnum))
546 … out = exec_cmd("{} --probe {}".format(self.blkid, self._get_part_image(pnum)))
555 … logger.warning("skipping partition {}: unsupported fstype {}".format(pnum, fstype))
565 part.pnum, part.start, part.end,