Ejemplo n.º 1
0
int do_spi_part (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
#if defined (CONFIG_APP_IN_SPI)
    int ret=0;
    UBOOT_TRACE("IN\n");
    
    if(argc!=1)
    {
        cmd_usage(cmdtp);
        return -1;
    }
    ret=list_partition();
    if(ret==0)
    {
        UBOOT_TRACE("OK\n");
    }
    else
    {   UBOOT_ERROR("spi part fail\n");
    }
    return ret;
#else
    UBOOT_TRACE("IN\n");
    UBOOT_ERROR("This function doesn't support\n");
    return -1;
#endif
    
}
Ejemplo n.º 2
0
static void list_qsort_r(struct linked_list *list, void *cmp_func, int pos_s, int pos_e){
    if(pos_s>=pos_e)return;
    int pos = list_partition(list, pos_s, pos_e, cmp_func);
    list_qsort_r(list, cmp_func, pos+1, pos_e);
    list_qsort_r(list, cmp_func, pos_s, pos-1);
    
}