Date: Mon, 9 Dec 2013 06:59:43 +0000 (UTC) From: Hiroki Sato <hrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r259119 - user/hrs/releng/usr.sbin/makevd Message-ID: <201312090659.rB96xhpE066176@svn.freebsd.org>
index | next in thread | raw e-mail
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 <bsd.prog.mk> 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 <hrs@FreeBSD.org> All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include <err.h> #include <fcntl.h> -#include <libgen.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -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 <hrs@FreeBSD.org> 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;help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312090659.rB96xhpE066176>
