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