func: static void fw_cfg_machine_reset(void *opaque) void * ptr ; size_t len ; FWCfgState * s = opaque ; char * bootindex = get_boot_devices_list ( & len , false ) ; ptr = fw_cfg_modify_file ( s , "bootorder" , ( uint8_t * ) bootindex , len ); void *fw_cfg_modify_file(FWCfgState *s, const char void *data, size_t len) int i , index ; index = be32_to_cpu ( s -> files -> count ); for (i = 0; i < index; i++) if ( strcmp ( filename , s -> files -> f [ i ] . name ) == 0 )  fw_cfg_add_file_callback ( s , filename , NULL , NULL , data , len ); void fw_cfg_add_file_callback(FWCfgState *s,  const char FWCfgReadCallback callback, void void *data, size_t len) int i , index ; size_t dsize ; if ( ! s -> files )  dsize = sizeof ( uint32_t ) + sizeof ( FWCfgFile ) * FW_CFG_FILE_SLOTS; s -> files = g_malloc0 ( dsize ); index = be32_to_cpu ( s -> files -> count ); assert ( index < FW_CFG_FILE_SLOTS ); 