summaryrefslogtreecommitdiff
path: root/src/file.c
AgeCommit message (Collapse)Author
2023-02-26tiny fix on commentRyo Nakamura
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-06add ssh_buffer_new_size and ssh_buffer_add_func to libsshRyo Nakamura
sftp_async_write() with these functions reduces 1. realloc_buffer by ssh_buffer_new_size() 2. memcpy from read data to ssh buffer by ssh_buffer_add_func()
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-11-27only the last thread changes dst file permissionRyo Nakamura
2022-11-18add O_TRUNC when the first open() for a fileRyo Nakamura
2022-11-18remove pr_warn debugRyo Nakamura
2022-11-18fix type of id for sftp_async_writeRyo Nakamura
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-17fix async handlingRyo Nakamura
2022-11-17fix idx increment (typo) and async write improves copy speed!Ryo Nakamura
2022-11-17implement local-to-remote copy with async_writeRyo Nakamura
2022-11-13add -a nr_ahead optionRyo 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-12use sftp_async_read for remote to local copyRyo Nakamura
2022-11-08fix incorrect ret handling for read/writeRyo Nakamura
2022-11-05create file at the remote although file size is 0Ryo 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-30fix on debug compileRyo 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-30fix int overflowRyo Nakamura
2022-10-30use sftp_get_ssh_errorRyo 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-23configurable sftp_buf_sz.Ryo Nakamura
default value 131072 is derived from qemu/block/ssh.c. we need more investigaion.
2022-10-23cleanup copy codesRyo Nakamura
2022-10-23compilable on linuxRyo Nakamura
2022-10-23fix a signifiant bugRyo Nakamura
2022-10-23handle permission on openRyo Nakamura
2022-10-23compilable in linuxRyo Nakamura
2022-10-23add progress barRyo Nakamura
2022-10-23fix stat outputRyo Nakamura
2022-10-22copy over multiple connection works, but not checked file integirtyRyo Nakamura
2022-10-22fixRyo Nakamura
2022-10-22fix on copy handlingRyo Nakamura
2022-10-22fix copy from remote to local and add buffer sizeRyo Nakamura
2022-10-22implement copy chunkRyo Nakamura
2022-10-20add atomic refcnt and locks.Ryo Nakamura
It might be unnecessary, if open/close can be done without lock.
2022-10-20implement chunk fillRyo Nakamura
2022-10-16implement fill_fileRyo Nakamura