diff options
Diffstat (limited to 'meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch')
-rw-r--r-- | meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch b/meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch deleted file mode 100644 index 3ac41280bb..0000000000 --- a/meta/packages/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2.patch +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- mtd/util/mkfs.jffs2.c~add-exclusion-to-mkfs-jffs2.patch | ||
7 | +++ mtd/util/mkfs.jffs2.c | ||
8 | @@ -92,7 +92,12 @@ | ||
9 | struct filesystem_entry *files; /* Only relevant to directories */ | ||
10 | }; | ||
11 | |||
12 | +struct ignorepath_entry { | ||
13 | + struct ignorepath_entry* next; /* Points to the next ignorepath element */ | ||
14 | + char name[PATH_MAX]; /* Name of the entry */ | ||
15 | +}; | ||
16 | |||
17 | +static struct ignorepath_entry* ignorepath = 0; | ||
18 | static int out_fd = -1; | ||
19 | static int in_fd = -1; | ||
20 | static char default_rootdir[] = "."; | ||
21 | @@ -367,6 +372,7 @@ | ||
22 | char *hpath, *tpath; | ||
23 | struct dirent *dp, **namelist; | ||
24 | struct filesystem_entry *entry; | ||
25 | + struct ignorepath_entry* element = ignorepath; | ||
26 | |||
27 | |||
28 | if (lstat(hostpath, &sb)) { | ||
29 | @@ -376,6 +382,15 @@ | ||
30 | entry = add_host_filesystem_entry(targetpath, hostpath, | ||
31 | sb.st_uid, sb.st_gid, sb.st_mode, 0, parent); | ||
32 | |||
33 | + while ( element ) { | ||
34 | + if ( strcmp( element->name, targetpath ) == 0 ) { | ||
35 | + printf( "Note: ignoring directories below '%s'\n", targetpath ); | ||
36 | + return entry; | ||
37 | + break; | ||
38 | + } | ||
39 | + element = element->next; | ||
40 | + } | ||
41 | + | ||
42 | n = scandir(hostpath, &namelist, 0, alphasort); | ||
43 | if (n < 0) { | ||
44 | perror_msg_and_die("opening directory %s", hostpath); | ||
45 | @@ -1147,6 +1162,7 @@ | ||
46 | {"root", 1, NULL, 'r'}, | ||
47 | {"pagesize", 1, NULL, 's'}, | ||
48 | {"eraseblock", 1, NULL, 'e'}, | ||
49 | + {"ignore", 1, NULL, 'I'}, | ||
50 | {"output", 1, NULL, 'o'}, | ||
51 | {"help", 0, NULL, 'h'}, | ||
52 | {"verbose", 0, NULL, 'v'}, | ||
53 | @@ -1189,6 +1205,7 @@ | ||
54 | " -L, --list-compressors Show the list of the avaiable compressors\n" | ||
55 | " -t, --test-compression Call decompress and compare with the original (for test)\n" | ||
56 | " -n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock\n" | ||
57 | + " -I, --ignore=PATH Ignore sub directory and file tree below PATH when recursing over the file system\n" | ||
58 | " -o, --output=FILE Output to FILE (default: stdout)\n" | ||
59 | " -l, --little-endian Create a little-endian filesystem\n" | ||
60 | " -b, --big-endian Create a big-endian filesystem\n" | ||
61 | @@ -1349,11 +1366,12 @@ | ||
62 | struct filesystem_entry *root; | ||
63 | char *compr_name = NULL; | ||
64 | int compr_prior = -1; | ||
65 | + struct ignorepath_entry* element = ignorepath; | ||
66 | |||
67 | jffs2_compressors_init(); | ||
68 | |||
69 | while ((opt = getopt_long(argc, argv, | ||
70 | - "D:d:r:s:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) | ||
71 | + "D:d:r:s:I:o:qUPfh?vVe:lbp::nc:m:x:X:Lty:i:", long_options, &c)) >= 0) | ||
72 | { | ||
73 | switch (opt) { | ||
74 | case 'D': | ||
75 | @@ -1376,6 +1394,28 @@ | ||
76 | page_size = strtol(optarg, NULL, 0); | ||
77 | break; | ||
78 | |||
79 | + case 'I': | ||
80 | + printf( "Note: Adding '%s' to ignore Path\n", optarg ); | ||
81 | + element = ignorepath; | ||
82 | + if ( !ignorepath ) { | ||
83 | + ignorepath = xmalloc( sizeof( struct ignorepath_entry ) ); | ||
84 | + ignorepath->next = 0; | ||
85 | + strcpy( &ignorepath->name[0], optarg ); | ||
86 | + } else { | ||
87 | + while ( element->next ) element = element->next; | ||
88 | + element->next = xmalloc( sizeof( struct ignorepath_entry ) ); | ||
89 | + element->next->next = 0; | ||
90 | + strcpy( &element->next->name[0], optarg ); | ||
91 | + } | ||
92 | + printf( "--------- Dumping ignore path list ----------------\n" ); | ||
93 | + element = ignorepath; | ||
94 | + while ( element ) { | ||
95 | + printf( " * '%s'\n", &element->name[0] ); | ||
96 | + element = element->next; | ||
97 | + } | ||
98 | + printf( "---------------------------------------------------\n" ); | ||
99 | + break; | ||
100 | + | ||
101 | case 'o': | ||
102 | if (out_fd != -1) { | ||
103 | error_msg_and_die("output filename specified more than once"); | ||