linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/9p: fix flags in the format of printf
@ 2013-10-27  3:36 Cong Ding
  0 siblings, 0 replies; only message in thread
From: Cong Ding @ 2013-10-27  3:36 UTC (permalink / raw)
  To: Eric Van Hensbergen, Ron Minnich, Latchesar Ionkov,
	v9fs-developer, linux-kernel
  Cc: Cong Ding

To print "int" value, we should use %d rather than %u.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 fs/9p/vfs_inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index af7d531..dcc099a 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 %d %d", &type, &major, &minor);
 		switch (type) {
 		case 'c':
 			res |= S_IFCHR;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-27  3:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-27  3:36 [PATCH] fs/9p: fix flags in the format of printf Cong Ding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).