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
vserver 1.9.3
[linux-2.6.git]
/
fs
/
ncpfs
/
symlink.c
diff --git
a/fs/ncpfs/symlink.c
b/fs/ncpfs/symlink.c
index
15697bc
..
e935f1b
100644
(file)
--- a/
fs/ncpfs/symlink.c
+++ b/
fs/ncpfs/symlink.c
@@
-36,8
+36,8
@@
/* these magic numbers must appear in the symlink file -- this makes it a bit
more resilient against the magic attributes being set on random files. */
/* these magic numbers must appear in the symlink file -- this makes it a bit
more resilient against the magic attributes being set on random files. */
-#define NCP_SYMLINK_MAGIC0
le32_to_cpu
(0x6c6d7973) /* "symlnk->" */
-#define NCP_SYMLINK_MAGIC1
le32_to_cpu
(0x3e2d6b6e)
+#define NCP_SYMLINK_MAGIC0
cpu_to_le32
(0x6c6d7973) /* "symlnk->" */
+#define NCP_SYMLINK_MAGIC1
cpu_to_le32
(0x3e2d6b6e)
/* ----- read a symbolic link ------------------------------------------ */
/* ----- read a symbolic link ------------------------------------------ */
@@
-67,8
+67,8
@@
static int ncp_symlink_readpage(struct file *file, struct page *page)
if (NCP_FINFO(inode)->flags & NCPI_KLUDGE_SYMLINK) {
if (length<NCP_MIN_SYMLINK_SIZE ||
if (NCP_FINFO(inode)->flags & NCPI_KLUDGE_SYMLINK) {
if (length<NCP_MIN_SYMLINK_SIZE ||
- ((__
u
32 *)rawlink)[0]!=NCP_SYMLINK_MAGIC0 ||
- ((__
u
32 *)rawlink)[1]!=NCP_SYMLINK_MAGIC1)
+ ((__
le
32 *)rawlink)[0]!=NCP_SYMLINK_MAGIC0 ||
+ ((__
le
32 *)rawlink)[1]!=NCP_SYMLINK_MAGIC1)
goto failEIO;
link = rawlink + 8;
length -= 8;
goto failEIO;
link = rawlink + 8;
length -= 8;
@@
-110,7
+110,8
@@
int ncp_symlink(struct inode *dir, struct dentry *dentry, const char *symname) {
char *rawlink;
int length, err, i, outlen;
int kludge;
char *rawlink;
int length, err, i, outlen;
int kludge;
- int mode, attr;
+ int mode;
+ __le32 attr;
unsigned int hdr;
DPRINTK("ncp_symlink(dir=%p,dentry=%p,symname=%s)\n",dir,dentry,symname);
unsigned int hdr;
DPRINTK("ncp_symlink(dir=%p,dentry=%p,symname=%s)\n",dir,dentry,symname);
@@
-133,8
+134,8
@@
int ncp_symlink(struct inode *dir, struct dentry *dentry, const char *symname) {
if (kludge) {
mode = 0;
attr = aSHARED | aHIDDEN;
if (kludge) {
mode = 0;
attr = aSHARED | aHIDDEN;
- ((__
u
32 *)rawlink)[0]=NCP_SYMLINK_MAGIC0;
- ((__
u
32 *)rawlink)[1]=NCP_SYMLINK_MAGIC1;
+ ((__
le
32 *)rawlink)[0]=NCP_SYMLINK_MAGIC0;
+ ((__
le
32 *)rawlink)[1]=NCP_SYMLINK_MAGIC1;
hdr = 8;
} else {
mode = S_IFLNK | S_IRWXUGO;
hdr = 8;
} else {
mode = S_IFLNK | S_IRWXUGO;