Commit 7a263f1b authored by Ben Collins's avatar Ben Collins

Merge http://linux.bkbits.net/linux-2.5

into debian.org:/usr/src/kernel/sparc-2.6
parents db5bd7ba 7b080b4c
......@@ -560,19 +560,19 @@ static int smb_filetype_to_mode(u32 filetype)
static u32 smb_filetype_from_mode(int mode)
{
if (mode & S_IFREG)
if (S_ISREG(mode))
return UNIX_TYPE_FILE;
if (mode & S_IFDIR)
if (S_ISDIR(mode))
return UNIX_TYPE_DIR;
if (mode & S_IFLNK)
if (S_ISLNK(mode))
return UNIX_TYPE_SYMLINK;
if (mode & S_IFCHR)
if (S_ISCHR(mode))
return UNIX_TYPE_CHARDEV;
if (mode & S_IFBLK)
if (S_ISBLK(mode))
return UNIX_TYPE_BLKDEV;
if (mode & S_IFIFO)
if (S_ISFIFO(mode))
return UNIX_TYPE_FIFO;
if (mode & S_IFSOCK)
if (S_ISSOCK(mode))
return UNIX_TYPE_SOCKET;
return UNIX_TYPE_UNKNOWN;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment