diff options
author | Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> | 2010-05-22 13:20:30 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-05-22 13:34:12 -0400 |
commit | 75cc5c9b82a31936d2a8cb75f34752000e244015 (patch) | |
tree | 1c783ff2a3d50297c9f1c1f0130927b4dd478297 /fs/9p | |
parent | 85e0df240e9376ff58eb1a50d9854f5f176dd297 (diff) |
9p: Add mksock support
Without this patch, an attempt to mksock will get an EINVAL.
Before this patch:
[root@localhost 1dir]# mksock mysock
mksock: error making mysock: Invalid argument
With this patch:
[root@localhost 1dir]# mksock mysock
[root@localhost 1dir]# ls -l mysock
s--------- 1 root root 0 2010-03-31 17:44 mysock
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/vfs_inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index b44c99979143..29367ee25cb8 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -1227,6 +1227,8 @@ v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) | |||
1227 | sprintf(name, "c %u %u", MAJOR(rdev), MINOR(rdev)); | 1227 | sprintf(name, "c %u %u", MAJOR(rdev), MINOR(rdev)); |
1228 | else if (S_ISFIFO(mode)) | 1228 | else if (S_ISFIFO(mode)) |
1229 | *name = 0; | 1229 | *name = 0; |
1230 | else if (S_ISSOCK(mode)) | ||
1231 | *name = 0; | ||
1230 | else { | 1232 | else { |
1231 | __putname(name); | 1233 | __putname(name); |
1232 | return -EINVAL; | 1234 | return -EINVAL; |