mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-01-05 08:00:05 +01:00
Fixes.
This commit is contained in:
parent
18105bbf7c
commit
d9fb70bffc
|
|
@ -11,11 +11,11 @@
|
|||
#ifdef HAVE_ERRNO_H
|
||||
# include <errno.h>
|
||||
#else
|
||||
extern int errno;
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
extern int errno;
|
||||
#endif
|
||||
#include <termios.h>
|
||||
#include <liblrzip.h>
|
||||
|
||||
|
|
|
|||
1
lrzip.c
1
lrzip.c
|
|
@ -276,6 +276,7 @@ bool preserve_perms(rzip_control *control, int fd_in, int fd_out)
|
|||
/* chown fail is not fatal_return(( */
|
||||
if (unlikely(fchown(fd_out, st.st_uid, st.st_gid)))
|
||||
print_verbose("Warning, unable to set owner on %s\n", control->outfile);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Open a temporary outputfile to emulate stdout */
|
||||
|
|
|
|||
2
lrzip.h
2
lrzip.h
|
|
@ -25,7 +25,7 @@ inline i64 get_ram(rzip_control *control);
|
|||
i64 nloops(i64 seconds, uchar *b1, uchar *b2);
|
||||
bool write_magic(rzip_control *control);
|
||||
bool read_magic(rzip_control *control, int fd_in, i64 *expected_size);
|
||||
void preserve_perms(rzip_control *control, int fd_in, int fd_out);
|
||||
bool preserve_perms(rzip_control *control, int fd_in, int fd_out);
|
||||
int open_tmpoutfile(rzip_control *control);
|
||||
bool dump_tmpoutfile(rzip_control *control, int fd_out);
|
||||
int open_tmpinfile(rzip_control *control);
|
||||
|
|
|
|||
8
runzip.c
8
runzip.c
|
|
@ -314,7 +314,7 @@ static i64 runzip_chunk(rzip_control *control, int fd_in, i64 expected_size, i64
|
|||
case 0:
|
||||
u = unzip_literal(control, ss, len, &cksum);
|
||||
if (unlikely(u == -1)) {
|
||||
close_stream_in(ss);
|
||||
close_stream_in(control, ss);
|
||||
return -1;
|
||||
}
|
||||
total += u;
|
||||
|
|
@ -323,7 +323,7 @@ static i64 runzip_chunk(rzip_control *control, int fd_in, i64 expected_size, i64
|
|||
default:
|
||||
u = unzip_match(control, ss, len, &cksum, chunk_bytes);
|
||||
if (unlikely(u == -1)) {
|
||||
close_stream_in(ss);
|
||||
close_stream_in(control, ss);
|
||||
return -1;
|
||||
}
|
||||
total += u;
|
||||
|
|
@ -343,11 +343,11 @@ static i64 runzip_chunk(rzip_control *control, int fd_in, i64 expected_size, i64
|
|||
if (!HAS_MD5) {
|
||||
good_cksum = read_u32(control, ss, 0, &err);
|
||||
if (unlikely(err)) {
|
||||
close_stream_in(ss);
|
||||
close_stream_in(control, ss);
|
||||
return -1;
|
||||
}
|
||||
if (unlikely(good_cksum != cksum)) {
|
||||
close_stream_in(ss);
|
||||
close_stream_in(control, ss);
|
||||
failure_return(("Bad checksum: 0x%08x - expected: 0x%08x\n", cksum, good_cksum), -1);
|
||||
}
|
||||
print_maxverbose("Checksum for block: 0x%08x\n", cksum);
|
||||
|
|
|
|||
4
stream.h
4
stream.h
|
|
@ -29,8 +29,8 @@ bool join_pthread(pthread_t th, void **thread_return);
|
|||
ssize_t write_1g(rzip_control *control, void *buf, i64 len);
|
||||
ssize_t read_1g(rzip_control *control, int fd, void *buf, i64 len);
|
||||
i64 get_readseek(rzip_control *control, int fd);
|
||||
void prepare_streamout_threads(rzip_control *control);
|
||||
void close_streamout_threads(rzip_control *control);
|
||||
bool prepare_streamout_threads(rzip_control *control);
|
||||
bool close_streamout_threads(rzip_control *control);
|
||||
void *open_stream_out(rzip_control *control, int f, unsigned int n, i64 chunk_limit, char cbytes);
|
||||
void *open_stream_in(rzip_control *control, int f, int n, char cbytes);
|
||||
bool flush_buffer(rzip_control *control, struct stream_info *sinfo, int stream);
|
||||
|
|
|
|||
Loading…
Reference in a new issue