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
8f14cc49
Commit
8f14cc49
authored
Nov 12, 2005
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parse the new --human-readable (-m) option.
parent
3b4ecc6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
options.c
options.c
+7
-4
No files found.
options.c
View file @
8f14cc49
...
...
@@ -82,6 +82,7 @@ char *files_from = NULL;
int
filesfrom_fd
=
-
1
;
char
*
filesfrom_host
=
NULL
;
int
eol_nulls
=
0
;
int
human_readable
=
0
;
int
recurse
=
0
;
int
xfer_dirs
=
-
1
;
int
am_daemon
=
0
;
...
...
@@ -345,6 +346,8 @@ void usage(enum logcode F)
rprintf
(
F
,
" --port=PORT specify double-colon alternate port number
\n
"
);
rprintf
(
F
,
" --blocking-io use blocking I/O for the remote shell
\n
"
);
rprintf
(
F
,
" --stats give some file-transfer stats
\n
"
);
rprintf
(
F
,
" -m, --human-readable output numbers in a human-readable format
\n
"
);
rprintf
(
F
,
" --si like human-readable, but use powers of 1000
\n
"
);
rprintf
(
F
,
" --progress show progress during transfer
\n
"
);
rprintf
(
F
,
" -P same as --partial --progress
\n
"
);
rprintf
(
F
,
" -i, --itemize-changes output a change-summary for all updates
\n
"
);
...
...
@@ -383,6 +386,8 @@ static struct poptOption long_options[] = {
{
"no-v"
,
0
,
POPT_ARG_VAL
,
&
verbose
,
0
,
0
,
0
},
{
"quiet"
,
'q'
,
POPT_ARG_NONE
,
0
,
'q'
,
0
,
0
},
{
"stats"
,
0
,
POPT_ARG_NONE
,
&
do_stats
,
0
,
0
,
0
},
{
"human-readable"
,
'm'
,
POPT_ARG_VAL
,
&
human_readable
,
1
,
0
,
0
},
{
"si"
,
0
,
POPT_ARG_VAL
,
&
human_readable
,
2
,
0
,
0
},
{
"dry-run"
,
'n'
,
POPT_ARG_NONE
,
&
dry_run
,
0
,
0
,
0
},
{
"archive"
,
'a'
,
POPT_ARG_NONE
,
0
,
'a'
,
0
,
0
},
{
"recursive"
,
'r'
,
POPT_ARG_VAL
,
&
recurse
,
2
,
0
,
0
},
...
...
@@ -703,12 +708,10 @@ static OFF_T parse_size_arg(char **size_arg, char def_suf)
if
(
size
>
0
&&
make_compatible
)
{
/* We convert this manually because we may need %lld precision,
* and that's not a portable sprintf() escape. */
char
buf
[
128
],
*
s
=
buf
+
sizeof
buf
;
char
buf
[
128
],
*
s
=
buf
+
sizeof
buf
-
1
;
OFF_T
num
=
size
;
*
--
s
=
'\0'
;
*
s
=
'\0'
;
while
(
num
)
{
if
(
s
==
buf
)
/* impossible... */
out_of_memory
(
"parse_size_arg@buf"
);
*--
s
=
(
num
%
10
)
+
'0'
;
num
/=
10
;
}
...
...
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