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
130cdd0d
Commit
130cdd0d
authored
May 29, 2010
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid a double-increment of a file's st_dev value
while supporting older rsyncs that send dev == 0.
parent
db22e586
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
flist.c
flist.c
+5
-5
No files found.
flist.c
View file @
130cdd0d
...
@@ -130,7 +130,7 @@ int flist_eof = 0; /* all the file-lists are now known */
...
@@ -130,7 +130,7 @@ int flist_eof = 0; /* all the file-lists are now known */
* will survive just long enough to be used by send_file_entry(). */
* will survive just long enough to be used by send_file_entry(). */
static
dev_t
tmp_rdev
;
static
dev_t
tmp_rdev
;
#ifdef SUPPORT_HARD_LINKS
#ifdef SUPPORT_HARD_LINKS
static
int64
tmp_dev
,
tmp_ino
;
static
int64
tmp_dev
=
-
1
,
tmp_ino
;
#endif
#endif
static
char
tmp_sum
[
MAX_DIGEST_LEN
];
static
char
tmp_sum
[
MAX_DIGEST_LEN
];
...
@@ -508,7 +508,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
...
@@ -508,7 +508,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
xflags
|=
XMIT_MOD_NSEC
;
xflags
|=
XMIT_MOD_NSEC
;
#ifdef SUPPORT_HARD_LINKS
#ifdef SUPPORT_HARD_LINKS
if
(
tmp_dev
!=
0
)
{
if
(
tmp_dev
!=
-
1
)
{
if
(
protocol_version
>=
30
)
{
if
(
protocol_version
>=
30
)
{
struct
ht_int64_node
*
np
=
idev_find
(
tmp_dev
,
tmp_ino
);
struct
ht_int64_node
*
np
=
idev_find
(
tmp_dev
,
tmp_ino
);
first_hlink_ndx
=
(
int32
)(
long
)
np
->
data
-
1
;
first_hlink_ndx
=
(
int32
)(
long
)
np
->
data
-
1
;
...
@@ -641,7 +641,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
...
@@ -641,7 +641,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
#endif
#endif
#ifdef SUPPORT_HARD_LINKS
#ifdef SUPPORT_HARD_LINKS
if
(
tmp_dev
!=
0
&&
protocol_version
<
30
)
{
if
(
tmp_dev
!=
-
1
&&
protocol_version
<
30
)
{
if
(
protocol_version
<
26
)
{
if
(
protocol_version
<
26
)
{
/* 32-bit dev_t and ino_t */
/* 32-bit dev_t and ino_t */
write_int
(
f
,
(
int32
)
dev
);
write_int
(
f
,
(
int32
)
dev
);
...
@@ -1341,10 +1341,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
...
@@ -1341,10 +1341,10 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
if
(
protocol_version
>=
28
if
(
protocol_version
>=
28
?
(
!
S_ISDIR
(
st
.
st_mode
)
&&
st
.
st_nlink
>
1
)
?
(
!
S_ISDIR
(
st
.
st_mode
)
&&
st
.
st_nlink
>
1
)
:
S_ISREG
(
st
.
st_mode
))
{
:
S_ISREG
(
st
.
st_mode
))
{
tmp_dev
=
(
int64
)
st
.
st_dev
+
1
;
tmp_dev
=
(
int64
)
st
.
st_dev
;
tmp_ino
=
(
int64
)
st
.
st_ino
;
tmp_ino
=
(
int64
)
st
.
st_ino
;
}
else
}
else
tmp_dev
=
0
;
tmp_dev
=
-
1
;
}
}
#endif
#endif
...
...
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