Date: Wed, 22 Aug 2012 23:02:25 +0400 From: Andrey Zonov <zont@FreeBSD.org> To: Hiroki Sato <hrs@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239562 - head/usr.sbin/makefs Message-ID: <50352CC1.8030608@FreeBSD.org> In-Reply-To: <201208220637.q7M6bVb3082106@svn.freebsd.org> References: <201208220637.q7M6bVb3082106@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 8/22/12 10:37 AM, Hiroki Sato wrote: > Author: hrs > Date: Wed Aug 22 06:37:30 2012 > New Revision: 239562 > URL: http://svn.freebsd.org/changeset/base/239562 > > Log: > Add -p flag to create the image as a sparse file. > > Submitted by: Shesha Sreenivasamurthy > PR: bin/167779 > > Modified: > head/usr.sbin/makefs/ffs.c > head/usr.sbin/makefs/makefs.8 > head/usr.sbin/makefs/makefs.c > head/usr.sbin/makefs/makefs.h > [snip] > > Modified: head/usr.sbin/makefs/makefs.c > ============================================================================== > --- head/usr.sbin/makefs/makefs.c Wed Aug 22 05:38:06 2012 (r239561) > +++ head/usr.sbin/makefs/makefs.c Wed Aug 22 06:37:30 2012 (r239562) > @@ -112,7 +112,7 @@ main(int argc, char *argv[]) > start_time.tv_sec = start.tv_sec; > start_time.tv_nsec = start.tv_usec * 1000; > > - while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:o:s:S:t:x")) != -1) { > + while ((ch = getopt(argc, argv, "B:b:d:f:F:M:m:N:o:ps:S:t:x")) != -1) { > switch (ch) { > > case 'B': > @@ -199,6 +199,9 @@ main(int argc, char *argv[]) > } > break; > } > + case 'p': > + fsoptions.sparse = 1; > + break; > > case 's': > fsoptions.minsize = fsoptions.maxsize = > @@ -346,7 +349,7 @@ usage(void) > fprintf(stderr, > "usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n" > "\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n" > -"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x]\n" > +"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-x] [-p]\n" style(9) violation. Options should be sorted. > "\t[-N userdb-dir] image-file directory | manifest [extra-directory ...]\n", > prog); > exit(1); > > Modified: head/usr.sbin/makefs/makefs.h > ============================================================================== > --- head/usr.sbin/makefs/makefs.h Wed Aug 22 05:38:06 2012 (r239561) > +++ head/usr.sbin/makefs/makefs.h Wed Aug 22 06:37:30 2012 (r239562) > @@ -129,6 +129,7 @@ typedef struct { > int freeblockpc; /* free block % */ > int needswap; /* non-zero if byte swapping needed */ > int sectorsize; /* sector size */ > + int sparse; /* sparse image, don't fill it with zeros */ > > void *fs_specific; /* File system specific additions. */ > } fsinfo_t; > -- Andrey Zonov [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJQNSzFAAoJEBWLemxX/CvT64AIAJ29hDJZLovM6XUzHkVUVflw n+3401/rVZbdbSA6XewJjdRARbhurjDfrDLipXuRxjKYAo0+x7cEN5w2EW/qKCw8 WmvO3ATF9hWlH0u6Y3oXMRJml0C6QirMtH2Pe7UdtEId+iJoVVePz6zxFw58x1NZ aCduPDdRXKthCdCc+Xf/j3DNdkL6IyN2c92BTAyO75Jjq7XVEca+qS6kh5q0pvBI xxQZ6TYFYFH+RXFxjqWpBjpPc/5hjauO46l9aPx4nBlVKetm3YfGPPGNEN7IVLH4 zHW1DCs9jW4WeODKKAbm94U0Paz9+e3UrqwADmPGQJk2YT7o9A7FV+ChGwuQVbc= =KqYW -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50352CC1.8030608>
