Changeset 1899 in MondoRescue


Ignore:
Timestamp:
Apr 3, 2008, 12:08:14 PM (16 years ago)
Author:
Bruno Cornec
Message:
  • Removes the useless uid field of the mountlist_line struct
  • Removes some \r found useless
  • Adds conditions of existence around button updates with Newt (valgrind feedback)
Location:
branches/2.2.6/mondo/src/common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.6/mondo/src/common/libmondo-mountlist.c

    r1646 r1899  
    956956               mountlist->el[items].mountpoint,
    957957               mountlist->el[items].format,
    958                siz, mountlist->el[items].label, mountlist->el[items].uuid);
     958               siz, mountlist->el[items].label);
    959959#elif __FreeBSD__
    960960        sscanf(incoming,
     
    964964               mountlist->el[items].format, siz);
    965965        strcpy(mountlist->el[items].label, "");
    966         strcpy(mountlist->el[items].uuid, "");
    967966#endif
    968967
     
    10181017                    mountlist->el[items].format,
    10191018                    mountlist->el[items].size,
    1020                     mountlist->el[items].label,
    1021                     mountlist->el[items].uuid);
     1019                    mountlist->el[items].label);
    10221020
    10231021            log_it(tmp);
     
    10651063                mountlist->el[i].device, mountlist->el[i].mountpoint,
    10661064                mountlist->el[i].format, mountlist->el[i].size,
    1067                 mountlist->el[i].label, mountlist->el[i].uuid);
     1065                mountlist->el[i].label);
    10681066    }
    10691067    paranoid_fclose(fout);
  • branches/2.2.6/mondo/src/common/libmondo-stream.c

    r1881 r1899  
    963963
    964964    /*@ long    ***************************************************** */
    965     long bytes_to_write = 0 /*,i */ ;
     965    long bytes_to_write = 0L /*,i */ ;
    966966//  long bytes_successfully_read_in_this_time = 0;
    967967
  • branches/2.2.6/mondo/src/common/mondostructures.h

    r1687 r1899  
    5959
    6060  /**
    61    * For ext2 and ext3, this is the filesystem label (if there is one). If not, this should be "".
     61   * For ext2 and ext3, this is the filesystem label or uuid (if there is one). If not, this should be "".
    6262   */
    6363    char label[256];
    6464
    65     /**
    66      * This is the filesystem UUID (if there is one). If not, this should be "".
    67      */
    68     char uuid[64];
    6965};
    7066
  • branches/2.2.6/mondo/src/common/newt-specific.c

    r1878 r1899  
    221221                system("sync");
    222222                printf
    223                     ("---promptdialogYN---1--- %s\r\n---promptdialogYN---Q--- [yes] [no] ---\r\n--> ",
     223                    ("---promptdialogYN---1--- %s\n---promptdialogYN---Q--- [yes] [no] ---\n--> ",
    224224                     prompt);
    225225                (void) fgets(tmp, MAX_NEWT_COMMENT_LEN, stdin);
     
    267267            system("sync");
    268268            printf
    269                 ("---promptdialogOKC---1--- %s\r\n---promptdialogOKC---Q--- [OK] [Cancel] ---\r\n--> ",
     269                ("---promptdialogOKC---1--- %s\n---promptdialogOKC---Q--- [OK] [Cancel] ---\n--> ",
    270270                 prompt);
    271271            (void) fgets(tmp, MAX_NEWT_COMMENT_LEN, stdin);
     
    791791        if (g_text_mode) {
    792792            printf
    793                 ("---promptpopup---1--- %s\r\n---promptpopup---Q--- [OK] ---\r\n--> ",
     793                ("---promptpopup---1--- %s\n---promptpopup---Q--- [OK] ---\n--> ",
    794794                 prompt);
    795795            while (((ch = getchar()) != '\n') && (ch != EOF));
     
    833833        if (g_text_mode) {
    834834            printf
    835                 ("---promptstring---1--- %s\r\n---promptstring---2--- %s\r\n---promptstring---Q---\r\n-->  ",
     835                ("---promptstring---1--- %s\n---promptstring---2--- %s\n---promptstring---Q---\n-->  ",
    836836                 title, b);
    837837            (void) fgets(output, maxsize, stdin);
     
    10811081        }
    10821082        if (!g_text_mode) {
    1083             newtLabelSetText(g_isoform_header, g_isoform_header_str);
     1083            if (g_isoform_header) {
     1084                newtLabelSetText(g_isoform_header, g_isoform_header_str);
     1085            }
    10841086        }
    10851087        g_mysterious_dot_counter = (g_mysterious_dot_counter + 1) % 27;
     
    11171119                            "] %3d%% done; %2ld:%02ld to go", percentage,
    11181120                            time_remaining / 60, time_remaining % 60);
    1119                     printf("---evalcall---1--- %s\r\n",
     1121                    printf("---evalcall---1--- %s\n",
    11201122                           g_isoform_header_str);
    1121                     printf("---evalcall---2--- %s\r\n", taskprogress);
    1122                     printf("---evalcall---E---\r\n");
     1123                    printf("---evalcall---2--- %s\n", taskprogress);
     1124                    printf("---evalcall---E---\n");
    11231125                }
    11241126            } else {
    11251127                newtScaleSet(g_isoform_scale,
    11261128                             (unsigned long long) percentage);
    1127                 newtLabelSetText(g_isoform_pcline, pcline_str);
    1128                 if (percentage >= 3) {
     1129                if (g_isoform_pcline) {
     1130                    newtLabelSetText(g_isoform_pcline, pcline_str);
     1131                }
     1132                if ((percentage >= 3) && (g_isoform_timeline)) {
    11291133                    newtLabelSetText(g_isoform_timeline, timeline_str);
    11301134                }
     
    12481252
    12491253        if (g_text_mode) {
    1250             printf("---progress-form---1--- %s\r\n", blurb1);
    1251             printf("---progress-form---2--- %s\r\n", blurb2);
    1252             printf("---progress-form---3--- %s\r\n", blurb3);
     1254            printf("---progress-form---1--- %s\n", blurb1);
     1255            printf("---progress-form---2--- %s\n", blurb2);
     1256            printf("---progress-form---3--- %s\n", blurb3);
    12531257            printf("---progress-form---E---\n");
    12541258            sprintf(taskprogress, "TASK:  [");
     
    12671271                    " done; %2ld:%02ld to go",
    12681272                    time_remaining / 60, time_remaining % 60);
    1269             printf("---progress-form---4--- %s\r\n", taskprogress);
     1273            printf("---progress-form---4--- %s\n", taskprogress);
    12701274        } else {
    12711275            center_string(blurb1, 54);
    12721276            center_string(blurb2, 54);
    12731277            center_string(blurb3, 54);
    1274             newtLabelSetText(g_blurb1, blurb1);
    1275             newtLabelSetText(g_blurb2, blurb3);
    1276             newtLabelSetText(g_blurb3, blurb2);
     1278            if (g_blurb1) {
     1279                newtLabelSetText(g_blurb1, blurb1);
     1280            }
     1281            if (g_blurb2) {
     1282                newtLabelSetText(g_blurb2, blurb3);
     1283            }
     1284            if (g_blurb3) {
     1285                newtLabelSetText(g_blurb3, blurb2);
     1286            }
    12771287            newtScaleSet(g_scale, (unsigned long long) g_current_progress);
    1278             if (percentage >= 2) {
     1288            if ((percentage >= 2) && (g_timeline)) {
    12791289                newtLabelSetText(g_timeline, timeline_str);
    12801290            }
    1281             newtLabelSetText(g_percentline, percentline_str);
     1291            if (g_percentline) {
     1292                newtLabelSetText(g_percentline, percentline_str);
     1293            }
    12821294            newtRefresh();
    12831295        }
Note: See TracChangeset for help on using the changeset viewer.