AOSP: e2fsdroid: don't print empty files in block_list.c:end_new_file

Change-Id: I4b38841c9c36a8faaa9f65bc7b61c7abdddab094
Signed-off-by: Ben Fennema <fennema@google.com>
From AOSP commit: cc933ab3bfee821dc885fe5a6bbb2a4997304ff9

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Ben Fennema 2017-03-08 22:44:17 -08:00 committed by Theodore Ts'o
parent 1333f2b35f
commit 1ca6a8921a

View File

@ -63,7 +63,7 @@ static int end_new_file(void *data)
{ {
struct block_list *params = data; struct block_list *params = data;
if (!params->entry.filename) if (!params->entry.filename || !params->entry.head)
return 0; return 0;
if (fprintf(params->f, "%s%s ", params->mountpoint, if (fprintf(params->f, "%s%s ", params->mountpoint,
params->entry.filename) < 0 params->entry.filename) < 0