* fish.c (file_store): Reduce input block size to 256 bytes,
otherwise dd gets partial blocks.
Этот коммит содержится в:
родитель
00700a9ce2
Коммит
da27ec10cd
@ -1,5 +1,8 @@
|
|||||||
2002-07-12 Pavel Roskin <proski@gnu.org>
|
2002-07-12 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* fish.c (file_store): Reduce input block size to 256 bytes,
|
||||||
|
otherwise dd gets partial blocks.
|
||||||
|
|
||||||
* ftpfs.c (login_server) [HSC_PROXY]: Fix crash.
|
* ftpfs.c (login_server) [HSC_PROXY]: Fix crash.
|
||||||
|
|
||||||
* ftpfs.c (ftp_split_url): Implement looking up password in
|
* ftpfs.c (ftp_split_url): Implement looking up password in
|
||||||
|
@ -486,22 +486,22 @@ file_store(vfs *me, vfs_s_fh *fh, char *name, char *localname)
|
|||||||
print_vfs_message(_("fish: store %s: sending command..."), name );
|
print_vfs_message(_("fish: store %s: sending command..."), name );
|
||||||
/*
|
/*
|
||||||
* FIXME: Limit size to unsigned long for now.
|
* FIXME: Limit size to unsigned long for now.
|
||||||
* Files longer than 4096 * ULONG_MAX are not supported.
|
* Files longer than 256 * ULONG_MAX are not supported.
|
||||||
*/
|
*/
|
||||||
if (command (me, super, WAIT_REPLY,
|
if (command (me, super, WAIT_REPLY,
|
||||||
"#STOR %lu /%s\n"
|
"#STOR %lu /%s\n"
|
||||||
"> \"/%s\"\n"
|
"> \"/%s\"\n"
|
||||||
"echo '### 001'\n"
|
"echo '### 001'\n"
|
||||||
"(\n"
|
"(\n"
|
||||||
"dd bs=4096 count=%lu\n"
|
"dd ibs=256 obs=4096 count=%lu\n"
|
||||||
"dd bs=%lu count=1\n"
|
"dd bs=%lu count=1\n"
|
||||||
") 2>/dev/null | (\n"
|
") 2>/dev/null | (\n"
|
||||||
"cat > \"/%s\"\n"
|
"cat > \"/%s\"\n"
|
||||||
"cat > /dev/null\n"
|
"cat > /dev/null\n"
|
||||||
"); echo '### 200'\n",
|
"); echo '### 200'\n",
|
||||||
(unsigned long) s.st_size, name, name,
|
(unsigned long) s.st_size, name, name,
|
||||||
(unsigned long) (s.st_size >> 12),
|
(unsigned long) (s.st_size >> 8),
|
||||||
((unsigned long) s.st_size) & (4096 - 1), name)
|
((unsigned long) s.st_size) & (256 - 1), name)
|
||||||
!= PRELIM)
|
!= PRELIM)
|
||||||
ERRNOR(E_REMOTE, -1);
|
ERRNOR(E_REMOTE, -1);
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user