From a7a0468ad3351665d24ae42b8f4618fb18deba9c Mon Sep 17 00:00:00 2001 From: AdminJack Date: Wed, 23 Dec 2015 08:21:06 +0100 Subject: [PATCH] fix Issue #1 Solve the problem of empty stdout pipe of redirect the pipe in Bash. --- src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.c b/src/main.c index 9f13c9e..2bc8a59 100644 --- a/src/main.c +++ b/src/main.c @@ -459,6 +459,7 @@ static int do_info(u3_handle_t *device) { printf("Total device size: "); print_human_size(1ll * U3_SECTOR_SIZE * device_properties.device_size); printf(" (%llu bytes)\n", 1ll * U3_SECTOR_SIZE * device_properties.device_size); + fflush(stdout); /* flush stdout stream to redirect stdout*/ printf("CD size: "); print_human_size(1ll * U3_SECTOR_SIZE * pinfo.cd_size);