Changeset 619:2773d1d72455

Show
Ignore:
Timestamp:
06/19/08 11:03:36 (7 months ago)
Author:
Maxime Petazzoni <maxime.petazzoni@…>
Branch:
default
Message:

Remove debug messages, prepage best_overall demo

Location:
nxos
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • nxos/base/lib/fs/fs.c

    r616 r619  
    809809  while (nx_fs_find_next_origin(i, &origin) == FS_ERR_NO_ERROR) { 
    810810    volatile U32 *metadata = &(FLASH_BASE_PTR[origin*EFC_PAGE_WORDS]); 
     811    size_t npages = nx_fs_get_file_page_count( 
     812      nx_fs_get_file_size_from_metadata(metadata)); 
    811813 
    812814    memcpy(nameconv.integers, 
     
    817819    nx_display_string(":"); 
    818820    nx_display_string(nameconv.chars); 
     821    nx_display_string(":"); 
     822    nx_display_uint(npages); 
    819823    nx_display_end_line(); 
    820824 
    821     i = origin + nx_fs_get_file_page_count(nx_fs_get_file_size_from_metadata(metadata)); 
     825    i = origin + npages; 
    822826  } 
    823827 
     
    11261130  } 
    11271131 
     1132  nx_display_string("\nMSPF: "); 
    11281133  nx_display_uint(mean_space_per_file); 
    11291134  nx_display_end_line(); 
  • nxos/base/lib/rcmd/rcmd.c

    r601 r619  
    143143  } 
    144144 
    145   nx_display_string("moving?\n"); 
    146  
    147145  return RCMD_ERR_NO_ERROR; 
    148146} 
  • nxos/systems/tag-route/usb.c

    r618 r619  
    5454    // Disable local echo 
    5555    //  nx_display_string((char *)buf); 
    56     //  nx_display_end_line(); 
     56    nx_display_end_line(); 
    5757 
    5858    nx_rcmd_do((char *)buf); 
  • nxos/systems/tests/fs.c

    r617 r619  
    202202  nx_display_string("Starting...\n"); 
    203203 
    204   spawn_file("test1", 106968); 
    205   spawn_file("test2", 12750); 
    206   spawn_file("test3", 106968); 
    207   remove_file("test2"); 
    208  
    209   nx_fs_dump(); 
    210   while (nx_avr_get_button() != BUTTON_OK); 
    211   nx_systick_wait_ms(500); 
    212  
    213   nx_display_clear(); 
    214   nx_display_string("Defrag: "); 
    215   nx_display_uint(nx_fs_defrag_best_overall()); 
    216   nx_display_string(" done.\n"); 
    217   while (nx_avr_get_button() != BUTTON_OK); 
    218   nx_systick_wait_ms(500); 
    219  
    220   nx_display_clear(); 
    221   nx_fs_dump(); 
    222   while (nx_avr_get_button() != BUTTON_OK); 
    223   nx_systick_wait_ms(500); 
    224  
    225   destroy(); 
    226 } 
     204  spawn_file("test1", 4000); 
     205  spawn_file("test2", 7000); 
     206  spawn_file("test3", 8000); 
     207  spawn_file("test4", 300); 
     208  spawn_file("test5", 4000); 
     209  remove_file("test4"); 
     210 
     211  nx_fs_dump(); 
     212  while (nx_avr_get_button() != BUTTON_OK); 
     213  nx_systick_wait_ms(500); 
     214 
     215  nx_display_clear(); 
     216  nx_display_string("Defrag: "); 
     217  if (nx_fs_defrag_best_overall() != FS_ERR_NO_ERROR) { 
     218    nx_display_string("Error!"); 
     219  } else { 
     220    nx_display_string("Done."); 
     221  } 
     222  nx_display_end_line(); 
     223 
     224  while (nx_avr_get_button() != BUTTON_OK); 
     225  nx_systick_wait_ms(500); 
     226 
     227  nx_display_clear(); 
     228  nx_fs_dump(); 
     229  while (nx_avr_get_button() != BUTTON_OK); 
     230  nx_systick_wait_ms(500); 
     231 
     232  destroy(); 
     233} 
  • nxos/systems/tests/tests.c

    r616 r619  
    869869  //fs_test_defrag_simple(); 
    870870  //fs_test_defrag_empty(); 
    871   fs_test_defrag_for_file(); 
    872   //fs_test_defrag_best_overall(); 
     871  //fs_test_defrag_for_file(); 
     872  fs_test_defrag_best_overall(); 
    873873  goodbye(); 
    874874}