Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 217552 | Differences between
and this patch

Collapse All | Expand All

(-)rzip-2.1/main.c (-1 / +15 lines)
Lines 35-40 Link Here
35
	printf("     -k            keep existing files\n");
35
	printf("     -k            keep existing files\n");
36
	printf("     -P            show compression progress\n");
36
	printf("     -P            show compression progress\n");
37
	printf("     -L level      set compression level\n");
37
	printf("     -L level      set compression level\n");
38
	printf("     -l nr         set higher bits of the expected file length to nr\n");
38
	printf("     -V            show version\n");
39
	printf("     -V            show version\n");
39
#if 0
40
#if 0
40
	/* damn, this will be quite hard to do */
41
	/* damn, this will be quite hard to do */
Lines 172-177 Link Here
172
173
173
	
174
	
174
	read_magic(fd_in, fd_out, &expected_size);
175
	read_magic(fd_in, fd_out, &expected_size);
176
177
#ifdef HAVE_LARGE_FILES
178
	if (control->nr) {
179
		expected_size = ( ((off_t)(control->nr))<<32) | (expected_size & 0xFFFFFFFF);
180
	}
181
#endif
182
175
	runzip_fd(fd_in, fd_out, fd_hist, expected_size);	
183
	runzip_fd(fd_in, fd_out, fd_hist, expected_size);	
176
	
184
	
177
	if ((control->flags & FLAG_TEST_ONLY) == 0) {
185
	if ((control->flags & FLAG_TEST_ONLY) == 0) {
Lines 267-273 Link Here
267
		control.flags |= FLAG_DECOMPRESS;
275
		control.flags |= FLAG_DECOMPRESS;
268
	}
276
	}
269
277
270
	while ((c = getopt(argc, argv, "h0123456789dS:tVvkfPo:L:")) != -1) {
278
	while ((c = getopt(argc, argv, "h0123456789dS:tVvkl:fPo:L:")) != -1) {
271
		if (isdigit(c)) {
279
		if (isdigit(c)) {
272
			control.compression_level = c - '0';
280
			control.compression_level = c - '0';
273
			continue;
281
			continue;
Lines 295-300 Link Here
295
		case 'k':
303
		case 'k':
296
			control.flags |= FLAG_KEEP_FILES;
304
			control.flags |= FLAG_KEEP_FILES;
297
			break;
305
			break;
306
		case 'l':
307
#ifndef HAVE_LARGE_FILES
308
			fatal("You used the -l option, but this rzip doesn't support large files.");
309
#endif
310
			control.nr = atoi(optarg);
311
			break;
298
		case 'v':
312
		case 'v':
299
			control.verbosity++;
313
			control.verbosity++;
300
			break;
314
			break;
(-)rzip-2.1/runzip.c (-3 / +9 lines)
Lines 179-188 Link Here
179
 */
179
 */
180
off_t runzip_fd(int fd_in, int fd_out, int fd_hist, off_t expected_size)
180
off_t runzip_fd(int fd_in, int fd_out, int fd_hist, off_t expected_size)
181
{
181
{
182
	off_t total = 0;
182
	off_t total = 0, fin=1;
183
	while (total < expected_size) {
183
	while (fin && total < expected_size) {
184
		total += runzip_chunk(fd_in, fd_out, fd_hist);
184
		fin = runzip_chunk(fd_in, fd_out, fd_hist);
185
		total += fin;
185
	}
186
	}
187
188
	if (total < expected_size) {
189
		fprintf(stderr, "Warning: The uncompressed size does not equal the expected file size.\nHowever if you used the -l option, this may be okay.\n");
190
	}
191
186
	return total;
192
	return total;
187
}
193
}
188
194
(-)rzip-2.1/rzip.h (+1 lines)
Lines 113-118 Link Here
113
	unsigned compression_level;
113
	unsigned compression_level;
114
	unsigned flags;
114
	unsigned flags;
115
	unsigned verbosity;
115
	unsigned verbosity;
116
	unsigned nr;
116
};
117
};
117
118
118
void fatal(const char *format, ...);
119
void fatal(const char *format, ...);

Return to bug 217552