diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
commit | dcec8a13bf565e47942a1751a9cec21bec5648fe (patch) | |
tree | 548b69625b18cc2e88c3e68d0923be546c9ebb03 /fs/ncpfs/ncplib_kernel.c | |
parent | 2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff) |
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash.
o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'fs/ncpfs/ncplib_kernel.c')
-rw-r--r-- | fs/ncpfs/ncplib_kernel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/ncpfs/ncplib_kernel.c b/fs/ncpfs/ncplib_kernel.c index 5de6767e4..34f51d23a 100644 --- a/fs/ncpfs/ncplib_kernel.c +++ b/fs/ncpfs/ncplib_kernel.c @@ -147,6 +147,9 @@ ncp_negotiate_size_and_options(struct ncp_server *server, int size, int options, int *ret_size, int *ret_options) { int result; + /* there is minimum */ + if (size < 512) size = 512; + ncp_init_request(server); ncp_add_word(server, htons(size)); ncp_add_byte(server, options); @@ -157,7 +160,10 @@ ncp_negotiate_size_and_options(struct ncp_server *server, return result; } - *ret_size = min(ntohs(ncp_reply_word(server, 0)), size); + /* NCP over UDP returns 0 (!!!) */ + result = ntohs(ncp_reply_word(server, 0)); + if (result >= 512) size=min(result, size); + *ret_size = size; *ret_options = ncp_reply_byte(server, 4); ncp_unlock_server(server); |