From: Tollef Fog Heen Date: Tue, 17 Jan 2012 20:36:38 +0000 (+0100) Subject: Only print directory listing if requested X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b01f0ceca3ac308a2998e846d163273f33a21ad8;p=gant Only print directory listing if requested --- 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); }