""" Copy an image to a block device or a regular file using bmap. """
try:
- writer = BmapCopy.BmapCopy(args.image, args.bdev, args.bmap)
+ writer = BmapCopy.BmapCopy(args.image, args.dest, args.bmap)
except BmapCopy.Error as err:
log.error(str(err))
raise SystemExit(1)
start_time = time.time()
if not args.bmap:
log.info("no block map given (see the --bmap option)")
- log.info("falling-back to copying entire image to '%s'" % args.bdev)
+ log.info("falling-back to copying entire image to '%s'" % args.dest)
else:
log.info("block map format version %s" % writer.bmap_version)
log.info("%d blocks of size %d (%s), mapped %d blocks (%s or %.1f%%)" \
writer.bmap_mapped_size_human,
writer.bmap_mapped_percent))
log.info("copying the image to '%s' using bmap file '%s'" \
- % (args.bdev, args.bmap))
+ % (args.dest, args.bmap))
try:
try:
raise SystemExit(1)
# Synchronize the block device
- log.info("synchronizing block device '%s'" % args.bdev)
+ log.info("synchronizing block device '%s'" % args.dest)
try:
writer.sync()
except BmapCopy.Error as err:
parser_copy.add_argument("image", help = text)
# The second positional argument - block device node
- text = "the block device node to copy the image to"
- parser_copy.add_argument("bdev", help = text)
+ text = "the destination file or device node to copy the image to"
+ parser_copy.add_argument("dest", help = text)
# The --bmap option
text = "the block map file for the image"