Skip to contentSkip to conversation

fs/9p: fix flags in the format of printf

PATCH New Cong Ding 1 participant 1 message Oct 27, 2013 9P file system

lore
Share & tools
lore

Cong Ding

author
#0 lore raw

PATCH 1/1 fs/9p: fix flags in the format of printf

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

---
 fs/9p/vfs_inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/9p/vfs_inode.c +1 -1
index af7d531..dcc099a 100644
@@ -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;
Signature · 1 line
1.7.9.5