Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
5f808dfb
Commit
5f808dfb
authored
Jan 23, 2000
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a problem with files > 2GB
(thanks to T.J.Adye@rl.ac.uk)
parent
0b73ca12
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
27 deletions
+26
-27
flist.c
flist.c
+2
-2
generator.c
generator.c
+5
-5
match.c
match.c
+9
-10
receiver.c
receiver.c
+6
-6
sender.c
sender.c
+4
-4
No files found.
flist.c
View file @
5f808dfb
...
...
@@ -999,12 +999,12 @@ static void clean_flist(struct file_list *flist, int strip_root)
if
(
verbose
<=
3
)
return
;
for
(
i
=
0
;
i
<
flist
->
count
;
i
++
)
{
rprintf
(
FINFO
,
"[%d] i=%d %s %s mode=0%o len=%
d
\n
"
,
rprintf
(
FINFO
,
"[%d] i=%d %s %s mode=0%o len=%
.0f
\n
"
,
getpid
(),
i
,
NS
(
flist
->
files
[
i
]
->
dirname
),
NS
(
flist
->
files
[
i
]
->
basename
),
flist
->
files
[
i
]
->
mode
,
(
int
)
flist
->
files
[
i
]
->
length
);
(
double
)
flist
->
files
[
i
]
->
length
);
}
}
...
...
generator.c
View file @
5f808dfb
...
...
@@ -136,8 +136,8 @@ static struct sum_struct *generate_sums(struct map_struct *buf,OFF_T len,int n)
}
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"count=%d rem=%d n=%d flength=%
d
\n
"
,
s
->
count
,
s
->
remainder
,
s
->
n
,(
int
)
s
->
flength
);
rprintf
(
FINFO
,
"count=%d rem=%d n=%d flength=%
.0f
\n
"
,
s
->
count
,
s
->
remainder
,
s
->
n
,(
double
)
s
->
flength
);
s
->
sums
=
(
struct
sum_buf
*
)
malloc
(
sizeof
(
s
->
sums
[
0
])
*
s
->
count
);
if
(
!
s
->
sums
)
out_of_memory
(
"generate_sums"
);
...
...
@@ -154,8 +154,8 @@ static struct sum_struct *generate_sums(struct map_struct *buf,OFF_T len,int n)
s
->
sums
[
i
].
i
=
i
;
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"chunk[%d] offset=%
d
len=%d sum1=%08x
\n
"
,
i
,(
int
)
s
->
sums
[
i
].
offset
,
s
->
sums
[
i
].
len
,
s
->
sums
[
i
].
sum1
);
rprintf
(
FINFO
,
"chunk[%d] offset=%
.0f
len=%d sum1=%08x
\n
"
,
i
,(
double
)
s
->
sums
[
i
].
offset
,
s
->
sums
[
i
].
len
,
s
->
sums
[
i
].
sum1
);
len
-=
n1
;
offset
+=
n1
;
...
...
@@ -374,7 +374,7 @@ void recv_generator(char *fname,struct file_list *flist,int i,int f_out)
}
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"gen mapped %s of size %
d
\n
"
,
fnamecmp
,(
int
)
st
.
st_size
);
rprintf
(
FINFO
,
"gen mapped %s of size %
.0f
\n
"
,
fnamecmp
,(
double
)
st
.
st_size
);
s
=
generate_sums
(
buf
,
st
.
st_size
,
adapt_block_size
(
file
,
block_size
));
...
...
match.c
View file @
5f808dfb
...
...
@@ -97,8 +97,8 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
OFF_T
j
;
if
(
verbose
>
2
&&
i
>=
0
)
rprintf
(
FINFO
,
"match at %
d last_match=%d j=%d len=%d n=%d
\n
"
,
(
int
)
offset
,(
int
)
last_match
,
i
,(
int
)
s
->
sums
[
i
].
len
,(
int
)
n
);
rprintf
(
FINFO
,
"match at %
.0f last_match=%.0f j=%d len=%d n=%.0f
\n
"
,
(
double
)
offset
,(
double
)
last_match
,
i
,
s
->
sums
[
i
].
len
,(
double
)
n
);
send_token
(
f
,
i
,
buf
,
last_match
,
n
,
i
<
0
?
0
:
s
->
sums
[
i
].
len
);
data_transfer
+=
n
;
...
...
@@ -129,9 +129,8 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
static
void
hash_search
(
int
f
,
struct
sum_struct
*
s
,
struct
map_struct
*
buf
,
OFF_T
len
)
{
OFF_T
offset
;
OFF_T
offset
,
end
;
int
j
,
k
,
last_i
;
int
end
;
char
sum2
[
SUM_LENGTH
];
uint32
s1
,
s2
,
sum
;
schar
*
map
;
...
...
@@ -141,7 +140,7 @@ static void hash_search(int f,struct sum_struct *s,
last_i
=
-
1
;
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"hash search b=%d len=%
d
\n
"
,
s
->
n
,(
int
)
len
);
rprintf
(
FINFO
,
"hash search b=%d len=%
.0f
\n
"
,
s
->
n
,(
double
)
len
);
k
=
MIN
(
len
,
s
->
n
);
...
...
@@ -158,8 +157,8 @@ static void hash_search(int f,struct sum_struct *s,
end
=
len
+
1
-
s
->
sums
[
s
->
count
-
1
].
len
;
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"hash search s->n=%d len=%
d
count=%d
\n
"
,
s
->
n
,(
int
)
len
,
s
->
count
);
rprintf
(
FINFO
,
"hash search s->n=%d len=%
.0f
count=%d
\n
"
,
s
->
n
,(
double
)
len
,
s
->
count
);
do
{
tag
t
=
gettag2
(
s1
,
s2
);
...
...
@@ -167,7 +166,7 @@ static void hash_search(int f,struct sum_struct *s,
j
=
tag_table
[
t
];
if
(
verbose
>
4
)
rprintf
(
FINFO
,
"offset=%
d sum=%08x
\n
"
,(
int
)
offset
,
sum
);
rprintf
(
FINFO
,
"offset=%
.0f sum=%08x
\n
"
,(
double
)
offset
,
sum
);
if
(
j
==
NULL_TAG
)
{
goto
null_tag
;
...
...
@@ -185,8 +184,8 @@ static void hash_search(int f,struct sum_struct *s,
if
(
l
!=
s
->
sums
[
i
].
len
)
continue
;
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"potential match at %
d
target=%d %d sum=%08x
\n
"
,
(
int
)
offset
,
j
,
i
,
sum
);
rprintf
(
FINFO
,
"potential match at %
.0f
target=%d %d sum=%08x
\n
"
,
(
double
)
offset
,
j
,
i
,
sum
);
if
(
!
done_csum2
)
{
map
=
(
schar
*
)
map_ptr
(
buf
,
offset
,
l
);
...
...
receiver.c
View file @
5f808dfb
...
...
@@ -225,8 +225,8 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
extern
int
cleanup_got_literal
;
if
(
verbose
>
3
)
{
rprintf
(
FINFO
,
"data recv %d at %
d
\n
"
,
i
,(
int
)
offset
);
rprintf
(
FINFO
,
"data recv %d at %
.0f
\n
"
,
i
,(
double
)
offset
);
}
stats
.
literal_data
+=
i
;
...
...
@@ -243,7 +243,7 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
}
i
=
-
(
i
+
1
);
offset2
=
i
*
n
;
offset2
=
i
*
(
OFF_T
)
n
;
len
=
n
;
if
(
i
==
count
-
1
&&
remainder
!=
0
)
len
=
remainder
;
...
...
@@ -251,8 +251,8 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
stats
.
matched_data
+=
len
;
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"chunk[%d] of size %d at %
d offset=%d
\n
"
,
i
,
len
,(
int
)
offset2
,(
int
)
offset
);
rprintf
(
FINFO
,
"chunk[%d] of size %d at %
.0f offset=%.0f
\n
"
,
i
,
len
,(
double
)
offset2
,(
double
)
offset
);
map
=
map_ptr
(
buf
,
offset2
,
len
);
...
...
@@ -400,7 +400,7 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
if
(
fd1
!=
-
1
&&
st
.
st_size
>
0
)
{
buf
=
map_file
(
fd1
,
st
.
st_size
);
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"recv mapped %s of size %
d
\n
"
,
fnamecmp
,(
int
)
st
.
st_size
);
rprintf
(
FINFO
,
"recv mapped %s of size %
.0f
\n
"
,
fnamecmp
,(
double
)
st
.
st_size
);
}
else
{
buf
=
NULL
;
}
...
...
sender.c
View file @
5f808dfb
...
...
@@ -70,8 +70,8 @@ static struct sum_struct *receive_sums(int f)
offset
+=
s
->
sums
[
i
].
len
;
if
(
verbose
>
3
)
rprintf
(
FINFO
,
"chunk[%d] len=%d offset=%
d
sum1=%08x
\n
"
,
i
,
s
->
sums
[
i
].
len
,(
int
)
s
->
sums
[
i
].
offset
,
s
->
sums
[
i
].
sum1
);
rprintf
(
FINFO
,
"chunk[%d] len=%d offset=%
.0f
sum1=%08x
\n
"
,
i
,
s
->
sums
[
i
].
len
,(
double
)
s
->
sums
[
i
].
offset
,
s
->
sums
[
i
].
sum1
);
}
s
->
flength
=
offset
;
...
...
@@ -185,8 +185,8 @@ void send_files(struct file_list *flist,int f_out,int f_in)
}
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"send_files mapped %s of size %
d
\n
"
,
fname
,(
int
)
st
.
st_size
);
rprintf
(
FINFO
,
"send_files mapped %s of size %
.0f
\n
"
,
fname
,(
double
)
st
.
st_size
);
write_int
(
f_out
,
i
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment