[stgt] [PATCH 2/2] tgtimg: fix ssc image capacity bug

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Sat Dec 10 02:58:21 CET 2011


tgtimg can't create large image files.

Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
 usr/tgtimg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/tgtimg.c b/usr/tgtimg.c
index 169207a..cbad44b 100644
--- a/usr/tgtimg.c
+++ b/usr/tgtimg.c
@@ -257,9 +257,9 @@ static int ssc_new(int op, char *path, char *barcode, char *capacity,
 	struct MAM_info mi;
 	int fd, ret;
 	uint8_t current_media[1024];
-	uint32_t size;
+	uint64_t size;
 
-	sscanf(capacity, "%d", &size);
+	sscanf(capacity, "%llu", &size);
 	if (size == 0)
 		size = 8000;
 
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list