u-boot os function pointer array initialization
Hi all,
I am looking at cmd_bootm.c of the u-boot code. Can someone explain to me the following syntax? boot_os_fn is a function pointer after typedef. I know it's trying to initialize an array of function pointer, but I don't understand this index in particular: "[IH_OS_LINUX] = do_bootm_linux" static boot_os_fn *boot_os[] = { #ifdef CONFIG_BOOTM_LINUX [IH_OS_LINUX] = do_bootm_linux, #endif #ifdef CONFIG_BOOTM_NETBSD [IH_OS_NETBSD] = do_bootm_netbsd, #endif #ifdef CONFIG_LYNXKDI [IH_OS_LYNXOS] = do_bootm_lynxkdi, #endif #ifdef CONFIG_BOOTM_RTEMS [IH_OS_RTEMS] = do_bootm_rtems, #endif #if defined(CONFIG_CMD_ELF) [IH_OS_VXWORKS] = do_bootm_vxworks, [IH_OS_QNX] = do_bootm_qnxelf, #endif #ifdef CONFIG_INTEGRITY [IH_OS_INTEGRITY] = do_bootm_integrity, #endif }; Thanks, DX |
All times are GMT -5. The time now is 03:58 AM. |