From afe604d01ff62dd664440692d1c13d18578ddeaa Mon Sep 17 00:00:00 2001 From: Toralf Förster Date: Sat, 26 Apr 2014 19:28:13 +0200 Subject: fs/9p: adjust sscanf parameters accordingly to the variable types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Toralf Förster Signed-off-by: Eric Van Hensbergen --- fs/9p/vfs_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/9p') diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 53161ec058a7..7ccf6de516a3 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -147,7 +147,7 @@ static umode_t p9mode2unixmode(struct v9fs_session_info *v9ses, int major = -1, minor = -1; strlcpy(ext, stat->extension, sizeof(ext)); - sscanf(ext, "%c %u %u", &type, &major, &minor); + sscanf(ext, "%c %i %i", &type, &major, &minor); switch (type) { case 'c': res |= S_IFCHR; -- cgit v1.2.3 From f15844e0777fec936f87a87f97394f83911dacd3 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Wed, 21 May 2014 10:02:12 +0200 Subject: 9P: fix return value in v9fs_fid_xattr_set v9fs_fid_xattr_set is supposed to return 0 on success. This corrects the behaviour introduced in commit bdd5c28dcb8330b9074404cc92a0b83aae5606a "9p: fix return value in case in v9fs_fid_xattr_set()" (The function returns a negative error on error, as expected) Signed-off-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen --- fs/9p/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/9p') diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c index 04133a1fd9cb..f95e01e058e4 100644 --- a/fs/9p/xattr.c +++ b/fs/9p/xattr.c @@ -156,7 +156,7 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name, offset += write_count; value_len -= write_count; } - retval = offset; + retval = 0; err: p9_client_clunk(fid); return retval; -- cgit v1.2.3