Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/testdisk/files/
Date: Fri, 01 Jul 2016 08:02:49
Message-Id: 1467358477.acb49daeaf26ebab6210b18e54d65cce7ab39467.monsieurp@gentoo
1 commit: acb49daeaf26ebab6210b18e54d65cce7ab39467
2 Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Thu Jun 30 17:57:33 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 1 07:34:37 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acb49dae
7
8 app-admin/testdisk: remove unused patches
9
10 Closes: https://github.com/gentoo/gentoo/pull/1805
11
12 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
13
14 app-admin/testdisk/files/fix_rare_crash-6.14.patch | 227 ---------------------
15 app-admin/testdisk/files/install-gentoo.patch | 25 ---
16 2 files changed, 252 deletions(-)
17
18 diff --git a/app-admin/testdisk/files/fix_rare_crash-6.14.patch b/app-admin/testdisk/files/fix_rare_crash-6.14.patch
19 deleted file mode 100644
20 index 913be7e..0000000
21 --- a/app-admin/testdisk/files/fix_rare_crash-6.14.patch
22 +++ /dev/null
23 @@ -1,227 +0,0 @@
24 -From a2676d349a975a142f1119c0aecb435e1b0db8b8 Mon Sep 17 00:00:00 2001
25 -From: Christophe Grenier <grenier@××××××××××.org>
26 -Date: Sat, 14 Jun 2014 12:08:59 +0200
27 -Subject: TestDisk: fix rare crash when listing NTFS directories
28 -
29 -
30 -diff --git a/src/ntfs_dir.c b/src/ntfs_dir.c
31 -index d416cea..b51c63d 100644
32 ---- a/src/ntfs_dir.c
33 -+++ b/src/ntfs_dir.c
34 -@@ -167,7 +167,15 @@ static int ntfs_td_list_entry( struct ntfs_dir_struct *ls, const ntfschar *name
35 - const MFT_REF mref, const unsigned dt_type)
36 - {
37 - int result = 0;
38 -- char *filename = (char *)calloc (1, MAX_PATH);
39 -+ char *filename;
40 -+ ntfs_inode *ni;
41 -+ ntfs_attr_search_ctx *ctx_si = NULL;
42 -+ file_info_t *new_file=NULL;
43 -+ /* Keep FILE_NAME_WIN32 and FILE_NAME_POSIX */
44 -+ if ((name_type & FILE_NAME_WIN32_AND_DOS) == FILE_NAME_DOS)
45 -+ return 0;
46 -+
47 -+ filename = (char *)calloc (1, MAX_PATH);
48 - if (!filename)
49 - {
50 - log_critical("ntfs_td_list_entry calloc failed\n");
51 -@@ -178,118 +186,111 @@ static int ntfs_td_list_entry( struct ntfs_dir_struct *ls, const ntfschar *name
52 - if (ntfs_ucstoutf8(ls->cd, name, name_len, &filename, MAX_PATH) < 0 &&
53 - ntfs_ucstombs (name, name_len, &filename, MAX_PATH) < 0) {
54 - log_error("Cannot represent filename in current locale.\n");
55 -- goto free;
56 -+ goto freefn;
57 - }
58 - #else
59 - if (ntfs_ucstombs (name, name_len, &filename, MAX_PATH) < 0) {
60 - log_error("Cannot represent filename in current locale.\n");
61 -- goto free;
62 -+ goto freefn;
63 - }
64 - #endif
65 -
66 - result = 0; /* These are successful */
67 - if (MREF(mref) < FILE_first_user && filename[0] == '$') /* Hide system file */
68 -- goto free;
69 -- /* Keep FILE_NAME_WIN32 and FILE_NAME_POSIX */
70 -- if ((name_type & FILE_NAME_WIN32_AND_DOS) == FILE_NAME_DOS)
71 -- goto free;
72 -- {
73 -- ntfs_inode *ni;
74 -- ntfs_attr_search_ctx *ctx_si = NULL;
75 -- file_info_t *new_file=NULL;
76 -+ goto freefn;
77 -+ result = -1; /* Everything else is bad */
78 -
79 -- result = -1; /* Everything else is bad */
80 -+ ni = ntfs_inode_open(ls->vol, mref);
81 -+ if (!ni)
82 -+ goto freefn;
83 -+ new_file=(file_info_t*)MALLOC(sizeof(*new_file));
84 -+ new_file->status=0;
85 -+ new_file->st_ino=MREF(mref);
86 -+ new_file->st_uid=0;
87 -+ new_file->st_gid=0;
88 -
89 -- ni = ntfs_inode_open(ls->vol, mref);
90 -- if (!ni)
91 -- goto release;
92 -- new_file=(file_info_t*)MALLOC(sizeof(*new_file));
93 -- new_file->status=0;
94 -- td_list_add_tail(&new_file->list, &ls->dir_list->list);
95 -- new_file->st_ino=MREF(mref);
96 -- new_file->st_uid=0;
97 -- new_file->st_gid=0;
98 --
99 -- ctx_si = ntfs_attr_get_search_ctx(ni, ni->mrec);
100 -- if (ctx_si)
101 -+ ctx_si = ntfs_attr_get_search_ctx(ni, ni->mrec);
102 -+ if (ctx_si)
103 -+ {
104 -+ if (ntfs_attr_lookup(AT_STANDARD_INFORMATION, AT_UNNAMED, 0, CASE_SENSITIVE, 0, NULL, 0, ctx_si)==0)
105 - {
106 -- if (ntfs_attr_lookup(AT_STANDARD_INFORMATION, AT_UNNAMED, 0, CASE_SENSITIVE, 0, NULL, 0, ctx_si)==0)
107 -+ const ATTR_RECORD *attr = ctx_si->attr;
108 -+ const STANDARD_INFORMATION *si = (const STANDARD_INFORMATION*)((const char*)attr +
109 -+ le16_to_cpu(attr->value_offset));
110 -+ if(si)
111 - {
112 -- const ATTR_RECORD *attr = ctx_si->attr;
113 -- const STANDARD_INFORMATION *si = (const STANDARD_INFORMATION*)((const char*)attr +
114 -- le16_to_cpu(attr->value_offset));
115 -- if(si)
116 -- {
117 -- new_file->td_atime=td_ntfs2utc(sle64_to_cpu(si->last_access_time));
118 -- new_file->td_mtime=td_ntfs2utc(sle64_to_cpu(si->last_data_change_time));
119 -- new_file->td_ctime=td_ntfs2utc(sle64_to_cpu(si->creation_time));
120 -- }
121 -+ new_file->td_atime=td_ntfs2utc(sle64_to_cpu(si->last_access_time));
122 -+ new_file->td_mtime=td_ntfs2utc(sle64_to_cpu(si->last_data_change_time));
123 -+ new_file->td_ctime=td_ntfs2utc(sle64_to_cpu(si->creation_time));
124 - }
125 -- ntfs_attr_put_search_ctx(ctx_si);
126 - }
127 -+ ntfs_attr_put_search_ctx(ctx_si);
128 -+ }
129 -+ {
130 -+ ATTR_RECORD *rec;
131 -+ int first=1;
132 -+ ntfs_attr_search_ctx *ctx = NULL;
133 -+ if (dt_type == NTFS_DT_DIR)
134 - {
135 -- ATTR_RECORD *rec;
136 -- int first=1;
137 -- ntfs_attr_search_ctx *ctx = NULL;
138 -- if (dt_type == NTFS_DT_DIR)
139 -+ new_file->name=strdup(filename);
140 -+ new_file->st_mode = LINUX_S_IFDIR| LINUX_S_IRUGO | LINUX_S_IXUGO;
141 -+ new_file->st_size=0;
142 -+ td_list_add_tail(&new_file->list, &ls->dir_list->list);
143 -+ first=0;
144 -+ }
145 -+ ctx = ntfs_attr_get_search_ctx(ni, ni->mrec);
146 -+ /* A file has always an unnamed date stream and
147 -+ * may have named alternate data streams (ADS) */
148 -+ while((rec = find_attribute(AT_DATA, ctx)))
149 -+ {
150 -+ const s64 filesize = ntfs_get_attribute_value_length(ctx->attr);
151 -+ if(rec->name_length &&
152 -+ (ls->dir_data->param & FLAG_LIST_ADS)!=FLAG_LIST_ADS)
153 -+ continue;
154 -+ if(first==0)
155 - {
156 -- new_file->name=strdup(filename);
157 -- new_file->st_mode = LINUX_S_IFDIR| LINUX_S_IRUGO | LINUX_S_IXUGO;
158 -- new_file->st_size=0;
159 -- td_list_add_tail(&new_file->list, &ls->dir_list->list);
160 -- first=0;
161 -+ const file_info_t *old_file=new_file;
162 -+ new_file=(file_info_t *)MALLOC(sizeof(*new_file));
163 -+ memcpy(new_file, old_file, sizeof(*new_file));
164 - }
165 -- ctx = ntfs_attr_get_search_ctx(ni, ni->mrec);
166 -- /* A file has always an unnamed date stream and
167 -- * may have named alternate data streams (ADS) */
168 -- while((rec = find_attribute(AT_DATA, ctx)))
169 -+ new_file->st_mode = LINUX_S_IFREG | LINUX_S_IRUGO;
170 -+ new_file->st_size=filesize;
171 -+ if (rec->name_length)
172 - {
173 -- const s64 filesize = ntfs_get_attribute_value_length(ctx->attr);
174 -- if(rec->name_length &&
175 -- (ls->dir_data->param & FLAG_LIST_ADS)!=FLAG_LIST_ADS)
176 -- continue;
177 -- if(first==0)
178 -- {
179 -- const file_info_t *old_file=new_file;
180 -- new_file=(file_info_t *)MALLOC(sizeof(*new_file));
181 -- memcpy(new_file, old_file, sizeof(*new_file));
182 -- }
183 -- new_file->st_mode = LINUX_S_IFREG | LINUX_S_IRUGO;
184 -- new_file->st_size=filesize;
185 -- if (rec->name_length)
186 -+ char *stream_name=NULL;
187 -+ new_file->status=FILE_STATUS_ADS;
188 -+ new_file->name = (char *)MALLOC(MAX_PATH);
189 -+ if (ntfs_ucstombs((ntfschar *) ((char *) rec + le16_to_cpu(rec->name_offset)),
190 -+ rec->name_length, &stream_name, 0) < 0)
191 - {
192 -- char *stream_name=NULL;
193 -- new_file->status=FILE_STATUS_ADS;
194 -- new_file->name = (char *)MALLOC(MAX_PATH);
195 -- if (ntfs_ucstombs((ntfschar *) ((char *) rec + le16_to_cpu(rec->name_offset)),
196 -- rec->name_length, &stream_name, 0) < 0)
197 -- {
198 -- log_error("ERROR: Cannot translate name into current locale.\n");
199 -- snprintf(new_file->name, MAX_PATH, "%s:???", filename);
200 -- }
201 -- else
202 -- {
203 -- snprintf(new_file->name, MAX_PATH, "%s:%s", filename, stream_name);
204 -- }
205 -- free(stream_name);
206 -+ log_error("ERROR: Cannot translate name into current locale.\n");
207 -+ snprintf(new_file->name, MAX_PATH, "%s:???", filename);
208 - }
209 - else
210 - {
211 -- new_file->name=strdup(filename);
212 -+ snprintf(new_file->name, MAX_PATH, "%s:%s", filename, stream_name);
213 - }
214 -- td_list_add_tail(&new_file->list, &ls->dir_list->list);
215 -- first=0;
216 -+ free(stream_name);
217 - }
218 -- ntfs_attr_put_search_ctx(ctx);
219 -+ else
220 -+ {
221 -+ new_file->name=strdup(filename);
222 -+ }
223 -+ td_list_add_tail(&new_file->list, &ls->dir_list->list);
224 -+ first=0;
225 -+ }
226 -+ ntfs_attr_put_search_ctx(ctx);
227 -+ if(first)
228 -+ {
229 -+ free(new_file);
230 - }
231 --
232 -- result = 0;
233 --release:
234 -- /* close the inode. */
235 -- if (ni)
236 -- ntfs_inode_close(ni);
237 - }
238 --free:
239 -+
240 -+ result = 0;
241 -+ /* close the inode. */
242 -+ if (ni)
243 -+ ntfs_inode_close(ni);
244 -+freefn:
245 - free (filename);
246 - return result;
247 - }
248 ---
249 -cgit v0.10.2
250 -
251
252 diff --git a/app-admin/testdisk/files/install-gentoo.patch b/app-admin/testdisk/files/install-gentoo.patch
253 deleted file mode 100644
254 index 08a3944..0000000
255 --- a/app-admin/testdisk/files/install-gentoo.patch
256 +++ /dev/null
257 @@ -1,25 +0,0 @@
258 ---- Makefile.am-original 2015-04-20 11:31:03.000000000 -0600
259 -+++ Makefile.am 2015-04-20 13:27:01.000000000 -0600
260 -@@ -1,9 +1,8 @@
261 - SUBDIRS = icons man src
262 -
263 --EXTRA_DIST = AUTHORS COPYING ChangeLog INFO INSTALL NEWS README THANKS compile.sh \
264 -+EXTRA_DIST = compile.sh \
265 - progsreiserfs-journal.patch progsreiserfs-file-read.patch \
266 - darwin/readme_mac_powerpc.txt darwin/readme_mac_intel.txt \
267 -- documentation.html \
268 - dos/readme.txt \
269 - linux/testdisk.spec.in \
270 - linux/qphotorec.desktop \
271 -@@ -24,9 +23,9 @@
272 -
273 - AUTOMAKE_OPTIONS = gnits
274 -
275 -+dist_doc_DATA = AUTHORS COPYING ChangeLog NEWS INFO INSTALL README THANKS documentation.html
276 -+
277 - install-data-hook:
278 -- $(mkinstalldirs) $(DESTDIR)$(docdir)
279 -- $(INSTALL_DATA) $(top_srcdir)/AUTHORS $(top_srcdir)/ChangeLog $(top_srcdir)/NEWS $(top_srcdir)/README $(top_srcdir)/THANKS $(top_srcdir)/documentation.html $(DESTDIR)$(docdir)
280 - if USEQT
281 - $(mkinstalldirs) $(DESTDIR)$(datadir)/applications
282 - $(INSTALL_DATA) $(top_srcdir)/linux/qphotorec.desktop $(DESTDIR)$(datadir)/applications