]> err.no Git - gant/commitdiff
Only print directory listing if requested
authorTollef Fog Heen <tfheen@err.no>
Tue, 17 Jan 2012 20:36:38 +0000 (21:36 +0100)
committerTollef Fog Heen <tfheen@err.no>
Tue, 17 Jan 2012 20:36:38 +0000 (21:36 +0100)
fr60.c

diff --git a/fr60.c b/fr60.c
index 32fc5bfbc55d02d7a95050f547d0d4bf34b627c5..8a18c4c3a77a3fc4a4e24a26ee965ba94f23f6e1 100644 (file)
--- 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);
                                }