qemu_driver.c: factor out duplication in compression-type handling
* src/qemu_driver.c (QEMUD_SAVE_FORMAT_LAST): Define. (qemudSaveCompressionTypeFromString): Declare. (qemudSaveCompressionTypeToString): Declare. (qemudDomainSave): Use those functions rather than open-coding them. Use "cat >> '%s' ..." in place of equivalent "dd of='%s' oflag=append conv=notrunc ...".
Showing
想要评论请 注册 或 登录