Ryo Nakamura
2bfd599ad9
add -L limit bitrate option ( #14 )
2024-04-10 20:57:11 +09:00
Ryo Nakamura
f71c7a145a
add checkpoint.c and .h
2024-02-17 12:39:19 +09:00
Ryo Nakamura
b756654f6e
little cleanup
2024-02-11 22:04:59 +09:00
Ryo Nakamura
a828ca3f5a
change chunk_pool from list to pool
2024-02-11 21:28:03 +09:00
Ryo Nakamura
bfc955a9a7
change path_list to path_pool
2024-02-11 14:11:47 +09:00
Ryo Nakamura
93f155cffe
add .clang-format from Linux kernel and format sources
...
The exception is that ColumnLimit is 90.
2024-02-06 23:09:59 +09:00
Ryo Nakamura
4f0669f8f8
refactor error message-related functions
...
split message print fuctions (mpr_*), strerrno, and mscp_get/set_error
into print.c/h and strerrno.c/h.
ToDo: revise usages of priv_set_errv and pr_* functions.
2024-02-06 21:54:04 +09:00
Ryo Nakamura
a7f8ad948b
add -p option, preserving file timestamps
2024-02-06 16:15:43 +09:00
Ryo Nakamura
c95e6a4fff
do not passing msg_fp via mscp opts
...
instead, mpr_* functions print messages to stdout or stderr directly.
2024-02-04 20:23:08 +09:00
Ryo Nakamura
9bdbfe8487
add SPDX-License-Identifier to source files
2024-01-18 12:59:49 +09:00
Ryo Nakamura
bba53fab03
don't allocate char[PATH_MAX] for each file
...
This commit makes struct path allocation use strndup().
It reduices the memory footprint for struct path per file (issue #8 ).
2024-01-18 12:59:49 +09:00
Ryo Nakamura
0cf3acee20
add -I interval option
...
-I INTERVAL option inserts sleep for interval (seconds) between
SSH connection attempts (issue #7 ).
2023-11-25 15:17:33 +09:00
Ryo Nakamura
9f7c135b15
cleanup wrappers for file operations
...
Previously wrapper functions for open(), opendir(), and stat(), etc,
are implemneted in path.h, and now they are in fileops.h and fileops.c.
This commit is a reparation for remote glob.
2023-08-03 17:07:39 +09:00
Ryo Nakamura
24e86f58d8
mscp: maintain mscp_thread structs in list
...
Instead of m->threads array, struct mscp_thread instanes are
maintained in m->thread_list. This enables stable counter access
via mscp_get_stats().
2023-05-07 21:05:05 +09:00
Ryo Nakamura
cf99a439cb
cleanup message print functions
2023-03-15 00:00:23 +09:00
Ryo Nakamura
9b0eb668f9
cleanup mscp_prepare-related code
2023-03-14 00:11:13 +09:00
Ryo Nakamura
5f9f20f150
mscp_prepare() scans source paths in a thread.
...
This commit runs mscp_prepare() in a pthread. mscp copy threads
run aysnchronously with mscp_prepare(). So, when mscp_prepare()
has not finished yet (due to too many source files), we can start
to copy files.
2023-03-13 22:35:51 +09:00
Ryo Nakamura
ceb9ebd5a8
revise walk_src_path.
...
In new walk_src_path, resolve dst path and resolve chunks are
invoked when adding a path.
2023-03-13 21:02:26 +09:00
Ryo Nakamura
df2f922b0d
remove pprint, use message (mpr_*) instead.
...
ToDo:
main should use pipe to receive messages from libmscp.
2023-03-04 15:44:10 +09:00
Ryo Nakamura
1b9ae51974
add message.h and message.c, mscp_set|get_error()
...
Instead of pr_err(), libmscp uses mscp_set_error() and
applications use mscp_get_errror() to get error message.
2023-03-03 21:29:43 +09:00
Ryo Nakamura
c649742b3e
fix dst path resolve
2023-02-26 23:42:25 +09:00
Ryo Nakamura
700d64b375
now mscp links libmscp
2023-02-26 23:18:39 +09:00
Ryo Nakamura
3d26cc2c18
add copy-related functions to path
2023-02-25 23:39:20 +09:00
Ryo Nakamura
1be9b70808
start to impliment mscp as a library
...
this commit starts to refactor file.h|c to path.h|c and
add mscp.c|h. not completed yet.
2023-02-25 22:17:29 +09:00