git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
ncpfs
/
ncplib_kernel.h
diff --git
a/fs/ncpfs/ncplib_kernel.h
b/fs/ncpfs/ncplib_kernel.h
index
7edb9e1
..
2441d1a
100644
(file)
--- a/
fs/ncpfs/ncplib_kernel.h
+++ b/
fs/ncpfs/ncplib_kernel.h
@@
-12,7
+12,6
@@
#ifndef _NCPLIB_H
#define _NCPLIB_H
#ifndef _NCPLIB_H
#define _NCPLIB_H
-#include <linux/config.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/types.h>
@@
-71,25
+70,22
@@
int ncp_obtain_info(struct ncp_server *server, struct inode *, char *,
struct nw_info_struct *target);
int ncp_obtain_nfs_info(struct ncp_server *server, struct nw_info_struct *target);
int ncp_get_volume_root(struct ncp_server *server, const char *volname,
struct nw_info_struct *target);
int ncp_obtain_nfs_info(struct ncp_server *server, struct nw_info_struct *target);
int ncp_get_volume_root(struct ncp_server *server, const char *volname,
- __u32 *volume, __
u32 *dirent, __u
32 *dosdirent);
+ __u32 *volume, __
le32 *dirent, __le
32 *dosdirent);
int ncp_lookup_volume(struct ncp_server *, const char *, struct nw_info_struct *);
int ncp_modify_file_or_subdir_dos_info(struct ncp_server *, struct inode *,
int ncp_lookup_volume(struct ncp_server *, const char *, struct nw_info_struct *);
int ncp_modify_file_or_subdir_dos_info(struct ncp_server *, struct inode *,
- __
u
32, const struct nw_modify_dos_info *info);
+ __
le
32, const struct nw_modify_dos_info *info);
int ncp_modify_file_or_subdir_dos_info_path(struct ncp_server *, struct inode *,
int ncp_modify_file_or_subdir_dos_info_path(struct ncp_server *, struct inode *,
- const char* path, __
u
32, const struct nw_modify_dos_info *info);
-int ncp_modify_nfs_info(struct ncp_server *, __u8 volnum, __
u
32 dirent,
+ const char* path, __
le
32, const struct nw_modify_dos_info *info);
+int ncp_modify_nfs_info(struct ncp_server *, __u8 volnum, __
le
32 dirent,
__u32 mode, __u32 rdev);
int ncp_del_file_or_subdir2(struct ncp_server *, struct dentry*);
int ncp_del_file_or_subdir(struct ncp_server *, struct inode *, char *);
int ncp_open_create_file_or_subdir(struct ncp_server *, struct inode *, char *,
__u32 mode, __u32 rdev);
int ncp_del_file_or_subdir2(struct ncp_server *, struct dentry*);
int ncp_del_file_or_subdir(struct ncp_server *, struct inode *, char *);
int ncp_open_create_file_or_subdir(struct ncp_server *, struct inode *, char *,
- int, __
u32, int
, struct ncp_entry_info *);
+ int, __
le32, __le16
, struct ncp_entry_info *);
int ncp_initialize_search(struct ncp_server *, struct inode *,
struct nw_search_sequence *target);
int ncp_initialize_search(struct ncp_server *, struct inode *,
struct nw_search_sequence *target);
-int ncp_search_for_file_or_subdir(struct ncp_server *server,
- struct nw_search_sequence *seq,
- struct nw_info_struct *target);
int ncp_search_for_fileset(struct ncp_server *server,
struct nw_search_sequence *seq,
int* more, int* cnt,
int ncp_search_for_fileset(struct ncp_server *server,
struct nw_search_sequence *seq,
int* more, int* cnt,
@@
-113,13
+109,13
@@
ncp_ClearPhysicalRecord(struct ncp_server *server,
#endif /* CONFIG_NCPFS_IOCTL_LOCKING */
int
#endif /* CONFIG_NCPFS_IOCTL_LOCKING */
int
-ncp_mount_subdir(struct ncp_server *, __u8, __u8, __
u
32,
- __u32* volume, __
u32* dirent, __u
32* dosdirent);
-int ncp_dirhandle_alloc(struct ncp_server *, __u8 vol, __
u
32 dirent, __u8 *dirhandle);
+ncp_mount_subdir(struct ncp_server *, __u8, __u8, __
le
32,
+ __u32* volume, __
le32* dirent, __le
32* dosdirent);
+int ncp_dirhandle_alloc(struct ncp_server *, __u8 vol, __
le
32 dirent, __u8 *dirhandle);
int ncp_dirhandle_free(struct ncp_server *, __u8 dirhandle);
int ncp_create_new(struct inode *dir, struct dentry *dentry,
int ncp_dirhandle_free(struct ncp_server *, __u8 dirhandle);
int ncp_create_new(struct inode *dir, struct dentry *dentry,
- int mode, dev_t rdev,
int
attributes);
+ int mode, dev_t rdev,
__le32
attributes);
static inline int ncp_is_nfs_extras(struct ncp_server* server, unsigned int volnum) {
#ifdef CONFIG_NCPFS_NFS_NS
static inline int ncp_is_nfs_extras(struct ncp_server* server, unsigned int volnum) {
#ifdef CONFIG_NCPFS_NFS_NS
@@
-132,8
+128,6
@@
static inline int ncp_is_nfs_extras(struct ncp_server* server, unsigned int voln
#ifdef CONFIG_NCPFS_NLS
#ifdef CONFIG_NCPFS_NLS
-unsigned char ncp__tolower(struct nls_table *, unsigned char);
-unsigned char ncp__toupper(struct nls_table *, unsigned char);
int ncp__io2vol(struct ncp_server *, unsigned char *, unsigned int *,
const unsigned char *, unsigned int, int);
int ncp__vol2io(struct ncp_server *, unsigned char *, unsigned int *,
int ncp__io2vol(struct ncp_server *, unsigned char *, unsigned int *,
const unsigned char *, unsigned int, int);
int ncp__vol2io(struct ncp_server *, unsigned char *, unsigned int *,
@@
-141,8
+135,10
@@
int ncp__vol2io(struct ncp_server *, unsigned char *, unsigned int *,
#define NCP_ESC ':'
#define NCP_IO_TABLE(dentry) (NCP_SERVER((dentry)->d_inode)->nls_io)
#define NCP_ESC ':'
#define NCP_IO_TABLE(dentry) (NCP_SERVER((dentry)->d_inode)->nls_io)
-#define ncp_tolower(t, c) ncp__tolower(t, c)
-#define ncp_toupper(t, c) ncp__toupper(t, c)
+#define ncp_tolower(t, c) nls_tolower(t, c)
+#define ncp_toupper(t, c) nls_toupper(t, c)
+#define ncp_strnicmp(t, s1, s2, len) \
+ nls_strnicmp(t, s1, s2, len)
#define ncp_io2vol(S,m,i,n,k,U) ncp__io2vol(S,m,i,n,k,U)
#define ncp_vol2io(S,m,i,n,k,U) ncp__vol2io(S,m,i,n,k,U)
#define ncp_io2vol(S,m,i,n,k,U) ncp__io2vol(S,m,i,n,k,U)
#define ncp_vol2io(S,m,i,n,k,U) ncp__vol2io(S,m,i,n,k,U)
@@
-159,11
+155,19
@@
int ncp__vol2io(unsigned char *, unsigned int *,
#define ncp_io2vol(S,m,i,n,k,U) ncp__io2vol(m,i,n,k,U)
#define ncp_vol2io(S,m,i,n,k,U) ncp__vol2io(m,i,n,k,U)
#define ncp_io2vol(S,m,i,n,k,U) ncp__io2vol(m,i,n,k,U)
#define ncp_vol2io(S,m,i,n,k,U) ncp__vol2io(m,i,n,k,U)
-#endif /* CONFIG_NCPFS_NLS */
-int
-ncp_strnicmp(struct nls_table *,
- const unsigned char *, const unsigned char *, int);
+static inline int ncp_strnicmp(struct nls_table *t, const unsigned char *s1,
+ const unsigned char *s2, int len)
+{
+ while (len--) {
+ if (tolower(*s1++) != tolower(*s2++))
+ return 1;
+ }
+
+ return 0;
+}
+
+#endif /* CONFIG_NCPFS_NLS */
#define NCP_GET_AGE(dentry) (jiffies - (dentry)->d_time)
#define NCP_MAX_AGE(server) ((server)->dentry_ttl)
#define NCP_GET_AGE(dentry) (jiffies - (dentry)->d_time)
#define NCP_MAX_AGE(server) ((server)->dentry_ttl)
@@
-191,7
+195,7
@@
ncp_renew_dentries(struct dentry *parent)
spin_lock(&dcache_lock);
next = parent->d_subdirs.next;
while (next != &parent->d_subdirs) {
spin_lock(&dcache_lock);
next = parent->d_subdirs.next;
while (next != &parent->d_subdirs) {
- dentry = list_entry(next, struct dentry, d_child);
+ dentry = list_entry(next, struct dentry, d_
u.d_
child);
if (dentry->d_fsdata == NULL)
ncp_age_dentry(server, dentry);
if (dentry->d_fsdata == NULL)
ncp_age_dentry(server, dentry);
@@
-213,7
+217,7
@@
ncp_invalidate_dircache_entries(struct dentry *parent)
spin_lock(&dcache_lock);
next = parent->d_subdirs.next;
while (next != &parent->d_subdirs) {
spin_lock(&dcache_lock);
next = parent->d_subdirs.next;
while (next != &parent->d_subdirs) {
- dentry = list_entry(next, struct dentry, d_child);
+ dentry = list_entry(next, struct dentry, d_
u.d_
child);
dentry->d_fsdata = NULL;
ncp_age_dentry(server, dentry);
next = next->next;
dentry->d_fsdata = NULL;
ncp_age_dentry(server, dentry);
next = next->next;