@@ -34,15 +34,15 @@ static void event_handler(lv_event_t * e)
3434 droidboot_log (DROIDBOOT_LOG_TRACE , "dualboot menu: got event\n" );
3535 lv_event_code_t code = lv_event_get_code (e );
3636 lv_obj_t * obj = lv_event_get_target (e );
37- int index = lv_obj_get_child_id (obj );
37+ uint32_t index = lv_obj_get_child_id (obj );
3838 if (code == LV_EVENT_CLICKED ) {
3939 //lvgl_show_boot_logo();
4040 // Lets firstly write index to metadata
4141 ext4_file f ;
4242 int ret = ext4_fopen (& f , "/boot/db/last_index" , "wb" );
4343
4444 char s [128 ]= "" ;
45- sprintf (s ,"%ld " , index );
45+ sprintf (s ,"%u " , index );
4646 ret = ext4_fwrite (& f , s , 128 , 0 );
4747 ret = ext4_fclose (& f );
4848
@@ -99,7 +99,7 @@ void timeout_handler(lv_timer_t * timer2)
9999 ret = ext4_fclose (& fp );
100100
101101 droidboot_log (DROIDBOOT_LOG_INFO , "droidboot_menu: last entry is: %s\n" , buf );
102- int index = droidboot_atoi (buf );
102+ uint index = droidboot_atoi (buf );
103103
104104 if (!strcmp ((droidboot_entry_list + index )-> kernel , "null" ))
105105 {
@@ -128,8 +128,8 @@ void droidboot_add_dualboot_menu_buttons(lv_obj_t * list1){
128128 strcat (title , (droidboot_entry_list + i )-> title );
129129 strcat (title , "\n" );
130130
131- if ((droidboot_entry_list + i )-> logo != " NULL" ){
132- char logo_path [strlen ((droidboot_entry_list + i )-> logo )+ strlen ("/boot/" + 3 ) ];
131+ if ((droidboot_entry_list + i )-> logo != NULL ){
132+ char logo_path [strlen ((droidboot_entry_list + i )-> logo )+ strlen ("/boot/" ) + 3 ];
133133 strcpy (logo_path , "/boot/" );
134134 strcat (logo_path , (droidboot_entry_list + i )-> logo );
135135 list_btn = lv_list_add_btn (list1 , droidboot_load_lvgl_image_from_ext4 (logo_path ), title );
0 commit comments