Import ncpfs 0.19

This commit is contained in:
ncpfs archive import
2026-04-28 20:39:57 +02:00
parent d5ac4601b1
commit 0520c1d2f7
45 changed files with 2872 additions and 759 deletions

View File

@@ -723,6 +723,11 @@ ncp_find_dir_inode(struct inode *dir, const char *name)
if ( (result->dir->finfo.i.DosDirNum == dir_info->DosDirNum)
&& (result->dir->finfo.i.volNumber == dir_info->volNumber)
&& (strcmp(result->finfo.i.entryName, name) == 0)
/* The root dir is never looked up using this
* routine. Without the following test a root
* directory 'sys' in a volume named 'sys' could
* never be looked up, because
* server->root->dir==server->root. */
&& (result != &(server->root)))
{
return result;

View File

@@ -29,6 +29,26 @@ ncp_ioctl (struct inode * inode, struct file * filp,
struct ncp_fs_info info;
struct ncp_server *server = NCP_SERVER(inode);
/*
* Binary compatible with 1.3.XX releases.
* Take this out in 2.1.0 development series.
* <mec@duracef.shout.net> 12 Mar 1996
*/
switch(cmd) {
case _IOR('n', 1, unsigned char *):
cmd = NCP_IOC_NCPREQUEST;
break;
case _IOR('u', 1, uid_t):
cmd = NCP_IOC_GETMOUNTUID;
break;
case _IO('l', 1):
cmd = NCP_IOC_CONN_LOGGED_IN;
break;
case _IOWR('i', 1, unsigned char *):
cmd = NCP_IOC_GET_FS_INFO;
break;
}
switch(cmd) {
case NCP_IOC_NCPREQUEST:
@@ -116,6 +136,8 @@ ncp_ioctl (struct inode * inode, struct file * filp,
info.mounted_uid = server->m.mounted_uid;
info.connection = server->connection;
info.buffer_size = server->buffer_size;
info.volume_number = NCP_ISTRUCT(inode)->volNumber;
info.directory_id = NCP_ISTRUCT(inode)->DosDirNum;
memcpy_tofs((struct ncp_fs_info *)arg, &info, sizeof(info));
return 0;