Changeset 41419


Ignore:
Timestamp:
12/14/17 19:43:01 (5 years ago)
Author:
gost
Message:

[titan] hd51 MultiBoot install image

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/frontenddev.h

    r41392 r41419  
    25062506                err("FE_SET_PROPERTY failed -> use procfs to switch delivery system tuner %d mode %s type %d",tuner->devnr ,value, type);
    25072507                ret = -1;
    2508         }
    2509         else
    2510         {
    2511                 printf("fe set property value %s data %d ... RC:%i\n", value, p[1].u.data, ret);
    2512         }
    2513        
    2514                 if(wasopen != 1)
    2515                         feclose(tuner, -1);
     2508
    25162509                hypridtuner = getconfig("hypridtuner", NULL);
    25172510                if(hypridtuner != NULL)
     
    25402533                        printf("set system tuner to %s ... file not found -> %s\n", value, buf);
    25412534                free(buf); buf = NULL;
    2542        
     2535        }
     2536        else
     2537        {
     2538                printf("fe set property value %s data %d ... RC:%i\n", value, p[1].u.data, ret);
     2539        }
     2540
     2541        if(wasopen != 1)
     2542                feclose(tuner, -1);
    25432543        if(ret > -1)
    25442544                return 1; //true
  • titan/titan/multiboot.h

    r41417 r41419  
    1010        imagedir = screendir("/tmp", "*.bz2", NULL, NULL, NULL, NULL, 0, "SELECT", 0, NULL, 0, NULL, 0, 1200, 0, 600, 0, 0);
    1111        if(imagedir == NULL)
    12                 return 0;
     12                return 2;
    1313        point = strrchr(imagedir,'/');
    1414        if(point == NULL)
     
    3434        char *tmpstr3 = NULL;
    3535        char *ownpart = NULL;
     36        char *instpart = NULL;
    3637        char *ownpartname = NULL;
    3738        int neustart = 0;
     
    4546        while(end == 0)
    4647        {
     48                changechoiceboxvalue(partitions, NULL);
     49               
    4750                tmpstr = readsys("/boot/STARTUP", 1);
    4851                tmpstr2 = ostrstr(tmpstr, "kernel");
     
    117120                        if(rcret == getrcconfigint("rcred", NULL))
    118121                        {
     122                                tmpstr = ostrcat("/boot/", partitions->ret, 0, 0);
     123                                tmpstr2 = readsys(tmpstr, 1);
     124                                tmpstr3 = ostrstr(tmpstr2, "kernel");
     125                                if(tmpstr3 != NULL)
     126                                {
     127                                        tmpstr3[7] = '\0';
     128                                        instpart = ostrcat(tmpstr3+6, NULL, 0, 0);
     129                                }
     130                                free(tmpstr); tmpstr = NULL;
     131                                free(tmpstr2); tmpstr2 = NULL;
     132                                tmpstr3 = NULL;                 
     133                               
    119134                                if(ostrcmp(ownpartname, partitions->ret) == 0)
    120135                                {
    121136                                        if(textbox("MultiBoot", _("You have chosen the active image\nDo you really want to overwrite this?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 650, 200, 0, 0) == 1)
    122                                                 ret = install_image(partitions->ret);
     137                                                ret = install_image(instpart);
     138                                        else
     139                                                ret = 2;
    123140                                }
    124141                                else
    125142                                {
    126143                                        if(textbox("MultiBoot", _("Do you really want to overwrite the chosen image?"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 650, 200, 0, 0) == 1)
    127                                                 ret = install_image(partitions->ret);
     144                                                ret = install_image(instpart);
     145                                        else
     146                                                ret = 2;
    128147                                }       
    129                                 if(ret)
     148                                if(ret == 1)
    130149                                        textbox("MultiBoot", _("The image was successfully installed"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 650, 200, 0, 0);     
    131                                 else
     150                                if(ret == 0)
    132151                                        textbox("MultiBoot", _("ERROR: The installation ends with error"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 650, 200, 0, 0);                           
     152                                ret = 0;
     153                                free(instpart); instpart = NULL;
     154                                break;
     155                        }
     156                        if(rcret == getrcconfigint("rcgreen", NULL))
     157                        {
     158                                tmpstr = screeninputhelp(partitions->ret, 0, 0, 0);
     159                                if(tmpstr != NULL)
     160                                {
     161                                        tmpstr = ostrcat("/boot/", tmpstr, 0, 1);
     162                                        tmpstr2 = ostrcat("/boot/", partitions->ret, 0, 0);
     163                                        tmpstr3 = ostrcat("mv ", tmpstr2, 0, 0);
     164                                        tmpstr3 = ostrcat(tmpstr3, " ", 1, 0);
     165                                        tmpstr3 = ostrcat(tmpstr3, tmpstr, 1, 0);
     166                                        system(tmpstr3);
     167                                        free(tmpstr); tmpstr = NULL;
     168                                        free(tmpstr2); tmpstr2 = NULL;
     169                                        free(tmpstr3); tmpstr3 = NULL;
     170                                        break;
     171                                }
    133172                        }
    134173                }
     
    136175                clearscreen(screen);
    137176                free(ownpart); ownpart = NULL;
     177                free(ownpartname); ownpartname = NULL;
    138178        }
    139179        if(neustart == 1)
Note: See TracChangeset for help on using the changeset viewer.