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
126e7aff
Commit
126e7aff
authored
Mar 31, 2005
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled width-sizing for %L.
parent
624d6be2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
log.c
log.c
+16
-11
No files found.
log.c
View file @
126e7aff
...
...
@@ -360,8 +360,8 @@ static void log_formatted(enum logcode code, char *format, char *op,
*
fmt
=
'%'
;
/* We expand % codes one by one in place in buf. We don't
* copy in the terminating nul of the inserted strings, but
* rather keep going until we reach the nul of the format. */
* copy in the terminating nul
l
of the inserted strings, but
* rather keep going until we reach the nul
l
of the format. */
total
=
strlcpy
(
buf
,
format
,
sizeof
buf
);
for
(
p
=
buf
;
(
p
=
strchr
(
p
,
'%'
))
!=
NULL
;
)
{
...
...
@@ -386,9 +386,9 @@ static void log_formatted(enum logcode code, char *format, char *op,
n
=
buf2
;
break
;
case
'p'
:
strlcat
(
fmt
,
"d"
,
sizeof
fmt
);
strlcat
(
fmt
,
"
l
d"
,
sizeof
fmt
);
snprintf
(
buf2
,
sizeof
buf2
,
fmt
,
(
int
)
getpid
());
(
long
)
getpid
());
n
=
buf2
;
break
;
case
'o'
:
n
=
op
;
break
;
...
...
@@ -418,15 +418,20 @@ static void log_formatted(enum logcode code, char *format, char *op,
break
;
case
'L'
:
if
(
hlink
&&
*
hlink
)
{
snprintf
(
buf2
,
sizeof
buf2
,
" => %s"
,
safe_fname
(
hlink
));
n
=
buf2
;
n
=
safe_fname
(
hlink
);
strcpy
(
buf2
,
" => "
);
}
else
if
(
S_ISLNK
(
file
->
mode
)
&&
file
->
u
.
link
)
{
snprintf
(
buf2
,
sizeof
buf2
,
" -> %s"
,
safe_fname
(
file
->
u
.
link
));
n
=
buf2
;
}
else
n
=
safe_fname
(
file
->
u
.
link
);
strcpy
(
buf2
,
" -> "
);
}
else
{
n
=
""
;
if
(
!
fmt
[
1
])
break
;
strcpy
(
buf2
,
" "
);
}
strlcat
(
fmt
,
"s"
,
sizeof
fmt
);
snprintf
(
buf2
+
4
,
sizeof
buf2
-
4
,
fmt
,
n
);
n
=
buf2
;
break
;
case
'm'
:
n
=
lp_name
(
module_id
);
break
;
case
't'
:
n
=
timestring
(
time
(
NULL
));
break
;
...
...
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