From patchwork Sun Oct 27 03:36:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cong Ding X-Patchwork-Id: 3099101 Return-Path: X-Original-To: patchwork-v9fs-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB82C9F6F8 for ; Sun, 27 Oct 2013 03:37:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF65620295 for ; Sun, 27 Oct 2013 03:37:09 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4E0A20250 for ; Sun, 27 Oct 2013 03:37:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1VaH9r-0005g7-0N; Sun, 27 Oct 2013 03:36:55 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1VaH9o-0005g0-Qh for v9fs-developer@lists.sourceforge.net; Sun, 27 Oct 2013 03:36:52 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.192.181 as permitted sender) client-ip=209.85.192.181; envelope-from=dinggnu@gmail.com; helo=mail-pd0-f181.google.com; Received: from mail-pd0-f181.google.com ([209.85.192.181]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1VaH9n-0004pY-Te for v9fs-developer@lists.sourceforge.net; Sun, 27 Oct 2013 03:36:52 +0000 Received: by mail-pd0-f181.google.com with SMTP id x10so933213pdj.26 for ; Sat, 26 Oct 2013 20:36:46 -0700 (PDT) X-Received: by 10.67.21.130 with SMTP id hk2mr18768172pad.76.1382845005952; Sat, 26 Oct 2013 20:36:45 -0700 (PDT) Received: from cd-ucr.cs.ucr.edu ([169.235.25.200]) by mx.google.com with ESMTPSA id fa4sm24573659pab.17.2013.10.26.20.36.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 26 Oct 2013 20:36:45 -0700 (PDT) From: Cong Ding To: Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Date: Sat, 26 Oct 2013 20:36:23 -0700 Message-Id: <1382844984-7550-1-git-send-email-dinggnu@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-Spam-Score: -1.6 (-) X-Headers-End: 1VaH9n-0004pY-Te Cc: Cong Ding Subject: [V9fs-developer] [PATCH] fs/9p: fix flags in the format of printf X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To print "int" value, we should use %d rather than %u. Signed-off-by: Cong Ding --- 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;