summaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
2023-03-04remove pprint, use message (mpr_*) instead.Ryo Nakamura
ToDo: main should use pipe to receive messages from libmscp.
2023-03-03implementing messaging.Ryo Nakamura
ToDo: remove pprint. mscp should use mpr_* functions, and main.c should use just fprintf(stdout, "\r\033[K" fmt, ...) for printing progress bar.
2023-03-03add message.h and message.c, mscp_set|get_error()Ryo Nakamura
Instead of pr_err(), libmscp uses mscp_set_error() and applications use mscp_get_errror() to get error message.
2023-03-03tiny cleanupRyo Nakamura
2023-03-03add mscp_get_statsRyo Nakamura
move progress bar-related functions from mscp.c to main.c.
2023-03-03add mscp_ssh_opts and change -C optargRyo Nakamura
2023-02-26tiny fix on commentRyo Nakamura
2023-02-26now mscp links libmscpRyo Nakamura
2023-02-16add -r option (but no effect)Ryo Nakamura
2023-02-16add \n at the final outputRyo Nakamura
2022-12-11set default nr_threads to floor(log(cores) * 2) + 1)Ryo Nakamura
This change prevents mscp from establishing too many ssh connections on many-core machines in default.
2022-12-11use pthread_cleanup to acquire and release lockRyo Nakamura
In chunk_prepare(), if multiple threads wait for acquiring f->lock, and then pthread_cancel() is called, the waiting threads are never canceled because pthread_mutex_lock() is not a cancellation point. So, use pthread_cleanup_push/pop to release the lock.
2022-12-08set default NR_AHEAD to 32Ryo Nakamura
2022-12-06fix final progress outputRyo Nakamura
2022-12-05reuse ctrl sftp session for the first copy threadRyo Nakamura
2022-12-04set TCP_NODELAY by default and introduce -N option to disable itRyo Nakamura
2022-12-03remove unused code and introduce -b buf_sz optionRyo Nakamura
This commit removes ifdef ASYNC_WRITE. So, mscp always depends on the patched libssh.
2022-12-02little cleanupRyo Nakamura
2022-12-02add -M hmac optionRyo Nakamura
2022-11-28use sigalrm for printing progress barRyo Nakamura
2022-11-27add ETA to progress printRyo Nakamura
2022-11-27skip sftp_free() inappropriatelyRyo Nakamura
2022-11-26fix duplicate error message on ssh auth failed.Ryo Nakamura
and fix the final \n with -q
2022-11-18fix when copy multiple sources and various tiny fixesRyo Nakamura
* when copying multiple sources, target must be directory * add multi-src copy test and parametrize src/dst prefixes * cleanup REAMDE (s/sessions/connections/g) * make error output in copy functions simple
2022-11-18tiny fixRyo Nakamura
- set ssh nonblocking before closing sftp session - fix pprint for core mask
2022-11-16check invalid coremaskRyo Nakamura
2022-11-15add -m coremask optionRyo Nakamura
2022-11-13add memory barrier to notify monitor thread of copy threads finishedRyo Nakamura
2022-11-13add -a nr_ahead optionRyo Nakamura
2022-11-12little trick to make progress bar stableRyo Nakamura
2022-11-12fix buf size in remote to local copy.Ryo Nakamura
Too large buffer size for sftp_async_read causes unfinished copy: sftp_async_read returns 0 althrough data remains.
2022-11-12fix some thread handlingRyo Nakamura
2022-11-08fix incorrect ret handling for read/writeRyo Nakamura
2022-11-05add -H option to disable host key checkRyo Nakamura
tests use this option.
2022-10-31do not print progress when total bytes transferred is 0Ryo Nakamura
2022-11-01capture retval from copy threadsRyo Nakamura
2022-10-31rename dirname if dst dir does not existRyo Nakamura
`scp remote:srcdir dstdir` renames srcdir to dstdir if dstdir does not exist. If dstdir exists, it creates dstdir/srcdir. This commit imitates this behavior.
2022-10-30set nr_threads to # of chunks if # of chunks is smallRyo Nakamura
2022-10-30add cpack to build debian packageRyo Nakamura
2022-10-30Merge branch 'main' of github.com:upa/mscpRyo Nakamura
2022-10-30rename sscp to mscpRyo Nakamura
2022-10-30little refactoring for param namesRyo Nakamura
2022-10-29change indent from space to tabRyo Nakamura
2022-10-29fix path handlingRyo Nakamura
2022-10-25wrap print progress in pprintRyo Nakamura
2022-10-25add copy start and done outputRyo Nakamura
These fputs should be wrapped in a function and protected by a lock. todo.
2022-10-25fix miss flag handling for threads[n].finishedRyo Nakamura
2022-10-24todo: consider smp for countersRyo Nakamura
2022-10-23adjust order of thread spawningRyo Nakamura
2022-10-23configurable sftp_buf_sz.Ryo Nakamura
default value 131072 is derived from qemu/block/ssh.c. we need more investigaion.