From owner-svn-src-user@FreeBSD.ORG Mon Dec 9 06:59:44 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37C46144; Mon, 9 Dec 2013 06:59:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 240831953; Mon, 9 Dec 2013 06:59:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB96xi7S066180; Mon, 9 Dec 2013 06:59:44 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB96xhpE066176; Mon, 9 Dec 2013 06:59:43 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201312090659.rB96xhpE066176@svn.freebsd.org> From: Hiroki Sato Date: Mon, 9 Dec 2013 06:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r259119 - user/hrs/releng/usr.sbin/makevd X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 06:59:44 -0000 Author: hrs Date: Mon Dec 9 06:59:43 2013 New Revision: 259119 URL: http://svnweb.freebsd.org/changeset/base/259119 Log: Revert accidentally merged changes in the previous commit. Modified: user/hrs/releng/usr.sbin/makevd/Makefile user/hrs/releng/usr.sbin/makevd/makevd.c user/hrs/releng/usr.sbin/makevd/makevd.h user/hrs/releng/usr.sbin/makevd/raw.c Modified: user/hrs/releng/usr.sbin/makevd/Makefile ============================================================================== --- user/hrs/releng/usr.sbin/makevd/Makefile Mon Dec 9 05:01:38 2013 (r259118) +++ user/hrs/releng/usr.sbin/makevd/Makefile Mon Dec 9 06:59:43 2013 (r259119) @@ -10,9 +10,4 @@ SRCS= makevd.c \ WARNS?= 6 CFLAGS+= -I${.CURDIR} -MLINKS= makevd.8 dumpvd.8 - -afterinstall: - ln -f ${BINDIR}/${PROG} ${BINDIR}/dumpvd - .include Modified: user/hrs/releng/usr.sbin/makevd/makevd.c ============================================================================== --- user/hrs/releng/usr.sbin/makevd/makevd.c Mon Dec 9 05:01:38 2013 (r259118) +++ user/hrs/releng/usr.sbin/makevd/makevd.c Mon Dec 9 06:59:43 2013 (r259119) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011,2012,2013 + * Copyright (c) 2011 * Hiroki Sato All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -51,20 +50,11 @@ static LIST_HEAD(optlisthead_t, optlist) static struct imtype { const char *imt_type; int (*imt_makeim)(struct iminfo *); - int (*imt_dumpim)(struct iminfo *); } imtypes[] = { - { .imt_type = "vhd", - .imt_makeim = vhd_makeim, - .imt_dumpim = vhd_dumpim, }, - { .imt_type = "vmdk", - .imt_makeim = vmdk_makeim, - .imt_dumpim = vmdk_dumpim, }, - { .imt_type = "none", - .imt_makeim = raw_makeim, - .imt_dumpim = raw_dumpim, }, - { .imt_type = "raw", - .imt_makeim = raw_makeim, - .imt_dumpim = raw_dumpim, }, + { "vhd", vhd_makeim }, + { "vmdk", vmdk_makeim }, + { "none", raw_makeim }, + { "raw", raw_makeim }, { .imt_type = NULL }, }; @@ -79,13 +69,11 @@ main(int argc, char *argv[]) struct optlist *opl; struct stat sb; int ch; - int dump; int ifd; int opl_new; char *val; setprogname(argv[0]); - dump = (strcmp(basename(argv[0]), "dumpvd") == 0); if ((imt = get_imtype(DEFAULT_IMTYPE)) == NULL) errx(1, "Unknown default image type `%s'.", DEFAULT_IMTYPE); @@ -187,10 +175,7 @@ main(int argc, char *argv[]) if (imi.imi_imagename == NULL) imi.imi_imagename = strdup(argv[0]); - if (dump) - imt->imt_makeim(&imi); - else - imt->imt_dumpim(&imi); + imt->imt_makeim(&imi); return (0); } Modified: user/hrs/releng/usr.sbin/makevd/makevd.h ============================================================================== --- user/hrs/releng/usr.sbin/makevd/makevd.h Mon Dec 9 05:01:38 2013 (r259118) +++ user/hrs/releng/usr.sbin/makevd/makevd.h Mon Dec 9 06:59:43 2013 (r259119) @@ -50,11 +50,8 @@ struct optlist { }; int vhd_makeim(struct iminfo *); -int vhd_dumpim(struct iminfo *); int vmdk_makeim(struct iminfo *); -int vmdk_dumpim(struct iminfo *); int raw_makeim(struct iminfo *); -int raw_dumpim(struct iminfo *); #ifndef DEFAULT_IMTYPE #define DEFAULT_IMTYPE "raw" Modified: user/hrs/releng/usr.sbin/makevd/raw.c ============================================================================== --- user/hrs/releng/usr.sbin/makevd/raw.c Mon Dec 9 05:01:38 2013 (r259118) +++ user/hrs/releng/usr.sbin/makevd/raw.c Mon Dec 9 06:59:43 2013 (r259119) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011,2012,2013 + * Copyright (c) 2011 * Hiroki Sato All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,17 +48,6 @@ __FBSDID("$FreeBSD$"); #include "common.h" int -raw_dumpim(struct iminfo *imi) -{ - - printf("raw format:\n"); - printf("\timagename (size): %s (%d bytes)\n", imi->imi_imagename, - 0); - - return (0); -} - -int raw_makeim(struct iminfo *imi) { struct blhead_t blhead;