mtd/util mkfs.jffs2.c,1.28,1.29

andersen at infradead.org andersen at infradead.org
Tue Nov 26 05:16:51 EST 2002


Update of /home/cvs/mtd/util
In directory phoenix.infradead.org:/tmp/cvs-serv14456

Modified Files:
	mkfs.jffs2.c 
Log Message:
Merge my latest rewrite of mkfs.jffs2, as discussed on the 
mailing list.  The code is _much_ cleaner now.  This also 
merges in a patch from Johan Adolfsson from axis.com which
provides support for cleanmarkers.
 -Erik


Index: mkfs.jffs2.c
===================================================================
RCS file: /home/cvs/mtd/util/mkfs.jffs2.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- mkfs.jffs2.c	8 Oct 2002 21:07:16 -0000	1.28
+++ mkfs.jffs2.c	26 Nov 2002 10:16:48 -0000	1.29
@@ -1,9 +1,11 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Build a JFFS2 image in a file, from a given directory tree.
  *
  * Copyright 2001, 2002 Red Hat, Inc.
  *           2001 David A. Schleef <ds at lineo.com>
- *           2001 Erik Andersen <andersen at codepoet.org>
+ *           2002 Axis Communications AB
+ *           2001, 2002 Erik Andersen <andersen at codepoet.org>
  *
  * This program is free software; you can redistribute it and/or modify
[...2010 lines suppressed...]
+		perror_msg_and_die("%s", rootdir);
+
+	if (!(cwd = getcwd(0, GETCWD_SIZE)))
+		perror_msg_and_die("getcwd failed");
+
+	root = recursive_add_host_directory(NULL, "/", cwd);
+
+	if (devtable)
+		parse_device_table(root, devtable);
+
+	create_target_filesystem(root);
+
+	cleanup(root);
+
+	if (rootdir != default_rootdir)
+		free(rootdir);
 
+	close(out_fd);
 	return 0;
 }





More information about the linux-mtd-cvs mailing list