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