Skip to content

Commit

Permalink
9p: Add mksock support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Venkateswararao Jujjuri authored and Eric Van Hensbergen committed May 22, 2010
1 parent 85e0df2 commit 75cc5c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,8 @@ v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
sprintf(name, "c %u %u", MAJOR(rdev), MINOR(rdev));
else if (S_ISFIFO(mode))
*name = 0;
else if (S_ISSOCK(mode))
*name = 0;
else {
__putname(name);
return -EINVAL;
Expand Down

0 comments on commit 75cc5c9

Please sign in to comment.