Changeset 521 for trunk/boot
- Timestamp:
- Aug 30, 2018, 6:39:41 PM (6 years ago)
- Location:
- trunk/boot/tsar_mips32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/boot/tsar_mips32/boot_fat32.c
r519 r521 401 401 * @ returns 0 on success, -1 on error. * 402 402 ****************************************************************************/ 403 static int get_path_component( char*pathname,404 char*path_component,405 uint32_t* nb_read)403 static int get_path_component( const char * pathname, 404 char * path_component, 405 uint32_t * nb_read) 406 406 { 407 407 uint32_t pathname_offset; // index used to scan the LFN entry … … 585 585 * @ returns 0 on success, -1 on error. * 586 586 ****************************************************************************/ 587 static int fat_file_search( char*pathname,588 uint32_t* first_cluster,589 uint32_t* file_size)587 static int fat_file_search( const char * pathname, 588 uint32_t * first_cluster, 589 uint32_t * file_size) 590 590 { 591 591 char path_comp[PATH_MAX_SIZE]; // Buffer for a path component … … 886 886 887 887 /////////////////////////////////////// 888 int boot_fat32_load( c har* pathname,889 uint32_t buff_addr,890 uint32_t buff_size )888 int boot_fat32_load( const char * pathname, 889 uint32_t buff_addr, 890 uint32_t buff_size ) 891 891 { 892 892 uint32_t cur_cluster; -
trunk/boot/tsar_mips32/boot_fat32.h
r474 r521 361 361 * @ returns 0 on success, -1 on error. * 362 362 ****************************************************************************/ 363 int boot_fat32_load( c har*pathname,364 uint32_t buff_addr,365 uint32_t buff_size );363 int boot_fat32_load( const char * pathname, 364 uint32_t buff_addr, 365 uint32_t buff_size ); 366 366 367 367 #endif // BOOT_FAT32_H -
trunk/boot/tsar_mips32/boot_tty_driver.c
r457 r521 74 74 75 75 ////////////////////////////////// 76 int boot_tty_write( c har* buf,77 uint32_t nbytes )76 int boot_tty_write( const char * buf, 77 uint32_t nbytes ) 78 78 { 79 79 uint32_t nb_printed; -
trunk/boot/tsar_mips32/boot_tty_driver.h
r457 r521 70 70 * @ returns 0 on success, -1 on error. 71 71 ****************************************************************************/ 72 int boot_tty_write( c har* buf,73 uint32_t nbytes );72 int boot_tty_write( const char * buf, 73 uint32_t nbytes ); 74 74 75 75 #endif // BOOT_TTY_DRIVER_H -
trunk/boot/tsar_mips32/boot_utils.c
r474 r521 282 282 283 283 /////////////////////////////////////// 284 void boot_strcpy( char* dest, char* src)284 void boot_strcpy( char * dest, const char * src) 285 285 { 286 286 /* Checking if the arguments are correct. */ … … 294 294 295 295 ///////////////////////////// 296 uint32_t boot_strlen( char* s)296 uint32_t boot_strlen( const char * s ) 297 297 { 298 298 uint32_t res = 0; /* Length of the string (in bytes). */ … … 309 309 310 310 /////////////////////////////////// 311 int boot_strcmp( char* s1, char* s2)311 int boot_strcmp( const char * s1, const char * s2 ) 312 312 { 313 313 if ((s1 == NULL) || (s2 == NULL)) … … 333 333 334 334 ///////////////////////// 335 void boot_puts( char* str)335 void boot_puts( const char * str ) 336 336 { 337 337 boot_tty_write(str, boot_strlen(str)); … … 340 340 341 341 /////////////////////////////////////// 342 void boot_printf( c har * format , ... )342 void boot_printf( const char * format , ... ) 343 343 { 344 344 va_list args; -
trunk/boot/tsar_mips32/boot_utils.h
r474 r521 150 150 * @ dest : pointer to the destination string. 151 151 ****************************************************************************/ 152 void boot_strcpy( char* dest, char* src);152 void boot_strcpy( char* dest, const char * src ); 153 153 154 154 /**************************************************************************** … … 158 158 * @ returns the number of bytes in the string. 159 159 ****************************************************************************/ 160 uint32_t boot_strlen( char* s);160 uint32_t boot_strlen( const char * s ); 161 161 162 162 /**************************************************************************** … … 166 166 * @ returns 0 if these 2 strings match, 1 otherwise. 167 167 ****************************************************************************/ 168 int boot_strcmp( char* s1, char* s2);168 int boot_strcmp( const char * s1, const char * s2 ); 169 169 170 170 /**************************************************************************** … … 177 177 * @ str : pointer to the string to be printed on the boot TTY terminal. 178 178 ****************************************************************************/ 179 void boot_puts( char* str);179 void boot_puts( const char* str ); 180 180 181 181 /**************************************************************************** … … 200 200 * - %s : NUL terminated string. 201 201 ****************************************************************************/ 202 void boot_printf( char* format, ...);202 void boot_printf( const char* format, ... ); 203 203 204 204 /****************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.