* [PATCH] smb-diff
@ 2003-04-13 22:48 Andries.Brouwer
0 siblings, 0 replies; only message in thread
From: Andries.Brouwer @ 2003-04-13 22:48 UTC (permalink / raw)
To: akpm, linux-kernel, torvalds
Samba receives a 64+64 bit device number. Instead of throwing all
away and only preserving 8+8 we can now preserve 32+32.
Andries
diff -u --recursive --new-file -X /linux/dontdiff a/fs/smbfs/proc.c b/fs/smbfs/proc.c
--- a/fs/smbfs/proc.c Tue Apr 8 09:36:43 2003
+++ b/fs/smbfs/proc.c Sat Apr 12 13:33:39 2003
@@ -2085,7 +2085,6 @@
void smb_decode_unix_basic(struct smb_fattr *fattr, char *p)
{
/* FIXME: verify nls support. all is sent as utf8? */
- __u64 devmajor, devminor;
fattr->f_unix = 1;
fattr->f_mode = 0;
@@ -2112,9 +2111,10 @@
fattr->f_mode |= smb_filetype_to_mode(WVAL(p, 56));
if (S_ISBLK(fattr->f_mode) || S_ISCHR(fattr->f_mode)) {
- devmajor = LVAL(p, 60);
- devminor = LVAL(p, 68);
- fattr->f_rdev = ((devmajor & 0xFF) << 8) | (devminor & 0xFF);
+ __u64 major = LVAL(p, 60);
+ __u64 minor = LVAL(p, 68);
+
+ fattr->f_rdev = MKDEV(major & 0xffffffff, minor & 0xffffffff);
}
fattr->f_mode |= LVAL(p, 84);
}
@@ -3008,7 +3008,7 @@
*/
int
smb_proc_setattr_unix(struct dentry *d, struct iattr *attr,
- int major, int minor)
+ unsigned int major, unsigned int minor)
{
struct smb_sb_info *server = server_from_dentry(d);
u64 nttime;
diff -u --recursive --new-file -X /linux/dontdiff a/fs/smbfs/proto.h b/fs/smbfs/proto.h
--- a/fs/smbfs/proto.h Thu Jan 2 14:32:11 2003
+++ b/fs/smbfs/proto.h Sat Apr 12 13:34:38 2003
@@ -27,7 +27,7 @@
extern void smb_decode_unix_basic(struct smb_fattr *fattr, char *p);
extern int smb_proc_getattr(struct dentry *dir, struct smb_fattr *fattr);
extern int smb_proc_setattr(struct dentry *dir, struct smb_fattr *fattr);
-extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, int major, int minor);
+extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, unsigned int major, unsigned int minor);
extern int smb_proc_settime(struct dentry *dentry, struct smb_fattr *fattr);
extern int smb_proc_dskattr(struct super_block *sb, struct statfs *attr);
extern int smb_proc_read_link(struct smb_sb_info *server, struct dentry *d, char *buffer, int len);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-13 22:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-13 22:48 [PATCH] smb-diff Andries.Brouwer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®