@@ -74,7 +74,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_posix_mkfs_obj, 1, 2, mp_posix_mkfs);
7474mp_obj_t mp_posix_chdir (mp_obj_t path_in ) {
7575 const char * changepath = mp_obj_str_get_str (path_in );
7676 if (chdir (changepath ) != 0 ) {
77- rt_kprintf ( "No such directory: %s\n" , changepath );
77+ mp_printf ( & mp_plat_print , "No such directory: %s\n" , changepath );
7878 }
7979 return mp_const_none ;
8080}
@@ -152,7 +152,7 @@ mp_obj_t mp_posix_listdir(size_t n_args, const mp_obj_t *args) {
152152 mp_obj_get_array_fixed_n (next , 3 , & items );
153153 mp_obj_list_append (dir_list , items [0 ]);
154154 } else {
155- rt_kprintf ( "BAD file: %s\n" , dirent .d_name );
155+ mp_printf ( & mp_plat_print , "BAD file: %s\n" , dirent .d_name );
156156 }
157157 rt_free (fullpath );
158158 }
@@ -162,7 +162,7 @@ mp_obj_t mp_posix_listdir(size_t n_args, const mp_obj_t *args) {
162162 }
163163 else
164164 {
165- // rt_kprintf( "No such directory\n");
165+ // mp_printf(&mp_plat_print, "No such directory\n");
166166 }
167167 if (pathname == NULL )
168168 rt_free (path );
@@ -184,12 +184,12 @@ MP_DEFINE_CONST_FUN_OBJ_1(mp_posix_mkdir_obj, mp_posix_mkdir);
184184mp_obj_t mp_posix_remove (uint n_args , const mp_obj_t * arg ) {
185185 int index ;
186186 if (n_args == 0 ) {
187- rt_kprintf ( "Usage: rm FILE...\n" );
188- rt_kprintf ( "Remove (unlink) the FILE(s).\n" );
187+ mp_printf ( & mp_plat_print , "Usage: rm FILE...\n" );
188+ mp_printf ( & mp_plat_print , "Remove (unlink) the FILE(s).\n" );
189189 return mp_const_none ;
190190 }
191191 for (index = 0 ; index < n_args ; index ++ ) {
192- //rt_kprintf( "Remove %s.\n", mp_obj_str_get_str(arg[index]));
192+ //mp_printf(&mp_plat_print, "Remove %s.\n", mp_obj_str_get_str(arg[index]));
193193 unlink (mp_obj_str_get_str (arg [index ]));
194194 }
195195 // TODO recursive deletion
@@ -211,12 +211,12 @@ MP_DEFINE_CONST_FUN_OBJ_2(mp_posix_rename_obj, mp_posix_rename);
211211mp_obj_t mp_posix_rmdir (uint n_args , const mp_obj_t * arg ) {
212212 int index ;
213213 if (n_args == 0 ) {
214- rt_kprintf ( "Usage: rm FILE...\n" );
215- rt_kprintf ( "Remove (unlink) the FILE(s).\n" );
214+ mp_printf ( & mp_plat_print , "Usage: rm FILE...\n" );
215+ mp_printf ( & mp_plat_print , "Remove (unlink) the FILE(s).\n" );
216216 return mp_const_none ;
217217 }
218218 for (index = 0 ; index < n_args ; index ++ ) {
219- //rt_kprintf( "Remove %s.\n", mp_obj_str_get_str(arg[index]));
219+ //mp_printf(&mp_plat_print, "Remove %s.\n", mp_obj_str_get_str(arg[index]));
220220 rmdir (mp_obj_str_get_str (arg [index ]));
221221 }
222222 // TODO recursive deletion
0 commit comments