Import ncpfs 0.8

This commit is contained in:
ncpfs archive import
2026-04-28 20:39:57 +02:00
parent f2bcb2c71e
commit c6124785a9
10 changed files with 62 additions and 22 deletions

BIN
.downloads/ncpfs-0.8.tgz Normal file

Binary file not shown.

View File

@@ -220,7 +220,7 @@ ncp_readdir(struct inode *inode, struct file *filp,
}
if (entry == NULL) {
DPRINTK("ncp_readdir: Not found in cache.\n");
DDPRINTK("ncp_readdir: Not found in cache.\n");
if (inode->i_ino == (int)&(server->root)) {
@@ -580,7 +580,7 @@ ncp_find_inode(struct inode *dir, const char *name)
}
do {
if ( (result->finfo.i.DosDirNum == dir_info->DosDirNum)
if ( (result->dir->finfo.i.DosDirNum == dir_info->DosDirNum)
&& (strcmp(result->finfo.i.entryName, name) == 0))
return result;
result = result->next;
@@ -619,7 +619,13 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
/* ..and for .. */
if (len == 2 && __name[0] == '.' && __name[1] == '.') {
*result = iget(dir->i_sb, (int)(NCP_INOP(dir)->dir));
struct ncp_inode_info *parent = NCP_INOP(dir)->dir;
if (parent->state == INODE_CACHED) {
parent->state = INODE_LOOKED_UP;
}
*result = iget(dir->i_sb, (int)parent);
iput(dir);
if (*result == 0)
return -EACCES;

View File

@@ -149,6 +149,9 @@ ncp_put_inode(struct inode *inode)
printk("ncp_put_inode: could not close\n");
}
}
DDPRINTK("ncp_put_inode: put %s\n",
finfo->i.entryName);
ncp_free_inode_info(NCP_INOP(inode));

View File

@@ -71,8 +71,8 @@ ncp_wdog_data_ready(struct sock *sk, int len)
} else {
int result;
DPRINTK("ncpfs: got watchdog from:\n");
DPRINTK("ncpfs: %08lX:%02X%02X%02X%02X%02X%02X:%04X,"
DDPRINTK("ncpfs: got watchdog from:\n");
DDPRINTK("ncpfs: %08lX:%02X%02X%02X%02X%02X%02X:%04X,"
" conn:%02X,type:%c\n",
htonl(sender.sipx_network),
sender.sipx_node[0], sender.sipx_node[1],
@@ -86,7 +86,7 @@ ncp_wdog_data_ready(struct sock *sk, int len)
2, 1, 0,
(struct sockaddr *)&sender,
sizeof(sender));
DPRINTK("send result: %d\n", result);
DDPRINTK("send result: %d\n", result);
}
set_fs(fs);
}

View File

@@ -6,7 +6,7 @@ INCLUDES = -I/usr/src/linux/include -I..
CFLAGS = -Wall -Wstrict-prototypes -O2 -DMODULE -fomit-frame-pointer \
$(INCLUDES) \
# -DDEBUG_NCP=2 -DDEBUG_NCP_MALLOC
# -DDEBUG_NCP=1 -DDEBUG_NCP_MALLOC
# -DDEBUG_NCP_MALLOC
CC = gcc -D__KERNEL__ -I.

View File

@@ -193,7 +193,7 @@ ncp_readdir(struct inode *inode, struct file *filp,
}
if (entry == NULL) {
DPRINTK("ncp_readdir: Not found in cache.\n");
DDPRINTK("ncp_readdir: Not found in cache.\n");
if (inode->i_ino == (int)&(server->root)) {
@@ -558,7 +558,7 @@ ncp_find_inode(struct inode *dir, const char *name)
}
do {
if ( (result->finfo.i.DosDirNum == dir_info->DosDirNum)
if ( (result->dir->finfo.i.DosDirNum == dir_info->DosDirNum)
&& (strcmp(result->finfo.i.entryName, name) == 0))
return result;
result = result->next;
@@ -597,7 +597,13 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
/* ..and for .. */
if (len == 2 && __name[0] == '.' && __name[1] == '.') {
*result = iget(dir->i_sb, (int)(NCP_INOP(dir)->dir));
struct ncp_inode_info *parent = NCP_INOP(dir)->dir;
if (parent->state == INODE_CACHED) {
parent->state = INODE_LOOKED_UP;
}
*result = iget(dir->i_sb, (int)parent);
iput(dir);
if (*result == 0)
return -EACCES;

View File

@@ -143,11 +143,14 @@ ncp_put_inode(struct inode *inode)
}
}
DDPRINTK("ncp_put_inode: put %s\n",
finfo->i.entryName);
ncp_free_inode_info(NCP_INOP(inode));
if (S_ISDIR(inode->i_mode)) {
DPRINTK("ncp_put_inode: put directory %ld\n",
inode->i_ino);
DDPRINTK("ncp_put_inode: put directory %ld\n",
inode->i_ino);
ncp_invalid_dir_cache(inode->i_ino);
}

View File

@@ -102,8 +102,8 @@ ncp_wdog_data_ready(struct sock *sk, int len)
} else {
int result;
DPRINTK("ncpfs: got watchdog from:\n");
DPRINTK("ncpfs: %08lX:%02X%02X%02X%02X%02X%02X:%04X,"
DDPRINTK("ncpfs: got watchdog from:\n");
DDPRINTK("ncpfs: %08lX:%02X%02X%02X%02X%02X%02X:%04X,"
" conn:%02X,type:%c\n",
htonl(sender.sipx_network),
sender.sipx_node[0], sender.sipx_node[1],
@@ -115,7 +115,7 @@ ncp_wdog_data_ready(struct sock *sk, int len)
packet_buf[1] = 'Y';
result = _sendto(sock, (void *)packet_buf, 2, 1, 0,
&sender, sizeof(sender));
DPRINTK("send result: %d\n", result);
DDPRINTK("send result: %d\n", result);
}
set_fs(fs);
}
@@ -167,6 +167,7 @@ ncp_catch_watchdog(struct ncp_server *server)
server->data_ready = sk->data_ready;
sk->data_ready = ncp_wdog_data_ready;
sk->allocation = GFP_ATOMIC;
return 0;
}
@@ -219,6 +220,7 @@ ncp_dont_catch_watchdog(struct ncp_server *server)
(unsigned int)(server->data_ready));
sk->data_ready = server->data_ready;
sk->allocation = GFP_KERNEL;
server->data_ready = NULL;
return 0;
}
@@ -284,7 +286,7 @@ do_ncp_rpc_call(struct ncp_server *server, int size)
fs = get_fs();
set_fs(get_ds());
for (n = 0, timeout = init_timeout; ; n++, timeout <<= 1) {
/* DDPRINTK("ncpfs: %08lX:%02X%02X%02X%02X%02X%02X:%04X\n",
DDPRINTK("ncpfs: %08lX:%02X%02X%02X%02X%02X%02X:%04X\n",
htonl(server->m.serv_addr.sipx_network),
server->m.serv_addr.sipx_node[0],
server->m.serv_addr.sipx_node[1],
@@ -292,7 +294,7 @@ do_ncp_rpc_call(struct ncp_server *server, int size)
server->m.serv_addr.sipx_node[3],
server->m.serv_addr.sipx_node[4],
server->m.serv_addr.sipx_node[5],
ntohs(server->m.serv_addr.sipx_port));*/
ntohs(server->m.serv_addr.sipx_port));
DDPRINTK("ncpfs: req.typ: %04X, con: %d, "
"seq: %d",
request.type,

View File

@@ -1,14 +1,14 @@
Begin3
Title: ncpfs
Version: 0.7
Entered-date: 26. November 1995
Version: 0.8
Entered-date: 28. November 1995
Description: With ncpfs you can mount volumes of your novell
server under Linux.
Keywords: filesystem kernel ncp novell netware
Author: lendecke@namu01.gwdg.de (Volker Lendecke)
Maintained-by: lendecke@namu01.gwdg.de (Volker Lendecke)
Primary-site: linux01.gwdg.de:/pub/ncpfs
~80k ncpfs-0.7.tgz
~ 1k ncpfs-0.7.lsm
~80k ncpfs-0.8.tgz
~ 1k ncpfs-0.8.lsm
Copying-policy: GPL
End

View File

@@ -411,14 +411,34 @@ ipx_sap_find_server(char *name, int server_type, int timeout,
{
goto finished;
}
result->sipx_family = AF_IPX;
result->sipx_network = n_addr->network;
result->sipx_port = n_addr->port;
ipx_assign_node(result->sipx_node, n_addr->node);
/* Now we connect to the ultimate target, again with a test
for reachability. This time nothing is done except connecting. */
server.addr = *result;
if (ncp_connect(&server) != 0)
{
if ( (errno != ENETUNREACH)
|| (ipx_make_reachable(ntohl(server.addr.sipx_network))!=0)
|| (ncp_connect(&server) != 0)) {
goto finished;
}
}
if (ncp_disconnect(&server) != 0)
{
goto finished;
}
res = 0;
finished:
close(sock);
return res;