History log of /freebsd-current/usr.bin/mkimg/vmdk.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4dbd43cd 06-Jan-2019 Xin LI <delphij@FreeBSD.org>

Remove unneeded headers.

MFC after: 1 month


# 6b123571 02-Oct-2016 Marcel Moolenaar <marcel@FreeBSD.org>

Prefer <stdint.h> over <sys/types.h>. While here remove redundant
inclusion of <sys/queue.h>.

Move the inclusion of the disk partitioning headers out of order
and inbetween standard headers and local header. They will change
in a subsequent commit.


# 5aad7d9a 25-Sep-2016 Marcel Moolenaar <marcel@FreeBSD.org>

Avoid depending on the <sys/endian.h> header for le*enc and be*enc.
Not only is the header unportable, the encoding/decoding functions
are as well. Instead, duplicate the handful of small inlines we
need into a private header called endian.h.

Aside: an alternative approach is to move the encoding/decoding
functions to a separate system header. While the header is still
nonportable, such an approach would make it possible to re-use the
definitions by playing games with include paths. This may be the
preferred approach if more (build) utilities need this. This
change does not preclude that. In fact, it makes it easier.


# 3af7c805 12-Jul-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

mkimg(1): minor cleanups with argument order in calloc(3).

Generally the first argument in calloc is supposed to stand for a count
and the second for a size. Try to make that consistent. While here,
attempt to make some use of the overflow detection capability in
calloc(3).


# 62193493 08-Aug-2014 Marcel Moolenaar <marcel@FreeBSD.org>

Create a redundant grain directory and table. Previously we were
cheating by assigning the same sector offset to both directories,
but it seems that VirtualBox doesn't like that. Neither does
qemu from the looks of it. We now actually write the directory
and table twice.

MFC after: 3 days


# a0f136e1 14-Jul-2014 Marcel Moolenaar <marcel@FreeBSD.org>

Add image_data() for checking whether a sequence of blocks has data.
Use this for VHD and VMDK to avoid allocating space in the image
for empty sectors.

Note that this negatively affects performance because mkimg uses a
temporary file for the intermediate storage. When mkimg has better
internal book keeping, performance can be significantly improved.


# f3582a72 03-Jul-2014 Marcel Moolenaar <marcel@FreeBSD.org>

Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V
among others.

Add an undocumented option for unit testing (-y). When given, the image
will have UUIDs and timestamps synthesized in a way that gives identical
results across runs. As such, UUIDs stop being unique, globally or
otherwise.

VHD support requested by: gjb@


# f0e9dced 15-May-2014 Marcel Moolenaar <marcel@FreeBSD.org>

MFuser/marcel/mkimg:
Add support for different output formats:
1. The output file that was previously written is now called the raw format.
2. Add the vmdk output format to create VMDK images.

When the format is not given, the raw output format is assumed.