linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] src/t_dir_type.c: Use strtoul() instead of atoll()
@ 2017-11-13 14:45 Chandan Rajendra
  2017-11-13 14:45 ` [PATCH 2/2] overlay: Test consistent st_ino numbers for non-samefs scenario Chandan Rajendra
  2017-11-13 14:57 ` [PATCH 1/2] src/t_dir_type.c: Use strtoul() instead of atoll() Amir Goldstein
  0 siblings, 2 replies; 8+ messages in thread
From: Chandan Rajendra @ 2017-11-13 14:45 UTC (permalink / raw)
  To: fstests, amir73il; +Cc: Chandan Rajendra, linux-unionfs, eguan

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 <chandan@linux.vnet.ibm.com>
---
 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 ( ; ; ) {
-- 
2.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-11-14 11:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-13 14:45 [PATCH 1/2] src/t_dir_type.c: Use strtoul() instead of atoll() Chandan Rajendra
2017-11-13 14:45 ` [PATCH 2/2] overlay: Test consistent st_ino numbers for non-samefs scenario Chandan Rajendra
2017-11-13 15:08   ` Amir Goldstein
2017-11-13 17:47   ` Amir Goldstein
2017-11-13 14:57 ` [PATCH 1/2] src/t_dir_type.c: Use strtoul() instead of atoll() Amir Goldstein
2017-11-14 11:13   ` Eryu Guan
2017-11-14 11:23     ` Amir Goldstein
2017-11-14 11:50       ` Eryu Guan

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).