Changeset 619:2773d1d72455
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r616
|
r619
|
|
| 809 | 809 | while (nx_fs_find_next_origin(i, &origin) == FS_ERR_NO_ERROR) { |
| 810 | 810 | 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)); |
| 811 | 813 | |
| 812 | 814 | memcpy(nameconv.integers, |
| … |
… |
|
| 817 | 819 | nx_display_string(":"); |
| 818 | 820 | nx_display_string(nameconv.chars); |
| | 821 | nx_display_string(":"); |
| | 822 | nx_display_uint(npages); |
| 819 | 823 | nx_display_end_line(); |
| 820 | 824 | |
| 821 | | i = origin + nx_fs_get_file_page_count(nx_fs_get_file_size_from_metadata(metadata)); |
| | 825 | i = origin + npages; |
| 822 | 826 | } |
| 823 | 827 | |
| … |
… |
|
| 1126 | 1130 | } |
| 1127 | 1131 | |
| | 1132 | nx_display_string("\nMSPF: "); |
| 1128 | 1133 | nx_display_uint(mean_space_per_file); |
| 1129 | 1134 | nx_display_end_line(); |
-
|
r601
|
r619
|
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | | nx_display_string("moving?\n"); |
| 146 | | |
| 147 | 145 | return RCMD_ERR_NO_ERROR; |
| 148 | 146 | } |
-
|
r618
|
r619
|
|
| 54 | 54 | // Disable local echo |
| 55 | 55 | // nx_display_string((char *)buf); |
| 56 | | // nx_display_end_line(); |
| | 56 | nx_display_end_line(); |
| 57 | 57 | |
| 58 | 58 | nx_rcmd_do((char *)buf); |
-
|
r617
|
r619
|
|
| 202 | 202 | nx_display_string("Starting...\n"); |
| 203 | 203 | |
| 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 | } |
-
|
r616
|
r619
|
|
| 869 | 869 | //fs_test_defrag_simple(); |
| 870 | 870 | //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(); |
| 873 | 873 | goodbye(); |
| 874 | 874 | } |