Skip to contentSkip to conversation

blkparse: treat sector as %llu for custom format like elsewhere in code

PATCH In review Steffen Maier 1 participant 1 message Apr 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 26/31 blkparse: treat sector as %llu for custom format like elsewhere in code

blk_io_trace.sector is __u64.

---
 blkparse_fmt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
blkparse_fmt.c +2 -1
index c110dad10b0b..818208808198 100644
@@ -230,7 +230,8 @@ static void print_field(char *act, struct per_cpu_info *pci,
 		fprintf(ofp, strcat(format, "ld"), t->sequence);
 		break;
 	case 'S':
-		fprintf(ofp, strcat(format, "lu"), t->sector);
+		fprintf(ofp, strcat(format, "llu"),
+			(unsigned long long)t->sector);
 		break;
 	case 't':
 		sprintf(format, "%%0%dlu", has_w ? width : 9);
Signature · 1 line
2.14.2