CVS commit: othersrc/external/bsd/vmdk/dist

2012-12-03 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue Dec  4 07:45:36 UTC 2012

Modified Files:
othersrc/external/bsd/vmdk/dist: libvmdk.c

Log Message:
feedback from fuzz testing - check function arguments on input


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/vmdk/dist/libvmdk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/vmdk/dist/libvmdk.c
diff -u othersrc/external/bsd/vmdk/dist/libvmdk.c:1.1.1.1 othersrc/external/bsd/vmdk/dist/libvmdk.c:1.2
--- othersrc/external/bsd/vmdk/dist/libvmdk.c:1.1.1.1	Sat Jan  7 03:11:15 2012
+++ othersrc/external/bsd/vmdk/dist/libvmdk.c	Tue Dec  4 07:45:36 2012
@@ -224,6 +224,9 @@ vmdk_make_vmdk(const char *vmname, int s
 	FILE	*vmdk;
 	int	 ret;
 
+	if (vmname == NULL) {
+		return 0;
+	}
 	(void) snprintf(vmdkname, sizeof(vmdkname), %s.vmdk, vmname);
 	if ((vmdk = fopen(vmdkname, w)) == NULL) {
 		warn(can't open vmdk file '%s', vmdkname);
@@ -247,6 +250,9 @@ vmdk_file_to_vmdk(const char *vmname, co
 	FILE		*img;
 	int		 ret;
 
+	if (vmname == NULL || imgname == NULL) {
+		return 0;
+	}
 	(void) snprintf(vmdkname, sizeof(vmdkname), %s.vmdk, vmname);
 	if ((vmdk = fopen(vmdkname, w)) == NULL) {
 		warn(can't open vmdk file '%s', vmdkname);
@@ -280,6 +286,9 @@ vmdk_make_extent(const char *img, uint64
 	FILE		*fp;
 	int		 ret;
 
+	if (img == NULL) {
+		return 0;
+	}
 	if ((fp = fopen(img, w)) == NULL) {
 		warn(can't write to image '%s', img);
 		return 0;
@@ -301,6 +310,9 @@ vmdk_list_extent(const char *img)
 	FILE			*fp;
 	int			 ret;
 
+	if (img == NULL) {
+		return 0;
+	}
 	(void) memset(header, 0x0, sizeof(header));
 	if ((fp = fopen(img, r)) == NULL) {
 		warn(can't read from image '%s', img);



CVS commit: othersrc/external/bsd/vmdk/dist

2012-01-07 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Sat Jan  7 11:06:31 UTC 2012

Modified Files:
othersrc/external/bsd/vmdk/dist: libvmdk.3

Log Message:
Describe libvmdk in Nd, not libjson :)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/vmdk/dist/libvmdk.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/vmdk/dist/libvmdk.3
diff -u othersrc/external/bsd/vmdk/dist/libvmdk.3:1.1.1.1 othersrc/external/bsd/vmdk/dist/libvmdk.3:1.2
--- othersrc/external/bsd/vmdk/dist/libvmdk.3:1.1.1.1	Sat Jan  7 03:11:14 2012
+++ othersrc/external/bsd/vmdk/dist/libvmdk.3	Sat Jan  7 11:06:30 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: libvmdk.3,v 1.1.1.1 2012/01/07 03:11:14 agc Exp $
+.\ $NetBSD: libvmdk.3,v 1.2 2012/01/07 11:06:30 wiz Exp $
 .\
 .\ Copyright (c) 2012 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -28,7 +28,7 @@
 .Os
 .Sh NAME
 .Nm libvmdk
-.Nd minimalist JSON lightweight data interchange library
+.Nd VMDK (Virtual Machine Disk files) handling library
 .Sh LIBRARY
 .Lb libvmdk
 .Sh SYNOPSIS



CVS commit: othersrc/external/bsd/vmdk/dist

2012-01-07 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Sat Jan  7 11:06:56 UTC 2012

Modified Files:
othersrc/external/bsd/vmdk/dist: vmdk.8

Log Message:
Remove trailing whitespace. Remove Pp before section.
Sort sections. Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/vmdk/dist/vmdk.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/vmdk/dist/vmdk.8
diff -u othersrc/external/bsd/vmdk/dist/vmdk.8:1.1.1.1 othersrc/external/bsd/vmdk/dist/vmdk.8:1.2
--- othersrc/external/bsd/vmdk/dist/vmdk.8:1.1.1.1	Sat Jan  7 03:11:15 2012
+++ othersrc/external/bsd/vmdk/dist/vmdk.8	Sat Jan  7 11:06:56 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: vmdk.8,v 1.1.1.1 2012/01/07 03:11:15 agc Exp $
+.\ $NetBSD: vmdk.8,v 1.2 2012/01/07 11:06:56 wiz Exp $
 .\
 .\ Copyright (c) 2012 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -38,17 +38,17 @@
 .Sh DESCRIPTION
 The
 .Nm
-creates and manages VMDK vistual disk images.
+creates and manages VMDK virtual disk images.
 These images can be sparse, and allow a much
 larger virtual disk to be built up from smaller disk extents.
 It uses
 .Xr libvmdk 3
 to generate and list the VMDK information.
 The information in the VMDK extents can be listed using the
-.Fl Ar l 
+.Fl Ar l
 argument.
 To generate a new, sparse VMDK descriptor and extents,
-the 
+the
 .Fl s Ar size
 argument is used.
 The size can either be given in bytes, or as
@@ -61,7 +61,11 @@ suffix, accordingly.
 To convert from an existing file, the
 .Fl f Ar filename
 argument is used.
-.Pp
+.Sh EXIT STATUS
+The
+.Nm
+utility will return 0 for success,
+and 1 otherwise.
 .Sh EXAMPLES
 To generate a new image called
 .Dq new128m
@@ -69,7 +73,7 @@ consisting of 128MiB:
 .Bd -literal
 % vmdk -s 128m new128m
 [new128m.vmdk 134217728 bytes]
-% vmdk -l new128m-s001.vmdk 
+% vmdk -l new128m-s001.vmdk
 magicNumber: 0x564d444b
 version: 1
 flags: 0x03
@@ -97,7 +101,7 @@ Converting an existing file is accomplis
 128+0 records out
 134217728 bytes transferred in 2.269 secs (59152810 bytes/sec)
 % vmdk -f flat128m vmdkflat128m
-% vmdk -l vmdkflat128m.vmdk 
+% vmdk -l vmdkflat128m.vmdk
 magicNumber: 0x564d444b
 version: 1
 flags: 0x03
@@ -118,7 +122,7 @@ compressAlgorithm: 
 % ls -l
 -rw-r--r--   1 agc  agc  134217728 Jan  1 10:28 flat128m
 -rw-r--r--   1 agc  agc  134218752 Jan  1 10:28 vmdkflat128m.vmdk
-% od -c vmdkflat128m.vmdk 
+% od -c vmdkflat128m.vmdk
 000K   D   M   V 001  \e0  \e0  \e0 003  \e0  \e0  \e0  \e0  \e0 004  \e0
 020   \e0  \e0  \e0  \e0 200  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0
 040   \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0 002  \e0  \e0
@@ -135,13 +139,13 @@ compressAlgorithm: 
 0001140E   x   t   e   n   t   d   e   s   c   r   i   p   t
 0001160i   o   n  \en   R   W   2   6   2   1   4   4   S   P
 0001200A   R   S   E  v   m   d   k   f   l   a   t   1   2
-00012208   m   .   v   m   d   k \en  \en   #   T   h   e
+00012208   m   .   v   m   d   k \en  \en   #   T   h   e
 0001240D   i   s   k   D   a   t   a   B   a   s   e  \en   #
 0001260D   D   B  \en  \en   d   d   b   .   a   d   a   p   t   e   r
 0001300T   y   p   e   =  i   d   e \en   d   d
 0001320b   .   g   e   o   m   e   t   r   y   .   s   e   c   t   o
 0001340r   s   =  6   3 \en   d   d   b   .   g
-0001360e   o   m   e   t   r   y   .   h   e   a   d   s   =
+0001360e   o   m   e   t   r   y   .   h   e   a   d   s   =
 0001400   1   6 \en   d   d   b   .   g   e   o   m   e   t
 0001420r   y   .   c   y   l   i   n   d   e   r   s   =   
 00014402   6   0 \en   d   d   b   .   v   i   r   t   u   a   l
@@ -151,11 +155,6 @@ compressAlgorithm: 
 102000
 %
 .Ed
-.Sh EXIT STATUS
-The
-.Nm
-utility will return 0 for success,
-and 1 otherwise.
 .Sh SEE ALSO
 .Xr libvmdk 3
 .Sh HISTORY



CVS commit: othersrc/external/bsd/vmdk

2012-01-06 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Sat Jan  7 03:11:15 UTC 2012

Update of /cvsroot/othersrc/external/bsd/vmdk
In directory ivanova.netbsd.org:/tmp/cvs-serv11595

Log Message:
initial import of vmdk, a library and program to make and list VMDK
images - currently supports monolithicSparse and twoGbMaxExtentSparse
types of VMDK files.

Status:

Vendor Tag: CROOKS
Release Tags:   vmdk-base

N othersrc/external/bsd/vmdk/Makefile
N othersrc/external/bsd/vmdk/dist/Makefile
N othersrc/external/bsd/vmdk/dist/TODO
N othersrc/external/bsd/vmdk/dist/libvmdk.3
N othersrc/external/bsd/vmdk/dist/libvmdk.c
N othersrc/external/bsd/vmdk/dist/main.c
N othersrc/external/bsd/vmdk/dist/vmdk.8
N othersrc/external/bsd/vmdk/dist/vmdk.h
N othersrc/external/bsd/vmdk/lib/Makefile
N othersrc/external/bsd/vmdk/lib/shlib_version
N othersrc/external/bsd/vmdk/usr.sbin/Makefile

No conflicts created by this import