From b01f0ceca3ac308a2998e846d163273f33a21ad8 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Tue, 17 Jan 2012 21:36:38 +0100 Subject: [PATCH] Only print directory listing if requested --- fr60.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fr60.c b/fr60.c index 32fc5bf..8a18c4c 100644 --- a/fr60.c +++ b/fr60.c @@ -343,14 +343,12 @@ decode_antfs_dir(const uchar* blast, uint blsize) exit(1); } - print_dir_entry((struct antfs_dir_entry*) (blast+pos)); if (((struct antfs_dir_entry*) blast)->fileno == 0) { break; } memcpy(antfsdir + antfsdir_used, blast + pos, ANTFSDIRSIZE); antfsdir[antfsdir_used].last_modified += clock_offset; -/* print_dir_entry(&antfsdir[antfsdir_used]);*/ ++antfsdir_used; } D("%d entries in directory\n", antfsdir_used); @@ -656,6 +654,10 @@ chevent(uchar chan, uchar event) D("=)== used: %d\n", antfsdir_used); if (action && strcmp(action, "ls") == 0) { + int i; + for (i = 0; i < antfsdir_used; i++) { + print_dir_entry(&antfsdir[i]); + } exit(0); } -- 2.39.5