Ignore:
Timestamp:
Sep 25, 2013, 9:03:25 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • revert r3188 & r3189 as I started to work on branch 3.0 before deciding it was much better to do it in 3.2. This will allow some small maintenance work on 3.0 if needed, while pushing all the rest to 3.2 and providing early access to it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/common/libmondo-devices.c

    r3188 r3192  
    2121#include "libmondo-stream-EXT.h"
    2222
    23 extern void mr_strip_spaces(char *);
    24 
    2523#include <sys/types.h>
    2624#ifdef __FreeBSD__
     
    129127{
    130128    char *tmp = NULL;
     129    char *comment;
    131130    bool is_this_a_ramdisk = FALSE;
    132131
     132    malloc_string(comment);
    133133    mr_asprintf(tmp, "%s", where_is_root_mounted());
    134     log_msg(0, "root is mounted at %s\n", tmp);
    135     log_msg(0, "That doesn't mean %s is the root partition. It's just a debugging message. Relax. It's part of am_I_in_disaster_recovery_mode().", tmp);
     134    sprintf(comment, "root is mounted at %s\n", tmp);
     135    log_msg(0, comment);
     136    log_msg(0,
     137            "No, Schlomo, that doesn't mean %s is the root partition. It's just a debugging message. Relax. It's part of am_I_in_disaster_recovery_mode().",
     138            tmp);
    136139
    137140#ifdef __FreeBSD__
     
    153156    if (is_this_a_ramdisk) {
    154157        if (!does_file_exist("/THIS-IS-A-RAMDISK")) {
    155             log_to_screen("Using /dev/root is stupid of you but I'll forgive you.");
     158            log_to_screen
     159                ("Using /dev/root is stupid of you but I'll forgive you.");
    156160            is_this_a_ramdisk = FALSE;
    157161        }
     
    160164        is_this_a_ramdisk = TRUE;
    161165    }
    162 
    163     log_msg(1, "Is this a ramdisk? result = %s", (is_this_a_ramdisk) ? "TRUE" : "FALSE");
     166    paranoid_free(comment);
     167    log_msg(1, "Is this a ramdisk? result = %d", is_this_a_ramdisk);
    164168    return (is_this_a_ramdisk);
    165169}
     
    225229int eject_device(char *dev)
    226230{
    227     char *command = NULL;
     231    char *command;
    228232    int res1 = 0, res2 = 0;
    229233
    230     if (dev == NULL) {
    231         return (1);
    232     }
     234    malloc_string(command);
    233235
    234236    if (IS_THIS_A_STREAMING_BACKUP(g_backup_media_type)
    235237        && g_backup_media_type != udev) {
    236         mr_asprintf(command, "mt -f %s offline", dev);
     238        sprintf(command, "mt -f %s offline", dev);
    237239        res1 = run_program_and_log_output(command, 1);
    238         mr_free(command);
    239240    } else {
    240241        res1 = 0;
     
    243244#ifdef __FreeBSD__
    244245    if (strstr(dev, "acd")) {
    245         mr_asprintf(command, "cdcontrol -f %s eject", dev);
     246        sprintf(command, "cdcontrol -f %s eject", dev);
    246247    } else {
    247         mr_asprintf(command, "camcontrol eject `echo %s | sed 's|/dev/||'`", dev);
     248        sprintf(command, "camcontrol eject `echo %s | sed 's|/dev/||'`",
     249                dev);
    248250    }
    249251#else
    250     mr_asprintf(command, "eject %s", dev);
     252    sprintf(command, "eject %s", dev);
    251253#endif
    252254
    253255    log_msg(3, "Ejecting %s", dev);
    254256    res2 = run_program_and_log_output(command, 1);
    255     mr_free(command);
     257    paranoid_free(command);
    256258    if (res1 && res2) {
    257259        return (1);
     
    268270int inject_device(char *dev)
    269271{
    270     char *command = NULL;
     272    char *command;
    271273    int i;
    272274
    273     if (dev == NULL) {
    274         return (1);
    275     }
     275    malloc_string(command);
     276
    276277
    277278#ifdef __FreeBSD__
    278279    if (strstr(dev, "acd")) {
    279         mr_asprintf(command, "cdcontrol -f %s close", dev);
     280        sprintf(command, "cdcontrol -f %s close", dev);
    280281    } else {
    281         mr_asprintf(command, "camcontrol load `echo %s | sed 's|/dev/||'`", dev);
     282        sprintf(command, "camcontrol load `echo %s | sed 's|/dev/||'`",
     283                dev);
    282284    }
    283285#else
    284     mr_asprintf(command, "eject -t %s", dev);
     286    sprintf(command, "eject -t %s", dev);
    285287#endif
    286288    i = run_program_and_log_output(command, FALSE);
    287     mr_free(command);
     289    paranoid_free(command);
    288290    return (i);
    289291}
     
    299301
    300302    /*@ buffers *********************************************************** */
    301     char *tmp = NULL;
     303    char *tmp;
    302304    bool ret;
    303305
     306    malloc_string(tmp);
    304307    assert_string_is_neither_NULL_nor_zerolength(device);
    305308
    306     mr_asprintf(tmp, "ls %s > /dev/null 2> /dev/null", device);
     309    sprintf(tmp, "ls %s > /dev/null 2> /dev/null", device);
    307310
    308311    if (system(tmp)) {
     
    311314        ret = TRUE;
    312315    }
    313     mr_free(tmp);
     316    paranoid_free(tmp);
    314317    return (ret);
    315318}
     
    342345{
    343346    /*@ buffers **************************************************** */
    344     char *program = NULL;
    345     char *incoming = NULL;
     347    char *program;
     348    char *incoming;
    346349    char *searchstr = NULL;
     350    char *tmp;
     351    char *p;
    347352
    348353    /*@ ints ******************************************************* */
     
    351356    /*@ pointers *************************************************** */
    352357    FILE *fin;
     358
    353359
    354360    /*@ end vars *************************************************** */
     
    356362    assert(partno >= 0 && partno < 999);
    357363
     364    malloc_string(program);
     365    malloc_string(incoming);
    358366    malloc_string(searchstr);
     367    malloc_string(tmp);
    359368
    360369#ifdef __FreeBSD__
    361370    // We assume here that this is running from mondorestore. (It is.)
    362     mr_asprintf(program, "ls %s %s >/dev/null 2>&1", drive, build_partition_name(tmp, drive, partno));
    363     res = system(program);
    364     mr_free(program);
    365     return(res);
    366 #endif
    367 
    368     mr_asprintf(program, "parted2fdisk -l %s 2> /dev/null", drive);
     371    sprintf(program, "ls %s %s >/dev/null 2>&1", drive,
     372            build_partition_name(tmp, drive, partno));
     373    return system(program);
     374#else
     375    tmp[0] = '\0';
     376#endif
     377
     378    sprintf(program, "parted2fdisk -l %s 2> /dev/null", drive);
    369379    fin = popen(program, "r");
    370380    if (!fin) {
    371381        log_it("program=%s", program);
    372382        log_OS_error("Cannot popen-in program");
    373         mr_free(program);
    374383        return (0);
    375384    }
    376     mr_free(program);
    377 
    378385    (void) build_partition_name(searchstr, drive, partno);
    379386    strcat(searchstr, " ");
    380     for (res = 0, mr_getline(incoming, fin); !res && !feof(fin) ; mr_getline(incoming, fin)) {
     387    for (res = 0; !res && (p = fgets(incoming, MAX_STR_LEN - 1, fin));) {
    381388        if (strstr(incoming, searchstr)) {
    382389            res = 1;
    383390        }
    384         mr_free(incoming);
    385     }
    386     mr_free(incoming);
    387 
     391    }
    388392    if (pclose(fin)) {
    389393        log_OS_error("Cannot pclose fin");
    390394    }
     395    paranoid_free(program);
     396    paranoid_free(incoming);
    391397    paranoid_free(searchstr);
     398    paranoid_free(tmp);
    392399    return (res);
    393400}
     
    406413{
    407414    /*@ buffers **************************************************** */
    408     char *command = NULL;
     415    char *command;
    409416
    410417    /*@ end vars *************************************************** */
     
    414421    assert_string_is_neither_NULL_nor_zerolength(str);
    415422
    416     /* For UEFI detection, this should be extended to count=2 */
    417     mr_asprintf(command, "dd if=%s bs=446 count=1 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null", dev, str);
     423    malloc_string(command);
     424    sprintf(command,
     425            "dd if=%s bs=446 count=1 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null",
     426            dev, str);
    418427    i = system(command);
    419     mr_free(command);
     428    paranoid_free(command);
    420429    if (i) {
    421430        return (FALSE);
     
    435444{
    436445    /*@ buffers **************************************************** */
    437     char *command = NULL;
     446    char *command;
    438447    /*@ end vars *************************************************** */
    439448    int i;
    440449
    441     mr_asprintf(command, "dd if=%s bs=512 count=%i 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null", dev, n, str);
     450    malloc_string(command);
     451    sprintf(command,
     452            "dd if=%s bs=512 count=%i 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null",
     453            dev, n, str);
    442454    i = system(command);
    443     mr_free(command);
     455    paranoid_free(command);
    444456    if (i) {
    445457        return (FALSE);
     
    454466 * Try to mount CD-ROM at @p mountpoint. If the CD-ROM is not found or has
    455467 * not been specified, call find_cdrom_device() to find it.
     468 * @param bkpinfo The backup information structure. The only field used is @c bkpinfo->media_device.
    456469 * @param mountpoint Where to mount the CD-ROM.
    457470 * @return 0 for success, nonzero for failure.
    458471 * @see mount_CDROM_here
    459472 */
    460 int find_and_mount_actual_cd(char *mountpoint) {
    461 
     473int find_and_mount_actual_cd(char *mountpoint)
     474{
    462475    /*@ buffers ***************************************************** */
    463476
    464477    /*@ int's  ****************************************************** */
    465478    int res;
    466     char *dev = NULL;
     479    char *dev;
    467480
    468481    /*@ end vars **************************************************** */
     
    519532{
    520533    /*@ buffers ************************ */
     534    char *comment;
    521535    char *tmp = NULL;
    522536    char *cdr_exe = NULL;
    523     char *command = NULL;
    524 
     537    char *command;
     538
     539    malloc_string(comment);
     540    malloc_string(command);
    525541    if (g_cdrw_drive_is_here[0]) {
    526542        strcpy(cdrw_device, g_cdrw_drive_is_here);
    527543        log_msg(3, "Been there, done that. Returning %s", cdrw_device);
     544        paranoid_free(comment);
     545        paranoid_free(command);
    528546        return (0);
    529547    }
    530548    if (g_backup_media_type == dvd) {
    531         log_msg(1, "This is dumb. You're calling find_cdrw_device() but you're backing up to DVD. WTF?");
     549        log_msg(1,
     550                "This is dumb. You're calling find_cdrw_device() but you're backing up to DVD. WTF?");
     551        paranoid_free(comment);
     552        paranoid_free(command);
    532553        return (1);
    533554    }
     
    539560    }
    540561    if (find_home_of_exe(cdr_exe)) {
    541         mr_asprintf(command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -E '[D|C][V|D]' | cut -d' ' -f2 | head -n1", cdr_exe);
     562        sprintf(command,
     563                "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -E '[D|C][V|D]' | cut -d' ' -f2 | head -n1",
     564                cdr_exe);
    542565        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    543         mr_free(command);
    544566    }
    545567    if ((tmp == NULL) || (strlen(tmp) < 2)) {
     568        paranoid_free(comment);
    546569        mr_free(tmp);
    547570        mr_free(cdr_exe);
     571        paranoid_free(command);
    548572        return 1;
    549573    } else {
    550574        strcpy(cdrw_device, tmp);
    551         log_it("Found CDRW device - %s", cdrw_device);
     575        sprintf(comment, "Found CDRW device - %s", cdrw_device);
     576        log_it(comment);
    552577        strcpy(g_cdrw_drive_is_here, cdrw_device);
     578        paranoid_free(comment);
    553579        mr_free(tmp);
    554580        mr_free(cdr_exe);
     581        paranoid_free(command);
    555582        return (0);
    556583    }
    557584}
     585
     586
    558587
    559588
     
    580609
    581610    /*@ buffers ***************************************************** */
    582     char *tmp = NULL;
     611    char *tmp;
    583612    char *tmp1 = NULL;
    584613    char *cdr_exe = NULL;
    585614    char *phrase_one;
    586     char *phrase_two = NULL;
    587     char *command = NULL;
    588 #ifndef __FreeBSD__
    589     char *dvd_last_resort = NULL;
    590 #endif
    591     char *mountpoint = NULL;
     615    char *phrase_two;
     616    char *command;
     617    char *dvd_last_resort;
     618    char *mountpoint;
    592619    static char the_last_place_i_found_it[MAX_STR_LEN] = "";
    593620
     
    595622    malloc_string(tmp);
    596623    malloc_string(phrase_one);
     624    malloc_string(phrase_two);
     625    malloc_string(command);
     626    malloc_string(dvd_last_resort);
    597627    malloc_string(mountpoint);
    598628
    599629    output[0] = '\0';
    600630    phrase_one[0] = '\0';
     631    phrase_two[0] = '\0';
     632    dvd_last_resort[0] = '\0';
    601633
    602634    /*@ end vars **************************************************** */
     
    610642    if (the_last_place_i_found_it[0] != '\0' && !try_to_mount) {
    611643        strcpy(output, the_last_place_i_found_it);
    612         log_msg(3, "find_cdrom_device() --- returning last found location - '%s'", output);
     644        log_msg(3,
     645                "find_cdrom_device() --- returning last found location - '%s'",
     646                output);
    613647        retval = 0;
    614648        goto end_of_find_cdrom_device;
     
    637671    }
    638672
    639     mr_asprintf(command, "%s -scanbus 2> /dev/null", cdr_exe);
     673    sprintf(command, "%s -scanbus 2> /dev/null", cdr_exe);
    640674    fin = popen(command, "r");
    641675    if (!fin) {
     
    643677        log_OS_error("Cannot popen command");
    644678        mr_free(cdr_exe);
    645         mr_free(command);
    646679        return (1);
    647680    }
    648     mr_free(command);
    649 
    650681    for (tmp1 = fgets(tmp, MAX_STR_LEN, fin); !feof(fin) && (tmp1 != NULL);
    651682         tmp1 = fgets(tmp, MAX_STR_LEN, fin)) {
     
    665696                        }
    666697                        *q = '\0';
    667                         mr_asprintf(phrase_two, "%s", p);
     698                        strcpy(phrase_two, p);
    668699                    }
    669700                }
     
    674705
    675706#ifndef __FreeBSD__
    676     if (!phrase_two || strlen(phrase_two) == 0) {
     707    if (strlen(phrase_two) == 0) {
    677708        log_msg(4, "Not running phase two. String is empty.");
    678709    } else {
    679         mr_asprintf(command, "dmesg | grep \"%s\" 2> /dev/null", phrase_two);
     710        sprintf(command, "dmesg | grep \"%s\" 2> /dev/null", phrase_two);
    680711        fin = popen(command, "r");
    681         mr_free(command);
    682 
    683712        if (!fin) {
    684713            log_msg(4, "Cannot run 2nd command - non-fatal, fortunately");
     
    692721                        *p = '\0';
    693722                        if (strstr(tmp, "DVD")) {
    694                             mr_free(dvd_last_resort);
    695                             mr_asprintf(dvd_last_resort, "/dev/%s", tmp);
    696                             log_msg(4, "Ignoring '%s' because it's a DVD drive", tmp);
     723                            sprintf(dvd_last_resort, "/dev/%s", tmp);
     724                            log_msg(4,
     725                                    "Ignoring '%s' because it's a DVD drive",
     726                                    tmp);
    697727                        } else {
    698728                            sprintf(output, "/dev/%s", tmp);
     
    745775#else
    746776    if (!found_it && strlen(dvd_last_resort) > 0) {
    747         log_msg(4, "Well, I'll use the DVD - %s - as a last resort", dvd_last_resort);
     777        log_msg(4, "Well, I'll use the DVD - %s - as a last resort",
     778                dvd_last_resort);
    748779        strcpy(output, dvd_last_resort);
    749780        found_it = TRUE;
    750781    }
    751782    if (found_it) {
    752         sprintf(tmp, "grep \"%s=ide-scsi\" /proc/cmdline &> /dev/null", strrchr(output, '/') + 1);
     783        sprintf(tmp, "grep \"%s=ide-scsi\" /proc/cmdline &> /dev/null",
     784                strrchr(output, '/') + 1);
    753785        if (system(tmp) == 0) {
    754             log_msg(4, "%s is not right. It's being SCSI-emulated. Continuing.", output);
     786            log_msg(4,
     787                    "%s is not right. It's being SCSI-emulated. Continuing.",
     788                    output);
    755789            found_it = FALSE;
    756790            output[0] = '\0';
     
    818852                found_it = FALSE;
    819853            } else {
    820                 mr_asprintf(command, "umount %s", output);
     854                sprintf(command, "umount %s", output);
    821855                paranoid_system(command);
    822                 mr_free(command);
    823 
    824856                log_msg(4, "I'm confident the Mondo CD is in %s", output);
    825857            }
     
    840872    }
    841873
    842     mr_asprintf(command, "%s -scanbus | grep \"[0-9],[0-9],[0-9]\" | grep -E \"[D|C][V|D]\" | grep -n \"\" | grep \"%s\" | cut -d':' -f2", cdr_exe, g_cdrw_drive_is_here);
    843 
     874    sprintf(command,
     875            "%s -scanbus | grep \"[0-9],[0-9],[0-9]\" | grep -E \"[D|C][V|D]\" | grep -n \"\" | grep \"%s\" | cut -d':' -f2",
     876            cdr_exe, g_cdrw_drive_is_here);
    844877    log_msg(1, "command=%s", command);
    845878    mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output(command));
    846     mr_free(command);
    847 
    848879    if (strlen(tmp1) > 0) {
    849880        strcpy(output, tmp1);
     
    857888
    858889  end_of_find_cdrom_device:
     890    paranoid_free(tmp);
    859891    mr_free(cdr_exe);
    860     mr_free(phrase_two);
    861     mr_free(dvd_last_resort);
    862 
    863     paranoid_free(tmp);
    864892    paranoid_free(phrase_one);
     893    paranoid_free(phrase_two);
     894    paranoid_free(command);
     895    paranoid_free(dvd_last_resort);
    865896    paranoid_free(mountpoint);
    866897    return (retval);
     
    868899
    869900
     901
     902
     903
    870904int find_dvd_device(char *output, bool try_to_mount)
    871905{
     906    char *command;
    872907    char *tmp;
    873908    int retval = 0, devno = -1;
     909
     910    malloc_string(command);
     911    malloc_string(tmp);
    874912
    875913    if (g_dvd_drive_is_here[0]) {
     
    879917    }
    880918
    881     malloc_string(tmp);
    882     mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("dvdrecord -scanbus 2> /dev/null | grep -E '\)\ \'' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1"));
     919    sprintf(tmp, "%s", call_program_and_get_last_line_of_output("dvdrecord -scanbus 2> /dev/null | grep -E '\)\ \'' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1"));
    883920    log_msg(5, "tmp = '%s'", tmp);
    884     if (!tmp[0]) {
    885         mr_free(tmp);
    886         mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | grep \)\ \' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1"));
    887     }
     921    if (!tmp[0])
     922        sprintf(tmp, "%s", call_program_and_get_last_line_of_output
     923                ("cdrecord -scanbus 2> /dev/null | grep \)\ \' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1")
     924            );
    888925    if (tmp[0]) {
    889926        devno = atoi(tmp) - 1;
    890927    }
    891     mr_free(tmp);
    892 
    893928    if (devno >= 0) {
    894929        retval = 0;
     
    901936    }
    902937
     938    if (try_to_mount) {
     939        log_msg(1, "Ignoring the fact that try_to_mount==TRUE");
     940    }
    903941    return (retval);
    904942}
     
    10151053{
    10161054    char *good_formats = NULL;
    1017     char *command = NULL;
    1018     char *format_sz = NULL;
     1055    char *command;
     1056    char *format_sz;
    10191057    char *p;
    10201058
     
    10221060    int retval;
    10231061    malloc_string(good_formats);
     1062    malloc_string(command);
     1063    malloc_string(format_sz);
    10241064
    10251065    assert_string_is_neither_NULL_nor_zerolength(format);
    10261066
    1027     mr_asprintf(format_sz, "%s ", format);
     1067    sprintf(format_sz, "%s ", format);
    10281068
    10291069#ifdef __FreeBSD__
    1030     mr_asprintf(command, "lsvfs | tr -s '\t' ' ' | grep -v Filesys | grep -v -- -- | cut -d' ' -f1 | tr -s '\n' ' '");
     1070    sprintf(command,
     1071            "lsvfs | tr -s '\t' ' ' | grep -v Filesys | grep -v -- -- | cut -d' ' -f1 | tr -s '\n' ' '");
    10311072#else
    1032     mr_asprintf(command, "grep -v nodev /proc/filesystems | tr -s '\t' ' ' | cut -d' ' -f2 | tr -s '\n' ' '");
     1073    sprintf(command,
     1074            "grep -v nodev /proc/filesystems | tr -s '\t' ' ' | cut -d' ' -f2 | tr -s '\n' ' '");
    10331075#endif
    10341076
    10351077    pin = popen(command, "r");
    1036     mr_free(command);
    1037 
    10381078    if (!pin) {
    10391079        log_OS_error("Unable to read good formats");
     
    10541094    }
    10551095    paranoid_free(good_formats);
    1056     mr_free(format_sz);
    1057 
     1096    paranoid_free(command);
     1097    paranoid_free(format_sz);
    10581098    return (retval);
    10591099}
     
    10741114
    10751115    /*@ buffers ***************************************************** */
    1076     char *incoming = NULL;
     1116    char *incoming;
    10771117    char *device_with_tab = NULL;
    10781118    char *device_with_space = NULL;
     
    10881128    /*@ end vars **************************************************** */
    10891129
    1090     if (device_raw == NULL) {
    1091         return(FALSE);
    1092     }
    1093 
     1130    malloc_string(incoming);
     1131    assert(device_raw != NULL);
     1132//  assert_string_is_neither_NULL_nor_zerolength(device_raw);
    10941133    if (device_raw[0] != '/' && !strstr(device_raw, ":/")) {
    10951134        log_msg(1, "%s needs to have a '/' prefixed - I'll do it",
     
    11141153        return(FALSE);
    11151154    }
    1116 
    1117     for (mr_getline(incoming, fin); !feof(fin); mr_getline(incoming, fin)) {
    1118         if (strstr(incoming, device_with_space) || strstr(incoming, device_with_tab)) {
     1155    for (tmp = fgets(incoming, MAX_STR_LEN - 1, fin); !feof(fin) && (tmp != NULL);
     1156         tmp = fgets(incoming, MAX_STR_LEN - 1, fin)) {
     1157        if (strstr(incoming, device_with_space) //> incoming
     1158            || strstr(incoming, device_with_tab))   // > incoming)
     1159        {
    11191160            paranoid_pclose(fin);
    1120             mr_free(incoming);
     1161            paranoid_free(incoming);
    11211162            return(TRUE);
    11221163        }
    1123         mr_free(incoming);
    1124     }
    1125     mr_free(incoming);
     1164    }
    11261165    mr_free(device_with_tab);
    11271166    paranoid_pclose(fin);
     
    11331172    }
    11341173    mr_free(tmp);
     1174    paranoid_free(incoming);
    11351175    return(retval);
    11361176}
     
    11491189    char command[MAX_STR_LEN];
    11501190    int vndev = 2;
    1151     if (atoi(call_program_and_get_last_line_of_output("/sbin/sysctl -n kern.osreldate")) < 500000) {
     1191    if (atoi
     1192        (call_program_and_get_last_line_of_output
     1193         ("/sbin/sysctl -n kern.osreldate")) < 500000) {
    11521194        do {
    11531195            sprintf(mddevice, "vn%ic", vndev++);
     
    11811223int kick_vn(char *dname)
    11821224{
    1183     char *command = NULL;
    1184     int res = 0;
     1225    char command[MAX_STR_LEN];
    11851226
    11861227    if (strncmp(dname, "/dev/", 5) == 0) {
     
    11881229    }
    11891230
    1190     if (atoi(call_program_and_get_last_line_of_output("/sbin/sysctl -n kern.osreldate")) < 500000) {
    1191         mr_asprintf(command, "vnconfig -d %s", dname);
     1231    if (atoi
     1232        (call_program_and_get_last_line_of_output
     1233         ("/sbin/sysctl -n kern.osreldate")) < 500000) {
     1234        sprintf(command, "vnconfig -d %s", dname);
     1235        return system(command);
    11921236    } else {
    1193         mr_asprintf(command, "mdconfig -d -u %s", dname);
    1194     }
    1195     res = system(command);
    1196     mr_free(command);
    1197     return(res);
     1237        sprintf(command, "mdconfig -d -u %s", dname);
     1238        return system(command);
     1239    }
     1240     /*NOTREACHED*/ return 255;
    11981241}
    11991242#endif
     
    12091252{
    12101253    /*@ buffer ****************************************************** */
    1211     char *command = NULL;
     1254    char *command;
    12121255    int retval;
    12131256
     1257    malloc_string(command);
    12141258    assert_string_is_neither_NULL_nor_zerolength(device);
    12151259    assert_string_is_neither_NULL_nor_zerolength(mountpoint);
     
    12191263        return(1);
    12201264    }
    1221     log_msg(4, "(mount_USB_here --- device=%s, mountpoint=%s", device, mountpoint);
     1265    log_msg(4, "(mount_USB_here --- device=%s, mountpoint=%s", device,
     1266            mountpoint);
    12221267
    12231268#ifdef __FreeBSD__
    1224     mr_asprintf(command, "mount_vfat %s %s 2>> %s", device, mountpoint, MONDO_LOGFILE);
     1269    sprintf(command, "mount_vfat %s %s 2>> %s",
     1270            device, mountpoint, MONDO_LOGFILE);
    12251271
    12261272#else
    1227     mr_asprintf(command, "mount %s -t vfat %s 2>> %s", device, mountpoint, MONDO_LOGFILE);
     1273    sprintf(command, "mount %s -t vfat %s 2>> %s",
     1274            device, mountpoint, MONDO_LOGFILE);
    12281275#endif
    12291276
     
    12311278    retval = system(command);
    12321279    log_msg(1, "system(%s) returned %d", command, retval);
    1233     mr_free(command);
    1234 
     1280
     1281    paranoid_free(command);
    12351282    return (retval);
    12361283}
     
    12421289 * @return 0 for success, nonzero for failure.
    12431290 */
    1244 int mount_CDROM_here(char *device, const char *mountpoint)
     1291int mount_CDROM_here(char *device, char *mountpoint)
    12451292{
    12461293    /*@ buffer ****************************************************** */
     
    12801327
    12811328    }
    1282     log_msg(4, "(mount_CDROM_here --- device=%s, mountpoint=%s", device, mountpoint);
     1329    log_msg(4, "(mount_CDROM_here --- device=%s, mountpoint=%s", device,
     1330            mountpoint);
    12831331    /*@ end vars *************************************************** */
    12841332
     
    12971345    retval = system(command);
    12981346    log_msg(1, "system(%s) returned %d", command, retval);
    1299     mr_free(command);
     1347    paranoid_free(command);
    13001348
    13011349    return (retval);
     
    13141362int mount_media()
    13151363{
    1316 char *mount_cmd = NULL;
     1364char *mount_cmd;
    13171365char *mountdir = NULL;
    13181366int i, res;
    13191367#ifdef __FreeBSD__
    1320     char mdd[32];
    1321     char *mddev = mdd;
    1322 #endif
    1323 
    1324     if (bkpinfo->backup_media_type == tape || bkpinfo->backup_media_type == udev) {
     1368char mdd[32];
     1369char *mddev = mdd;
     1370#endif
     1371
     1372malloc_string(mount_cmd);
     1373assert(bkpinfo != NULL);
     1374
     1375    if (bkpinfo->backup_media_type == tape
     1376        || bkpinfo->backup_media_type == udev) {
    13251377        log_msg(8, "Tape/udev. Therefore, no need to mount a media.");
     1378        paranoid_free(mount_cmd);
    13261379        return 0;
    13271380    }
     
    13291382    if (!run_program_and_log_output("mount | grep -F " MNT_CDROM, FALSE)) {
    13301383        log_msg(2, "mount_media() - media already mounted. Fair enough.");
     1384        paranoid_free(mount_cmd);
    13311385        return (0);
    13321386    }
     
    13351389        log_msg(2, "Mounting for Network thingy");
    13361390        log_msg(2, "isodir = %s", bkpinfo->isodir);
    1337         if ((!bkpinfo->isodir[0] || !strcmp(bkpinfo->isodir, "/")) && am_I_in_disaster_recovery_mode()) {
     1391        if ((!bkpinfo->isodir[0] || !strcmp(bkpinfo->isodir, "/"))
     1392            && am_I_in_disaster_recovery_mode()) {
    13381393            strcpy(bkpinfo->isodir, "/tmp/isodir");
    13391394            log_msg(1, "isodir is being set to %s", bkpinfo->isodir);
    13401395        }
    13411396#ifdef __FreeBSD__
    1342         mr_asprintf(mount_cmd, "/mnt/isodir/%s/%s/%s-%d.iso", bkpinfo->isodir,
     1397        sprintf(mount_cmd, "/mnt/isodir/%s/%s/%s-%d.iso", bkpinfo->isodir,
    13431398            bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number);
    13441399        mddev = make_vn(mount_cmd);
    1345         mr_free(mount_cmd);
    1346 
    1347         mr_asprintf(mount_cmd, "mount_cd9660 -r %s " MNT_CDROM, mddev);
     1400        sprintf(mount_cmd, "mount_cd9660 -r %s " MNT_CDROM, mddev);
    13481401#else
    1349         mr_asprintf(mount_cmd, "mount %s/%s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);
     1402        sprintf(mount_cmd, "mount %s/%s/%s-%d.iso -t iso9660 -o loop,ro %s",
     1403            bkpinfo->isodir, bkpinfo->netfs_remote_dir,
     1404            bkpinfo->prefix, g_current_media_number, MNT_CDROM);
    13501405#endif
    13511406
     
    13571412        }
    13581413#ifdef __FreeBSD__
    1359         mr_asprintf(mount_cmd, "%s/%s-%d.iso", mountdir, bkpinfo->prefix, g_current_media_number);
     1414        sprintf(mount_cmd, "%s/%s-%d.iso", mountdir,
     1415            bkpinfo->prefix, g_current_media_number);
    13601416        mddev = make_vn(mount_cmd);
    1361         mr_free(mount_cmd);
    1362 
    1363         mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", mddev, MNT_CDROM);
     1417        sprintf(mount_cmd, "mount_cd9660 -r %s %s", mddev, MNT_CDROM);
    13641418#else
    1365         mr_asprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s", mountdir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);
     1419        sprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s",
     1420            mountdir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);
    13661421#endif
    13671422        mr_free(mountdir);
    13681423    } else if (bkpinfo->backup_media_type == usb) {
    1369         mr_asprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM);
     1424        sprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM);
    13701425    } else if (strstr(bkpinfo->media_device, "/dev/")) {
    13711426#ifdef __FreeBSD__
    1372         mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM);
     1427        sprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device,
     1428        MNT_CDROM);
    13731429#else
    1374         mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM);
     1430        sprintf(mount_cmd, "mount %s -t iso9660 -o ro %s",
     1431        bkpinfo->media_device, MNT_CDROM);
    13751432#endif
    13761433    } else {
     
    13841441
    13851442#ifdef __FreeBSD__
    1386         mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM);
     1443    sprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device,
     1444        MNT_CDROM);
    13871445#else
    1388         mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM);
     1446    sprintf(mount_cmd, "mount %s -t iso9660 -o ro %s",
     1447        bkpinfo->media_device, MNT_CDROM);
    13891448#endif
    13901449    }
     
    13981457            log_msg(2, "Failed to mount device.");
    13991458            sleep(5);
    1400             sync();
    1401         }
    1402     }
    1403     mr_free(mount_cmd);
     1459            run_program_and_log_output("sync", FALSE);
     1460        }
     1461    }
    14041462
    14051463    if (res) {
     
    14081466        log_msg(2, "Mounted media drive OK");
    14091467    }
     1468    paranoid_free(mount_cmd);
    14101469    return (res);
    14111470}
     
    14371496
    14381497    /*@ buffers ********************************************************* */
    1439     char *tmp = NULL;
     1498    char *tmp;
    14401499    char *mds = NULL;
    1441     char *request = NULL;
     1500    char *request;
    14421501
    14431502    assert(bkpinfo != NULL);
     
    14511510        return;
    14521511    }
    1453     mr_asprintf(tmp, "mkdir -p " MNT_CDROM);
     1512    if (g_ISO_restore_mode || bkpinfo->backup_media_type == iso
     1513        || bkpinfo->backup_media_type == netfs) {
     1514        g_ISO_restore_mode = TRUE;
     1515    }
     1516    malloc_string(tmp);
     1517    malloc_string(request);
     1518    sprintf(tmp, "mkdir -p " MNT_CDROM);
    14541519    run_program_and_log_output(tmp, 5);
    1455     mr_free(tmp);
    1456 
    1457     if (g_ISO_restore_mode || bkpinfo->backup_media_type == iso || bkpinfo->backup_media_type == netfs) {
    1458         g_ISO_restore_mode = TRUE;
    1459     }
    14601520    if ((res = what_number_cd_is_this()) != cd_number_i_want) {
    1461         log_msg(3, "Currently, we hold %d but we want %d", res, cd_number_i_want);
     1521        log_msg(3, "Currently, we hold %d but we want %d", res,
     1522                cd_number_i_want);
    14621523
    14631524        /* Now we need to umount the current media to have the next mounted after */
     
    14681529
    14691530        mds = media_descriptor_string(bkpinfo->backup_media_type);
    1470         log_msg(3, "Insisting on %s #%d", mds, cd_number_i_want);
    1471         mr_asprintf(request, "Please insert %s #%d and press Enter.", mds, cd_number_i_want);
     1531        sprintf(tmp, "Insisting on %s #%d", mds, cd_number_i_want);
     1532        sprintf(request, "Please insert %s #%d and press Enter.", mds, cd_number_i_want);
    14721533        mr_free(mds);
    1473 
     1534        log_msg(3, tmp);
    14741535        while (what_number_cd_is_this() != cd_number_i_want) {
    1475             sync();
     1536            paranoid_system("sync");
    14761537            if (is_this_device_mounted(MNT_CDROM)) {
    14771538                res =
     
    14951556                inject_device(bkpinfo->media_device);
    14961557            }
    1497             sync();
    1498         }
    1499         mr_free(request);
    1500 
     1558            paranoid_system("sync");
     1559        }
    15011560        log_msg(1, "Thankyou. Proceeding...");
    15021561        g_current_media_number = cd_number_i_want;
    15031562    }
     1563    paranoid_free(tmp);
     1564    paranoid_free(request);
    15041565}
    15051566
     
    16151676    log_msg(5, "Running: %s", command);
    16161677    mr_asprintf(mounted_file_system, "%s", call_program_and_get_last_line_of_output(command));
    1617     mr_free(command);
     1678    paranoid_free(command);
    16181679
    16191680    mount_cnt = atoi(mounted_file_system);
    16201681    log_msg (5, "mount_cnt: %d", mount_cnt);
    1621     mr_free(mounted_file_system);
     1682    paranoid_free(mounted_file_system);
    16221683
    16231684    for (i=mount_cnt; i > 0; i--) {
     
    16251686        log_msg(5, "Running: %s", command);
    16261687        mr_asprintf(mounted_file_system, "%s", call_program_and_get_last_line_of_output(command));
    1627         mr_free(command);
     1688        paranoid_free(command);
    16281689
    16291690        log_msg (5, "mounted_file_system: %s", mounted_file_system);
    16301691        if ((token = mr_strtok(mounted_file_system, token_chars, &lastpos)) == NULL) {
    16311692            log_msg (4, "Could not get the list of mounted file systems");
    1632             mr_free(mounted_file_system);
     1693            paranoid_free(mounted_file_system);
    16331694            mr_free(token);
    16341695            return (1);
     
    16581719        mr_free(mounted_file_system);
    16591720    }
     1721    /********
     1722    * DSFptr = DSF_Head;
     1723    * while (DSFptr != NULL) {
     1724    * printf ("Dev: %s  MP: %s  Check: %d\n", DSFptr->device, DSFptr->mount_point, DSFptr->check);
     1725    * DSFptr = DSFptr->next;
     1726    * }
     1727    ********/
    16601728    return (0);
    16611729}
     
    17051773    log_msg(5, "  Executing: %s", command);
    17061774    mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    1707     mr_free(command);
     1775    paranoid_free(command);
    17081776
    17091777    log_msg(5, "  Return value: %s", tmp);
    17101778    c = atoi(tmp);
    1711     mr_free(tmp);
     1779    paranoid_free(tmp);
    17121780
    17131781    if (!c) {
     
    17311799    log_msg(5, "Executing: %s", command);
    17321800    mr_asprintf(partition_list, "%s", call_program_and_get_last_line_of_output(command));
    1733     mr_free(command);
     1801    paranoid_free(command);
    17341802    log_msg(4, "Partition list for %s: %s", dsf, partition_list);
    17351803    if (!strlen(partition_list)) {
     
    17941862        log_msg(4, "Processing partition: %s", partitions[i]);
    17951863        /* See if it's swap. If it is, ignore it. */
    1796         mr_asprintf(command, "parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'", ndsf, partitions[i]);
     1864        mr_asprintf(command, "parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'",
     1865          ndsf, partitions[i]);
    17971866        log_msg(5, "  Running: %s", command);
    17981867        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    1799         mr_free(command);
    1800 
     1868        paranoid_free(command);
    18011869        log_msg(5, "  Return value: %s", tmp);
    18021870        c = strlen(tmp);
    1803         mr_free(tmp);
    1804 
     1871        paranoid_free(tmp);
    18051872        if (c) {
    18061873            log_msg(4, "It's swap. Ignoring partition %s", partitions[i]);
    18071874            continue;
    18081875        }
    1809 
    18101876        /* It's not swap. See if we can find the mount point from the mount command. */
    18111877        mr_asprintf(command, "mount 2>/dev/null | awk '{if((NF>0)&&($1==\"%s\")){print $3}}'", partitions[i]);
    18121878        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    1813         mr_free(command);
    1814 
     1879        paranoid_free(command);
    18151880        if (strlen(tmp)) {
    18161881            log_msg(4, "  %s is mounted: %s", partitions[i], tmp);
    18171882            if ((DSFptr = find_mount_point_in_list(tmp)) == NULL) {
    18181883                log_msg (4, "Can't find mount point %s in mounted file systems list", tmp);
    1819                 mr_free(tmp);
     1884                paranoid_free(tmp);
    18201885                return (1);
    18211886            }
    18221887            DSFptr->check = 1;
    1823             mr_free(tmp);
     1888            paranoid_free(tmp);
    18241889            continue;
    18251890        }
    1826         mr_free(tmp);
    1827 
     1891        paranoid_free(tmp);
    18281892        /* It's not swap and it's not mounted. See if it's LVM */
    18291893        log_msg(4, "  It's not mounted. Checking to see if it's LVM...");
    1830 
    18311894        /* Check for LVM */
    18321895        mr_asprintf(command, "pvdisplay -c %s 2> /dev/null", partitions[i]);
    18331896        log_msg(5, "  Running: %s", command);
    18341897        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    1835         mr_free(command);
    1836 
     1898        paranoid_free(command);
    18371899        if (strlen(tmp)) {
    18381900            log_msg(4, "Found an LVM partition at %s. Find the VG it's in...", partitions[i]);
     
    18411903            log_msg(5, "  Running: %s", command);
    18421904            strcpy(VG, call_program_and_get_last_line_of_output(command));
    1843             mr_free(command);
    1844 
     1905            paranoid_free(command);
    18451906            log_msg(4, "  Volume Group: %s", VG);
    18461907            if (strlen(VG)) {
     
    18501911                log_msg(5, "  Running: %s", command);
    18511912                mr_asprintf(mount_list, "%s", call_program_and_get_last_line_of_output(command));
    1852                 mr_free(command);
    1853 
     1913                paranoid_free(command);
    18541914                log_msg(4, "  VG %s mount_list: %s", VG, mount_list);
    18551915                lastpos = 0;
     
    18581918                    if ((DSFptr = find_mount_point_in_list(token)) == NULL) {
    18591919                        log_msg (4, "Can't find mount point %s in mounted file systems list", token);
    1860                         mr_free(tmp);
     1920                        paranoid_free(tmp);
    18611921                        mr_free(token);
    18621922                        return (1);
     
    18691929                 * any of the Logical Volumes on the Volume Group.
    18701930                 *******/
    1871                 mr_free(mount_list);
     1931                paranoid_free(mount_list);
    18721932
    18731933                mr_asprintf(command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");
    18741934                log_msg (5, "Running: %s", command);
    18751935                mr_asprintf(mount_list, "%s", call_program_and_get_last_line_of_output(command));
    1876                 mr_free(command);
     1936                paranoid_free(command);
    18771937                log_msg(4, "  Software raid device list: %s", mount_list);
    18781938                lastpos = 0;
     
    18801940                    mr_asprintf(command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, VG);
    18811941                    log_msg (5, "Running: %s", command);
    1882                     mr_free(tmp);
     1942                    paranoid_free(tmp);
    18831943                    mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    1884                     mr_free(command);
     1944                    paranoid_free(command);
    18851945                    log_msg(4, "Number of Software raid device: %s", tmp);
    18861946                    if (atoi(tmp)) {
     
    18881948                        if ((DSFptr = find_device_in_list(token)) == NULL) {
    18891949                            log_msg (4, "Can't find device %s in mounted file systems list", token);
    1890                             mr_free(tmp);
     1950                            paranoid_free(tmp);
    18911951                            mr_free(token);
    18921952                            return (1);
     
    18991959            } else {
    19001960                log_msg (4, "Error finding Volume Group for partition %s", partitions[i]);
    1901                 mr_free(tmp);
     1961                paranoid_free(tmp);
    19021962                return (1);
    19031963            }
    1904             mr_free(tmp);
     1964            paranoid_free(tmp);
    19051965            continue;
    19061966        } else {
    19071967            log_msg (4, "Error finding partition type for the partition %s", partitions[i]);
    19081968        }
    1909         mr_free(tmp);
    1910 
     1969        paranoid_free(tmp);
    19111970        /********
    19121971         * It's not swap, mounted, or LVM. See if it's used in a software raid device.
     
    19161975        log_msg(4, "  Running: %s", command);
    19171976        mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    1918         mr_free(command);
    1919 
     1977        paranoid_free(command);
    19201978        if (!strlen(tmp)) {
    19211979            log_msg(4, "  Partition %s is not used in a non-LVM software raid device", partitions[i]);
    1922             mr_free(tmp);
     1980            paranoid_free(tmp);
    19231981            continue;
    19241982        }
    19251983        log_msg (5, "  UUID: %s", tmp);
    1926 
    19271984        /* Get the Software raid device list */
    19281985        mr_asprintf(command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");
    19291986        log_msg (5, "  Running: %s", command);
    19301987        mr_asprintf(mount_list, "%s", call_program_and_get_last_line_of_output(command));
    1931         mr_free(command);
    1932 
     1988        paranoid_free(command);
    19331989        log_msg(4, "  Software raid device list: %s", mount_list);
    19341990        /* Loop through the software raid device list to see if we can find the partition */
     
    19371993            mr_asprintf(command, "mdadm --detail %s 2>/dev/null | grep -c %s", token, tmp);
    19381994            log_msg(4, "  Running: %s", command);
    1939             mr_free(tmp);
     1995            paranoid_free(tmp);
    19401996            mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command));
    1941             mr_free(command);
    1942 
     1997            paranoid_free(command);
    19431998            if (!atoi(tmp)) {
    19441999                log_msg (4,"  Didn't find partition %s in software raid device %s", partitions[i], token);
     
    19462001                if ((DSFptr = find_device_in_list(token)) == NULL) {
    19472002                    log_msg (4, "Can't find device %s in mounted file systems list", token);
    1948                     mr_free(tmp);
     2003                    paranoid_free(tmp);
    19492004                    mr_free(token);
    19502005                    return (1);
     
    19552010            mr_free(token);
    19562011        }
    1957         mr_free(tmp);
    1958         mr_free(mount_list);
     2012        paranoid_free(tmp);
     2013        paranoid_free(mount_list);
    19592014    }
    19602015
     
    19922047    return (0);
    19932048}
     2049
     2050
     2051
    19942052
    19952053
     
    20412099            log_to_screen("Archiving only the following file systems on %s:", token);
    20422100            log_to_screen("==> %s", mounted_on_dsf);
    2043             mr_free(bkpinfo->include_paths);
    2044             mr_asprintf(bkpinfo->include_paths, "%s", "/");
     2101            strcpy(bkpinfo->include_paths, "/");
    20452102            if (strlen(not_mounted_on_dsf)) {
    20462103                log_msg (5, "Adding to bkpinfo->exclude_paths due to -I option: %s", not_mounted_on_dsf);
     
    20792136            mr_asprintf(tmp,"|%s|",bkpinfo->include_paths);
    20802137            if (strstr(tmp,tmp2) == NULL) {
    2081                 mr_strcat(bkpinfo->include_paths, "%s", tmp1);
     2138                strcat(bkpinfo->include_paths,tmp1);
    20822139            }
    20832140            mr_free(tmp1);
     
    21242181    char *q = NULL;
    21252182    char p[16*MAX_STR_LEN];
    2126     char *sz_size = NULL;
    2127     char *command = NULL;
     2183    char *sz_size;
     2184    char *command;
    21282185    char *compression_type = NULL;
    2129     char *comment = NULL;
     2186    char *comment;
     2187    char *prompt;
    21302188    int i;
    21312189    FILE *fin;
    21322190
     2191    malloc_string(sz_size);
     2192    malloc_string(command);
     2193    malloc_string(comment);
     2194    malloc_string(prompt);
    21332195    malloc_string(tmp1);
    21342196    assert(bkpinfo != NULL);
     2197    sz_size[0] = '\0';
    21352198    bkpinfo->nonbootable_backup = FALSE;
    21362199
     
    21692232        setup_scratchdir(tmp);
    21702233    }
    2171     log_msg(3, "media type = %s", bkptype_to_string(bkpinfo->backup_media_type));
     2234    log_msg(3, "media type = %s",
     2235            bkptype_to_string(bkpinfo->backup_media_type));
    21722236    bkpinfo->cdrw_speed = (bkpinfo->backup_media_type == cdstream) ? 2 : 4;
    2173     bkpinfo->compression_level = (bkpinfo->backup_media_type == cdstream) ? 1 : 5;
    2174     bkpinfo->use_lzo = (bkpinfo->backup_media_type == cdstream) ? TRUE : FALSE;
     2237    bkpinfo->compression_level =
     2238        (bkpinfo->backup_media_type == cdstream) ? 1 : 5;
     2239    bkpinfo->use_lzo =
     2240        (bkpinfo->backup_media_type == cdstream) ? TRUE : FALSE;
    21752241    mvaddstr_and_log_it(2, 0, " ");
    21762242
     
    21872253        if (archiving_to_media) {
    21882254            if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) {
    2189                 if (ask_me_yes_or_no("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?")) {
     2255                if (ask_me_yes_or_no
     2256                    ("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))
     2257                {
    21902258                    bkpinfo->manual_cd_tray = TRUE;
    21912259                }
     
    21952263                finish(1);
    21962264            }
    2197 
    2198             if ((bkpinfo->compression_level = which_compression_level()) == -1) {
     2265            if ((bkpinfo->compression_level =
     2266                which_compression_level()) == -1) {
    21992267                log_to_screen("User has chosen not to backup the PC");
    22002268                finish(1);
    22012269            }
    22022270            mds = media_descriptor_string(bkpinfo->backup_media_type);
    2203             mr_asprintf(comment, "What speed is your %s (re)writer?", mds);
     2271            sprintf(comment, "What speed is your %s (re)writer?", mds);
    22042272            if (bkpinfo->backup_media_type == dvd) {
    22052273                find_dvd_device(bkpinfo->media_device, FALSE);
    22062274                strcpy(tmp1, "1");
    2207                 mr_asprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE);  // 4.7 salesman's GB = 4.482 real GB = 4482 MB
     2275                sprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE);  // 4.7 salesman's GB = 4.482 real GB = 4482 MB
    22082276                log_msg(1, "Setting to DVD defaults");
    22092277            } else {
    22102278                strcpy(bkpinfo->media_device, VANILLA_SCSI_CDROM);
    22112279                strcpy(tmp1, "4");
    2212                 mr_asprintf(sz_size, "%d", 650);
     2280                strcpy(sz_size, "650");
    22132281                log_msg(1, "Setting to CD defaults");
    22142282            }
     
    22162284                if (!popup_and_get_string("Speed", comment, tmp1, 4)) {
    22172285                    log_to_screen("User has chosen not to backup the PC");
    2218                     mr_free(comment);
    22192286                    finish(1);
    22202287                }
    22212288            }
    2222             mr_free(comment);
    22232289            bkpinfo->cdrw_speed = atoi(tmp1);   // if DVD then this shouldn't ever be used anyway :)
    22242290
    2225             strcpy(tmp1, sz_size);
    2226             mr_asprintf(comment, "How much data (in Megabytes) will each %s store?", mds);
     2291            sprintf(comment,
     2292                    "How much data (in Megabytes) will each %s store?", mds);
    22272293            mr_free(mds);
    2228             if (!popup_and_get_string("Size", comment, tmp1, 5)) {
     2294            if (!popup_and_get_string("Size", comment, sz_size, 5)) {
    22292295                log_to_screen("User has chosen not to backup the PC");
    22302296                finish(1);
    22312297            }
    2232             mr_asprintf(sz_size, "%s", tmp1);
    22332298            bkpinfo->media_size = atoi(sz_size);
    2234 
    22352299            if (bkpinfo->media_size <= 0) {
    22362300                log_to_screen("User has chosen not to backup the PC");
     
    22442308        if ((bkpinfo->disaster_recovery) && (bkpinfo->backup_media_type != usb)) {
    22452309            strcpy(bkpinfo->media_device, "/dev/cdrom");
    2246             log_msg(2, "CD-ROM device assumed to be at %s", bkpinfo->media_device);
    2247         } else if ((bkpinfo->restore_data && (bkpinfo->backup_media_type != usb))  || bkpinfo->backup_media_type == dvd) {
     2310            log_msg(2, "CD-ROM device assumed to be at %s",
     2311                    bkpinfo->media_device);
     2312        } else if ((bkpinfo->restore_data && (bkpinfo->backup_media_type != usb))
     2313                   || bkpinfo->backup_media_type == dvd) {
    22482314            if (!bkpinfo->media_device[0]) {
    22492315                strcpy(bkpinfo->media_device, "/dev/cdrom");
    22502316            }                   // just for the heck of it :)
    2251             log_msg(1, "bkpinfo->media_device = %s", bkpinfo->media_device);
    2252             if (bkpinfo->backup_media_type == dvd || find_cdrom_device(bkpinfo->media_device, FALSE)) {
    2253                 log_msg(1, "bkpinfo->media_device = %s", bkpinfo->media_device);
    2254                 mr_asprintf(comment, "Please specify your %s drive's /dev entry", mds);
    2255                 if (!popup_and_get_string("Device?", comment, bkpinfo->media_device, MAX_STR_LEN / 4)) {
     2317            log_msg(1, "bkpinfo->media_device = %s",
     2318                    bkpinfo->media_device);
     2319            if (bkpinfo->backup_media_type == dvd
     2320                || find_cdrom_device(bkpinfo->media_device, FALSE)) {
     2321                log_msg(1, "bkpinfo->media_device = %s",
     2322                        bkpinfo->media_device);
     2323                sprintf(comment,
     2324                        "Please specify your %s drive's /dev entry", mds);
     2325                if (!popup_and_get_string
     2326                    ("Device?", comment, bkpinfo->media_device,
     2327                     MAX_STR_LEN / 4)) {
    22562328                    log_to_screen("User has chosen not to backup the PC");
    22572329                    finish(1);
     
    23272399            } else {
    23282400                if (does_file_exist("/tmp/mondo-restore.cfg")) {
    2329                     read_cfg_var("/tmp/mondo-restore.cfg", "media-dev", bkpinfo->media_device);
     2401                    read_cfg_var("/tmp/mondo-restore.cfg", "media-dev",
     2402                                 bkpinfo->media_device);
    23302403                }
    23312404            }
     
    23822455                finish(1);
    23832456            }
    2384             if ((bkpinfo->compression_level = which_compression_level()) == -1) {
     2457            if ((bkpinfo->compression_level =
     2458                 which_compression_level()) == -1) {
    23852459                log_to_screen("User has chosen not to backup the PC");
    23862460                finish(1);
     
    23942468        /* Never try to eject a NETFS device */
    23952469        bkpinfo->please_dont_eject = TRUE;
    2396         /*  Force NFS to be the protocol by default */
    2397         if (bkpinfo->netfs_proto == NULL) {
    2398             mr_asprintf(bkpinfo->netfs_proto, "nfs");
    2399         }
    24002470
    24012471        /* Initiate bkpinfo netfs_mount path from running environment if not already done */
    2402         if (!bkpinfo->netfs_mount == NULL) {
    2403             mr_asprintf(bkpinfo->netfs_mount, call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f1 | head -n1"));
     2472        if (!bkpinfo->netfs_mount[0]) {
     2473            strcpy(bkpinfo->netfs_mount,
     2474                   call_program_and_get_last_line_of_output
     2475                   ("mount | grep \":\" | cut -d' ' -f1 | head -n1"));
    24042476        }
    24052477#ifdef __FreeBSD__
     
    24122484                ("Network shared dir.",
    24132485                 "Please enter path and directory where archives are stored remotely. (Mondo has taken a guess at the correct value. If it is incorrect, delete it and type the correct one.)",
    2414                  p, MAX_STR_LEN / 4)) {
     2486                 bkpinfo->netfs_mount, MAX_STR_LEN / 4)) {
    24152487                log_to_screen("User has chosen not to backup the PC");
    24162488                finish(1);
    24172489            }
    2418             mr_free(bkpinfo->netfs_mount);
    2419             mr_asprintf(bkpinfo->netfs_mount, "%s", p;
    24202490            if (!bkpinfo->restore_data) {
    24212491                if ((compression_type = which_compression_type()) == NULL) {
     
    24232493                    finish(1);
    24242494                }
    2425 
    2426                 if ((bkpinfo->compression_level = which_compression_level()) == -1) {
     2495                if ((bkpinfo->compression_level =
     2496                    which_compression_level()) == -1) {
    24272497                    log_to_screen("User has chosen not to backup the PC");
    24282498                    finish(1);
     
    24312501            // check whether already mounted - we better remove
    24322502            // surrounding spaces and trailing '/' for this
    2433             mr_strip_spaces(bkpinfo->netfs_mount);
     2503            strip_spaces(bkpinfo->netfs_mount);
    24342504            if (bkpinfo->netfs_mount[strlen(bkpinfo->netfs_mount) - 1] == '/')
    24352505                bkpinfo->netfs_mount[strlen(bkpinfo->netfs_mount) - 1] = '\0';
     
    24432513                strcpy(tmp1,bkpinfo->netfs_mount);
    24442514            }
    2445             mr_asprintf(command, "mount | grep \"%s \" | cut -d' ' -f3", tmp1);
     2515            sprintf(command, "mount | grep \"%s \" | cut -d' ' -f3", tmp1);
    24462516            strcpy(bkpinfo->isodir, call_program_and_get_last_line_of_output(command));
    2447             mr_free(command);
    24482517
    24492518            if (!bkpinfo->restore_data) {
    2450                 mr_sprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE);   // 4.7 salesman's GB = 4.482 real GB = 4482 MB
    2451                 mr_asprintf(comment, "How much data (in Megabytes) will each media store?");
    2452                 strcpy(tmp1, sz_size);
    2453                 mr_free(sz_size);
    2454                 if (!popup_and_get_string("Size", comment, tmp1, 5)) {
     2519                sprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE);  // 4.7 salesman's GB = 4.482 real GB = 4482 MB
     2520                sprintf(comment,
     2521                    "How much data (in Megabytes) will each media store?");
     2522                if (!popup_and_get_string("Size", comment, sz_size, 5)) {
    24552523                    log_to_screen("User has chosen not to backup the PC");
    24562524                    finish(1);
    24572525                }
    2458                 mr_free(comment);
    2459                 mr_asprintf(sz_size, "%s", tmp1);
    24602526            } else {
    2461                 mr_asprintf(sz_size, "0");
     2527                strcpy(sz_size, "0");
    24622528            }
    24632529            bkpinfo->media_size = atoi(sz_size);
    2464             mr_free(sz_size);
    2465 
    24662530            if (bkpinfo->media_size < 0) {
    24672531                log_to_screen("User has chosen not to backup the PC");
     
    24692533            }
    24702534        }
     2535        /*  Force NFS to be the protocol by default */
     2536        if (bkpinfo->netfs_proto == NULL) {
     2537            mr_asprintf(bkpinfo->netfs_proto, "nfs");
     2538        }
    24712539        if (bkpinfo->disaster_recovery) {
    2472             mr_asprintf(command ,"umount %s/isodir 2> /dev/null", bkpinfo->tmpdir);
     2540            sprintf(command ,"umount %s/isodir 2> /dev/null", bkpinfo->tmpdir);
    24732541            paranoid_system(command);
    2474             mr_free(command);
    2475 
    24762542        }
    24772543        strcpy(tmp1, bkpinfo->netfs_proto);
    2478         if (!popup_and_get_string("Network protocol", "Which protocol should I use (nfs/sshfs/smbfs) ?",tmp1, MAX_STR_LEN)) {
     2544        if (!popup_and_get_string
     2545            ("Network protocol", "Which protocol should I use (nfs/sshfs/smbfs) ?",
     2546             tmp1, MAX_STR_LEN)) {
    24792547            log_to_screen("User has chosen not to backup the PC");
    24802548            finish(1);
     
    24822550        mr_free(bkpinfo->netfs_proto);
    24832551        mr_asprintf(bkpinfo->netfs_proto, "%s", tmp1);
    2484 
    2485         strcpy(tmp1, bkpinfo->netfs_mount);
    2486         if (!popup_and_get_string("Network share", "Which remote share should I mount?", tmp1, MAX_STR_LEN)) {
     2552        if (!popup_and_get_string
     2553            ("Network share", "Which remote share should I mount?",
     2554             bkpinfo->netfs_mount, MAX_STR_LEN)) {
    24872555            log_to_screen("User has chosen not to backup the PC");
    24882556            finish(1);
    24892557        }
    2490         mr_free(bkpinfo->netfs_mount);
    2491         mr_asprintf(bkpinfo->netfs_mount, "%s", tmp1);
    24922558
    24932559        if (bkpinfo->netfs_user) {
     
    24962562            strcpy(tmp1, "");
    24972563        }
    2498         if (!popup_and_get_string("Network user", "Which user should I use if any ?",tmp1)) {
     2564        if (!popup_and_get_string
     2565            ("Network user", "Which user should I use if any ?",
     2566             tmp1, MAX_STR_LEN)) {
    24992567            log_to_screen("User has chosen not to backup the PC");
    25002568            finish(1);
     
    25072575        /* Initiate bkpinfo isodir path from running environment if mount already done */
    25082576        if (is_this_device_mounted(bkpinfo->netfs_mount)) {
    2509             strcpy(bkpinfo->isodir, call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f3 | head -n1"));
     2577            strcpy(bkpinfo->isodir,
     2578                   call_program_and_get_last_line_of_output
     2579                   ("mount | grep \":\" | cut -d' ' -f3 | head -n1"));
    25102580        } else {
    25112581            sprintf(bkpinfo->isodir, "%s/netfsdir", bkpinfo->tmpdir);
    2512             mr_asprintf(command, "mkdir -p %s", bkpinfo->isodir);
     2582            sprintf(command, "mkdir -p %s", bkpinfo->isodir);
    25132583            run_program_and_log_output(command, 5);
    2514             mr_free(command);
    25152584
    25162585            if (bkpinfo->restore_data) {
     
    25462615        }
    25472616        if (!is_this_device_mounted(bkpinfo->netfs_mount)) {
    2548             popup_and_OK("Please mount that partition before you try to backup to or restore from it.");
     2617            popup_and_OK
     2618                ("Please mount that partition before you try to backup to or restore from it.");
    25492619            finish(1);
    25502620        }
     
    25702640        log_msg(3, "prefix set to %s", bkpinfo->prefix);
    25712641
    2572         log_msg(3, "Just set netfs_remote_dir to %s", bkpinfo->netfs_remote_dir);
     2642        log_msg(3, "Just set netfs_remote_dir to %s",
     2643                bkpinfo->netfs_remote_dir);
    25732644        log_msg(3, "isodir is still %s", bkpinfo->isodir);
    25742645        break;
     
    25882659                    finish(1);
    25892660                }
    2590                 if ((bkpinfo->compression_level = which_compression_level()) == -1) {
     2661                if ((bkpinfo->compression_level =
     2662                     which_compression_level()) == -1) {
    25912663                    log_to_screen("User has chosen not to backup the PC");
    25922664                    finish(1);
    25932665                }
    2594                 sprintf(tmp1, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4482 MB
     2666                sprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE);  // 4.7 salesman's GB = 4.482 real GB = 4482 MB
    25952667                if (!popup_and_get_string
    25962668                    ("ISO size.",
    25972669                     "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s (700) or DVD's (4480) you plan to backup to.",
    2598                      tmp1, 16)) {
     2670                     sz_size, 16)) {
    25992671                    log_to_screen("User has chosen not to backup the PC");
    26002672                    finish(1);
    26012673                }
    2602                 bkpinfo->media_size = atoi(tmp1);
     2674                bkpinfo->media_size = atoi(sz_size);
    26032675            } else {
    26042676                bkpinfo->media_size = 650;
     
    26512723                finish(1);
    26522724            }
    2653             if (does_string_exist_in_boot_block(bkpinfo->boot_device, "LILO")) {
     2725            if (does_string_exist_in_boot_block
     2726                (bkpinfo->boot_device, "LILO")) {
    26542727                i = 'L';
    26552728            } else
    2656                 if (does_string_exist_in_boot_block(bkpinfo->boot_device, "ELILO")) {
     2729                if (does_string_exist_in_boot_block
     2730                    (bkpinfo->boot_device, "ELILO")) {
    26572731                i = 'E';
    26582732            } else
    2659                 if (does_string_exist_in_boot_block(bkpinfo->boot_device, "GRUB")) {
     2733                if (does_string_exist_in_boot_block
     2734                    (bkpinfo->boot_device, "GRUB")) {
    26602735                i = 'G';
    26612736            } else {
     
    26642739#endif
    26652740            if (i == 'U') {
    2666                 if (ask_me_yes_or_no("Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?")) {
     2741                if (ask_me_yes_or_no
     2742                    ("Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?"))
     2743                {
    26672744                    i = 'R';    // raw
    26682745                } else {
    2669                     log_to_screen("I cannot find your boot loader. Please run mondoarchive with parameters.");
     2746                    log_to_screen
     2747                        ("I cannot find your boot loader. Please run mondoarchive with parameters.");
    26702748                    finish(1);
    26712749                }
     
    26732751        }
    26742752        bkpinfo->boot_loader = i;
    2675 
    2676         mr_free(bkpinfo->include_paths);
    2677         strcpy(tmp1, "/");
     2753        strcpy(bkpinfo->include_paths, "/");
    26782754        if (!popup_and_get_string
    26792755            ("Backup paths",
    26802756             "Please enter paths (separated by '|') which you want me to backup. The default is '/' (i.e. everything).",
    2681              tmp1, MAX_STR_LEN)) {
     2757             bkpinfo->include_paths, MAX_STR_LEN)) {
    26822758            log_to_screen("User has chosen not to backup the PC");
    26832759            finish(1);
    26842760        }
    2685         mr_asprintf(bkpinfo->include_paths, "%s", tmp1);
    2686 
    26872761        tmp = list_of_NETFS_mounts_only();
    26882762        if (strlen(tmp) > 2) {
     
    27412815        if (ask_me_yes_or_no("Do you want to backup extended attributes?")) {
    27422816            if (find_home_of_exe("getfattr")) {
    2743                 mr_free(g_getfattr);
    27442817                mr_asprintf(g_getfattr,"getfattr");
    27452818            }
    27462819            if (find_home_of_exe("getfacl")) {
    2747                 mr_free(g_getfacl);
    27482820                mr_asprintf(g_getfacl,"getfacl");
    27492821            }
     
    27632835            strcpy(bkpinfo->zip_exe, "gzip");
    27642836            strcpy(bkpinfo->zip_suffix, "gz");
    2765         } else if (strcmp(compression_type,"lzma") == 0) {
     2837        //} else if (strcmp(compression_type,"lzma") == 0) {
    27662838            //strcpy(bkpinfo->zip_exe, "xy");
    27672839            //strcpy(bkpinfo->zip_suffix, "xy");
     
    27772849            ("Will you want to verify your backups after Mondo has created them?");
    27782850
     2851#ifndef __FreeBSD__
     2852        if (!ask_me_yes_or_no
     2853            ("Are you confident that your kernel is a sane, sensible, standard Linux kernel? Say 'no' if you are using a Gentoo <1.4 or Debian <3.0, please."))
     2854#endif
     2855        {
     2856            strcpy(bkpinfo->kernel_path, "FAILSAFE");
     2857        }
     2858
    27792859        if (!ask_me_yes_or_no
    27802860            ("Are you sure you want to proceed? Hit 'no' to abort.")) {
     
    27952875#else
    27962876    if (bkpinfo->backup_media_type == netfs) {
    2797         log_msg(3, "I think the Remote mount is mounted at %s", bkpinfo->isodir);
     2877        log_msg(3, "I think the Remote mount is mounted at %s",
     2878                bkpinfo->isodir);
    27982879    }
    27992880    log_it("isodir = %s", bkpinfo->isodir);
    2800     if (bkpinfo->netfs_mount) {
    2801         log_it("netfs_mount = '%s'", bkpinfo->netfs_mount);
     2881    log_it("netfs_mount = '%s'", bkpinfo->netfs_mount);
     2882    if (bkpinfo->netfs_proto) {
     2883        log_it("netfs_proto = '%s'", bkpinfo->netfs_proto);
    28022884    }
    28032885    if (bkpinfo->netfs_user) {
    28042886        log_it("netfs_user = '%s'", bkpinfo->netfs_user);
    2805     }
    2806     if (bkpinfo->netfs_proto) {
    2807         log_it("netfs_proto = '%s'", bkpinfo->netfs_proto);
    28082887    }
    28092888#endif
     
    28122891    log_it("media size = %ld", bkpinfo->media_size);
    28132892    log_it("media type = %s", bkptype_to_string(bkpinfo->backup_media_type));
    2814     if (bkpinfo->prefix) {
    2815         log_it("prefix = %s", bkpinfo->prefix);
    2816     }
     2893    log_it("prefix = %s", bkpinfo->prefix);
    28172894    log_it("compression = %ld", bkpinfo->compression_level);
    28182895    log_it("exclude_path = %s", bkpinfo->exclude_paths);
     
    28202897
    28212898    /* Handle devices passed in bkpinfo and print result */
    2822     /*  the mr_make_devlist_from_pathlist function appends
    2823     /*  to the *_paths variables so copy before */
     2899    /*  the mr_make_devlist_from_pathlist function appends 
     2900     *  to the *_paths variables so copy before */
    28242901    mr_make_devlist_from_pathlist(bkpinfo->exclude_paths, 'E');
    28252902    mr_make_devlist_from_pathlist(bkpinfo->include_paths, 'I');
     
    28272904    log_it("scratchdir = '%s'", bkpinfo->scratchdir);
    28282905    log_it("tmpdir = '%s'", bkpinfo->tmpdir);
    2829     if (bkpinfo->image_devs) {
    2830         log_it("image_devs = '%s'", bkpinfo->image_devs);
    2831     }
    2832     log_it("boot_device = '%s' (loader=%c)", bkpinfo->boot_device, bkpinfo->boot_loader);
     2906    log_it("image_devs = '%s'", bkpinfo->image_devs);
     2907    log_it("boot_device = '%s' (loader=%c)", bkpinfo->boot_device,
     2908           bkpinfo->boot_loader);
    28332909    if (bkpinfo->media_size < 0) {
    28342910        if (archiving_to_media) {
     
    28412917    paranoid_free(sz_size);
    28422918    paranoid_free(tmp1);
     2919    paranoid_free(command);
     2920    paranoid_free(comment);
     2921    paranoid_free(prompt);
    28432922    return (0);
    28442923}
     
    30913170
    30923171    malloc_string(current_drive);
    3093 
    3094     /* UEFI is not supported here - but should be managed as a BIOS/UEFI option not a Boot Loader one per se */
    30953172
    30963173#ifdef __IA64__
Note: See TracChangeset for help on using the changeset viewer.