RFC: #mtree signature
Tim Kientzle
tim at kientzle.com
Sat Aug 18 18:33:57 PDT 2007
I'm experimenting with having bsdtar able to
read mtree files and convert them into
tar archives. This works quite well, although
there is one stumbling block: libarchive
likes to auto-detect formats and the current mtree
format lacks any mandatory leading signature.
Any concerns or thoughts about the following
patch, which simply adds "#mtree" as the first
line of every mtree file?
I would also, of course, like to:
* add this signature to the FreeBSD /etc/mtree/
files as a first step towards getting this convention
to be more widely adopted and used,
* update /etc/magic to reflect this convention,
* get this added to NetBSD's "mtree" utility.
Tim Kientzle
Index: create.c
===================================================================
RCS file: /usr/cvs/FreeBSD-CVS/src/usr.sbin/mtree/create.c,v
retrieving revision 1.37
diff -u -r1.37 create.c
--- create.c 29 Mar 2005 11:44:17 -0000 1.37
+++ create.c 18 Aug 2007 23:52:06 -0000
@@ -87,6 +87,7 @@
char dot[] = ".";
int indent = 0;
+ (void)printf("#mtree\n");
if (!nflag) {
(void)time(&cl);
(void)gethostname(host, sizeof(host));
More information about the freebsd-current
mailing list