summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch')
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch136
1 files changed, 0 insertions, 136 deletions
diff --git a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch b/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
deleted file mode 100644
index 60edb8f9da..0000000000
--- a/meta/recipes-devtools/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch
+++ /dev/null
@@ -1,136 +0,0 @@
1Upstream-Status: Pending
2
3---
4 mkfs.jffs2.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
5 1 file changed, 42 insertions(+), 2 deletions(-)
6
7--- git.orig/mkfs.jffs2.c
8+++ git/mkfs.jffs2.c
9@@ -98,10 +98,16 @@ struct filesystem_entry {
10 struct filesystem_entry *next; /* Only relevant to non-directories */
11 struct filesystem_entry *files; /* Only relevant to directories */
12 struct rb_node hardlink_rb;
13 };
14
15+struct ignorepath_entry {
16+ struct ignorepath_entry* next; /* Points to the next ignorepath element */
17+ char name[PATH_MAX]; /* Name of the entry */
18+};
19+
20+static struct ignorepath_entry* ignorepath = 0;
21 struct rb_root hardlinks;
22 static int out_fd = -1;
23 static int in_fd = -1;
24 static char default_rootdir[] = ".";
25 static char *rootdir = default_rootdir;
26@@ -404,19 +410,28 @@ static struct filesystem_entry *recursiv
27 int i, n;
28 struct stat sb;
29 char *hpath, *tpath;
30 struct dirent *dp, **namelist;
31 struct filesystem_entry *entry;
32-
33+ struct ignorepath_entry* element = ignorepath;
34
35 if (lstat(hostpath, &sb)) {
36 perror_msg_and_die("%s", hostpath);
37 }
38
39 entry = add_host_filesystem_entry(targetpath, hostpath,
40 sb.st_uid, sb.st_gid, sb.st_mode, 0, parent);
41
42+ while ( element ) {
43+ if ( strcmp( element->name, targetpath ) == 0 ) {
44+ printf( "Note: ignoring directories below '%s'\n", targetpath );
45+ return entry;
46+ break;
47+ }
48+ element = element->next;
49+ }
50+
51 n = scandir(hostpath, &namelist, 0, alphasort);
52 if (n < 0) {
53 perror_msg_and_die("opening directory %s", hostpath);
54 }
55
56@@ -1446,10 +1461,11 @@ static void create_target_filesystem(str
57 static struct option long_options[] = {
58 {"pad", 2, NULL, 'p'},
59 {"root", 1, NULL, 'r'},
60 {"pagesize", 1, NULL, 's'},
61 {"eraseblock", 1, NULL, 'e'},
62+ {"ignore", 1, NULL, 'I'},
63 {"output", 1, NULL, 'o'},
64 {"help", 0, NULL, 'h'},
65 {"verbose", 0, NULL, 'v'},
66 {"version", 0, NULL, 'V'},
67 {"big-endian", 0, NULL, 'b'},
68@@ -1493,10 +1509,11 @@ static char *helptext =
69 " -y, --compressor-priority=PRIORITY:COMPRESSOR_NAME\n"
70 " Set the priority of a compressor\n"
71 " -L, --list-compressors Show the list of the avaiable compressors\n"
72 " -t, --test-compression Call decompress and compare with the original (for test)\n"
73 " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n"
74+" -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n"
75 " -o, --output=FILE Output to FILE (default: stdout)\n"
76 " -l, --little-endian Create a little-endian filesystem\n"
77 " -b, --big-endian Create a big-endian filesystem\n"
78 " -D, --devtable=FILE Use the named FILE as a device table file\n"
79 " -f, --faketime Change all file times to '0' for regression testing\n"
80@@ -1659,21 +1676,22 @@ int main(int argc, char **argv)
81 FILE *devtable = NULL;
82 struct filesystem_entry *root;
83 char *compr_name = NULL;
84 int compr_prior = -1;
85 int warn_page_size = 0;
86+ struct ignorepath_entry* element = ignorepath;
87
88 page_size = sysconf(_SC_PAGESIZE);
89 if (page_size < 0) /* System doesn't know so ... */
90 page_size = 4096; /* ... we make an educated guess */
91 if (page_size != 4096)
92 warn_page_size = 1; /* warn user if page size not 4096 */
93
94 jffs2_compressors_init();
95
96 while ((opt = getopt_long(argc, argv,
97- "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
98+ "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0)
99 {
100 switch (opt) {
101 case 'D':
102 devtable = xfopen(optarg, "r");
103 if (fstat(fileno(devtable), &sb) < 0)
104@@ -1693,10 +1711,32 @@ int main(int argc, char **argv)
105 case 's':
106 page_size = strtol(optarg, NULL, 0);
107 warn_page_size = 0; /* set by user, so don't need to warn */
108 break;
109
110+ case 'I':
111+ printf( "Note: Adding '%s' to ignore Path\n", optarg );
112+ element = ignorepath;
113+ if ( !ignorepath ) {
114+ ignorepath = xmalloc( sizeof( struct ignorepath_entry ) );
115+ ignorepath->next = 0;
116+ strcpy( &ignorepath->name[0], optarg );
117+ } else {
118+ while ( element->next ) element = element->next;
119+ element->next = xmalloc( sizeof( struct ignorepath_entry ) );
120+ element->next->next = 0;
121+ strcpy( &element->next->name[0], optarg );
122+ }
123+ printf( "--------- Dumping ignore path list ----------------\n" );
124+ element = ignorepath;
125+ while ( element ) {
126+ printf( " * '%s'\n", &element->name[0] );
127+ element = element->next;
128+ }
129+ printf( "---------------------------------------------------\n" );
130+ break;
131+
132 case 'o':
133 if (out_fd != -1) {
134 error_msg_and_die("output filename specified more than once");
135 }
136 out_fd = open(optarg, O_CREAT | O_TRUNC | O_RDWR, 0644);