-/* $OpenBSD: main.c,v 1.70 2022/05/04 23:17:25 dv Exp $ */
+/* $OpenBSD: main.c,v 1.71 2022/05/13 00:17:20 yasuoka Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
/* align to megabytes */
dst.size = ALIGNSZ(dstsize, 1048576);
- if ((ret = create_imagefile(dst.type, dst.disk, NULL,
- dst.size / 1048576, &format)) != 0) {
- errno = ret;
+ if ((ret = create_imagefile(dst.type, dst.disk, NULL, dst.size,
+ &format)) != 0) {
errstr = "failed to create destination image file";
goto done;
}
-/* $OpenBSD: vmctl.c,v 1.82 2022/05/04 23:17:25 dv Exp $ */
+/* $OpenBSD: vmctl.c,v 1.83 2022/05/13 00:17:20 yasuoka Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*/
int
create_imagefile(int type, const char *imgfile_path, const char *base_path,
- long imgsize, const char **format)
+ uint64_t imgsize, const char **format)
{
int ret;
-/* $OpenBSD: vmctl.h,v 1.36 2022/05/04 23:17:25 dv Exp $ */
+/* $OpenBSD: vmctl.h,v 1.37 2022/05/13 00:17:20 yasuoka Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
/* vmctl.c */
int open_imagefile(int, const char *, int,
struct virtio_backing *, off_t *);
-int create_imagefile(int, const char *, const char *, long, const char **);
+int create_imagefile(int, const char *, const char *, uint64_t, const char **);
int create_raw_imagefile(const char *, long);
int create_qc2_imagefile(const char *, const char *, long);
int vm_start(uint32_t, const char *, size_t, int, char **, int,