Import ncpfs 0.7

This commit is contained in:
ncpfs archive import
2026-04-28 20:39:57 +02:00
parent e05e55a64a
commit f2bcb2c71e
27 changed files with 3799 additions and 31 deletions

View File

@@ -8,6 +8,8 @@
#ifndef _LINUX_NCP_H
#define _LINUX_NCP_H
#error "Please use kernel 1.2.13"
#include <linux/types.h>
#define NCP_PTYPE (0x11)

View File

@@ -5,8 +5,6 @@
*
*/
/* #include <linux/module.h>*/
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/stat.h>
@@ -30,6 +28,7 @@ ncp_dir_read(struct inode *inode, struct file *filp, char *buf, int count);
static int
ncp_readdir(struct inode *inode, struct file *filp,
void *dirent, filldir_t filldir);
static int
ncp_read_volume_list(struct ncp_server *server, int start_with,
int cache_size);
@@ -285,8 +284,8 @@ ncp_read_volume_list(struct ncp_server *server, int fpos, int cache_size)
#if 1
if (fpos < 2) {
printk("OOPS, we expect fpos >= 2");
fpos = 2;
}
fpos = 2;
#endif
for (i=0; i<NCP_NUMBER_OF_VOLUMES; i++) {
@@ -329,19 +328,35 @@ static int
ncp_do_readdir(struct ncp_server *server, struct inode *dir, int fpos,
int cache_size, struct ncp_dirent *entry)
{
struct nw_search_sequence seq;
int total_count = 2;
static struct nw_search_sequence seq;
static struct inode *last_dir;
static int total_count;
#if 1
if (fpos < 2) {
printk("OOPS, we expect fpos >= 2");
fpos = 2;
}
fpos = 2;
#endif
DPRINTK("ncp_do_readdir: fpos = %d\n", fpos);
if (ncp_initialize_search(server, NCP_ISTRUCT(dir), &seq) != 0) {
DPRINTK("ncp_init_search failed\n");
return total_count - fpos;
if (fpos == 2) {
last_dir = NULL;
total_count = 2;
}
if ((fpos != total_count) || (dir != last_dir)) {
total_count = 2;
last_dir = dir;
DPRINTK("ncp_do_readdir: re-used seq for %s\n",
NCP_ISTRUCT(dir)->entryName);
if (ncp_initialize_search(server, NCP_ISTRUCT(dir), &seq)!=0) {
DPRINTK("ncp_init_search failed\n");
return total_count - fpos;
}
}
while (total_count < fpos + cache_size) {
@@ -355,8 +370,8 @@ ncp_do_readdir(struct ncp_server *server, struct inode *dir, int fpos,
DPRINTK("ncp_do_readdir: skipped file: %s\n",
entry->i.entryName);
} else {
DPRINTK("ncp_do_readdir: found file: %s\n",
entry->i.entryName);
DDPRINTK("ncp_do_r: file: %s, f_pos=%d,total_count=%d",
entry->i.entryName, fpos, total_count);
entry->s = seq;
entry->f_pos = total_count;
entry += 1;

View File

@@ -5,8 +5,6 @@
*
*/
/* #include <linux/module.h>*/
#include <asm/segment.h>
#include <asm/system.h>

View File

@@ -4,7 +4,6 @@
* Copyright (C) 1995 by Volker Lendecke
*
*/
/* #include <linux/module.h>*/
#include <asm/segment.h>
#include <linux/errno.h>

View File

@@ -7,8 +7,6 @@
*
*/
/* #include <linux/module.h> */
#include <linux/sched.h>
#include <linux/ncp_fs.h>
#include <linux/errno.h>
@@ -80,7 +78,7 @@ ncp_wdog_data_ready(struct sock *sk, int len)
{
unsigned char packet_buf[2];
struct sockaddr_ipx sender;
int addr_len;
int addr_len = sizeof(struct sockaddr_ipx);
int result;
unsigned short fs;