From patchwork Mon Nov 13 14:45:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10056213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B34D860215 for ; Mon, 13 Nov 2017 14:49:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A946D2937F for ; Mon, 13 Nov 2017 14:49:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CDB128E6D; Mon, 13 Nov 2017 14:49:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36B8828E6D for ; Mon, 13 Nov 2017 14:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753708AbdKMOtA (ORCPT ); Mon, 13 Nov 2017 09:49:00 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40234 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753702AbdKMOs6 (ORCPT ); Mon, 13 Nov 2017 09:48:58 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vADEmqSs128941 for ; Mon, 13 Nov 2017 09:48:58 -0500 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e7a6n2cy9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 13 Nov 2017 09:48:40 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Nov 2017 07:44:37 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 13 Nov 2017 07:44:33 -0700 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vADEiXSp1048834; Mon, 13 Nov 2017 07:44:33 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3BEB213603C; Mon, 13 Nov 2017 07:44:33 -0700 (MST) Received: from localhost.localdomain.com (unknown [9.102.2.91]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id 3455013603A; Mon, 13 Nov 2017 07:44:30 -0700 (MST) From: Chandan Rajendra To: fstests@vger.kernel.org, amir73il@gmail.com Cc: Chandan Rajendra , linux-unionfs@vger.kernel.org, eguan@redhat.com Subject: [PATCH 1/2] src/t_dir_type.c: Use strtoul() instead of atoll() Date: Mon, 13 Nov 2017 20:15:26 +0530 X-Mailer: git-send-email 2.9.5 X-TM-AS-GCONF: 00 x-cbid: 17111314-0024-0000-0000-0000177A60DC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008064; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00945292; UDB=6.00477052; IPR=6.00725589; BA=6.00005689; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017991; XFM=3.00000015; UTC=2017-11-13 14:44:35 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111314-0025-0000-0000-00004D7B961C Message-Id: <20171113144527.1034-1-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-13_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711130208 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP An overlayfs filesystem instance with one lowerdir filesystem and with "xino" mount option enabled can have the layer index encoded in the 63rd bit of the inode number. A signed 64 bit integer won't suffice to store this inode number. Hence this commit uses strtoul() to convert the inode number in string form to unsigned integer form. Signed-off-by: Chandan Rajendra --- src/t_dir_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_dir_type.c b/src/t_dir_type.c index 76aaa9b..7bba304 100644 --- a/src/t_dir_type.c +++ b/src/t_dir_type.c @@ -85,7 +85,7 @@ main(int argc, char *argv[]) break; /* no match ends up with type = -1 */ if (type < 0) - ino = atoll(argv[2]); + ino = strtoul(argv[2], NULL, 10); } for ( ; ; ) {