Changeset 2190 in MondoRescue


Ignore:
Timestamp:
May 5, 2009, 3:56:10 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Fix lack of formating (discovered by the new Mandriva build process, and adopted here as well as it's good practice).
Location:
branches/2.2.9
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/mindi

    r2183 r2190  
    14251425        MindiExit -1
    14261426    fi
     1427    echo "The USB device $USBDEVICE now looks like this:" >> $LOGFILE
     1428    $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    14271429    echo -en "."
    14281430    echo "Creating a vfat filesystem on $USBPART" >> $LOGFILE
  • branches/2.2.9/mondo/configure.in

    r1989 r2190  
    7272        AC_CHECK_LIB(pthread, pthread_create, true, [echo "*** Cannot find -lpthread."; echo "*** Please make sure you have the linuxthreads glibc add-on installed."; exit 1])
    7373        PTHREAD="-lpthread"
    74         CFLAGS="$CFLAGS -Wall -Wno-return-type -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT"
     74        CFLAGS="$CFLAGS -Wall -Wno-return-type -Werror=format-security -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT"
    7575        ;;
    7676    *)
  • branches/2.2.9/mondo/src/common/libmondo-archive.c

    r2160 r2190  
    641641        }
    642642#else
     643        /* Linux */
    643644#ifdef __IA64__
    644645        strcpy(bootdev, call_program_and_get_last_line_of_output
     
    665666            }
    666667        }
     668        /* Linux */
    667669#endif
    668670        if (bootdev[0])
     
    12211223    sprintf(data_disks_file, "%s/all.tar.gz", bkpinfo->tmpdir);
    12221224
    1223     snprintf(g_serial_string, MAX_STR_LEN - 1,
     1225    snprintf(g_serial_string, MAX_STR_LEN - 8, "%s",
    12241226             call_program_and_get_last_line_of_output("dd \
    12251227if=/dev/urandom bs=16 count=1 2> /dev/null | \
  • branches/2.2.9/mondo/src/common/libmondo-cli.c

    r2134 r2190  
    395395      "fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
    396396    log_msg(4, "Executing: %s", command);
    397     asprintf(&partition_list, call_program_and_get_last_line_of_output(command));
     397    asprintf(&partition_list, "%s", call_program_and_get_last_line_of_output(command));
    398398    paranoid_free(command);
    399399    log_msg(4, "Partition list for %s: %s", dsf, partition_list);
     
    498498                      VG, VG);
    499499                    log_msg(4, "  Running: %s", command);
    500                     asprintf(&mount_list, call_program_and_get_last_line_of_output(command));
     500                    asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command));
    501501                    paranoid_free(command);
    502502                    log_msg(4, "  VG %s mount_list: %s", VG, mount_list);
     
    519519                        "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");
    520520                    log_msg (5, "Running: %s", command);
    521                     asprintf(&mount_list, call_program_and_get_last_line_of_output(command));
     521                    asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command));
    522522                    paranoid_free(command);
    523523                    log_msg(4, "  Software raid device list: %s", mount_list);   
     
    571571         "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'");
    572572        log_msg (5, "  Running: %s", command);
    573         asprintf(&mount_list, call_program_and_get_last_line_of_output(command));
     573        asprintf(&mount_list, "%s", call_program_and_get_last_line_of_output(command));
    574574        paranoid_free(command);
    575575        log_msg(4, "  Software raid device list: %s", mount_list);   
     
    756756        }
    757757       
    758         asprintf(&tmp1, flag_val['I']);
     758        asprintf(&tmp1, "%s", flag_val['I']);
    759759        p = tmp1;
    760760        q = tmp1;
     
    10551055            strcat(bkpinfo->exclude_paths, " ");
    10561056        }
    1057         asprintf(&tmp1, flag_val['E']);
     1057        asprintf(&tmp1, "%s", flag_val['E']);
    10581058
    10591059        p = tmp1;
  • branches/2.2.9/mondo/src/common/libmondo-devices.c

    r2187 r2190  
    902902    }
    903903
    904     sprintf(tmp, call_program_and_get_last_line_of_output
     904    sprintf(tmp, "%s", call_program_and_get_last_line_of_output
    905905            ("dvdrecord -scanbus 2> /dev/null | grep \") '\" | grep -n \"\" | grep DVD | cut -d':' -f1")
    906906        );
    907907    log_msg(5, "tmp = '%s'", tmp);
    908908    if (!tmp[0])
    909         sprintf(tmp, call_program_and_get_last_line_of_output
     909        sprintf(tmp, "%s", call_program_and_get_last_line_of_output
    910910                ("cdrecord -scanbus 2> /dev/null | grep \") '\" | grep -n \"\" | grep DVD | cut -d':' -f1")
    911911            );
  • branches/2.2.9/mondo/src/common/libmondo-filelist.c

    r2184 r2190  
    2626#include <errno.h>
    2727#include <stdio.h>
    28 
    29 
    30 /**
    31  * The maximum depth of directories to put in the skeleton filelist.
    32  * This is a balance between performance and a good progress indicator.
    33  */
    34 #define MAX_SKEL_DEPTH 3
    3528
    3629
     
    14061399        asprintf(&strtmp,
    14071400             "find %s -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o %s -type d -print > %s 2> /dev/null",
    1408              dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist);
     1401             dir, find_excludes, g_skeleton_filelist);
    14091402#else
    14101403        // On BSD, for example, /sys is the kernel sources -- don't exclude
    14111404        asprintf(&strtmp,
    1412              "find %s -maxdepth %d -fstype mvfs -prune -o -path /proc -prune -o %s -type d -print > %s 2> /dev/null",
    1413                 dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist);
     1405             "find %s -fstype mvfs -prune -o -path /proc -prune -o %s -type d -print > %s 2> /dev/null",
     1406                dir, find_excludes, g_skeleton_filelist);
    14141407#endif
    14151408        paranoid_free(find_excludes);
     
    14271420        log_msg(5, "entries = %ld", g_skeleton_entries);
    14281421        percentage = 0;
    1429     } else if (depth <= MAX_SKEL_DEPTH) // update evalcall form if appropriate
     1422    } else // update evalcall form if appropriate
    14301423    {
    14311424        sprintf(find_skeleton_marker,
     
    16501643        log_msg(2, "include_paths = '%s'", include_paths);
    16511644        log_msg(1, "Calculating filelist");
    1652         asprintf(&tmp2, call_program_and_get_last_line_of_output("mount | grep -Ew 'ntfs|ntfs-3g|fat|vfat|dos' | awk '{print $3}'"));
     1645        asprintf(&tmp2, "%s", call_program_and_get_last_line_of_output("mount | grep -Ew 'ntfs|ntfs-3g|fat|vfat|dos' | awk '{print $3}'"));
    16531646        if (strlen(tmp2) < 1) {
    16541647            asprintf(&tmp1," ");
     
    16571650            asprintf(&tmp1, "find %s -name '/win386.swp' -o -name '/hiberfil.sys' -o -name '/pagefile.sys' 2> /dev/null\n",tmp2);
    16581651            paranoid_free(tmp2);
    1659             asprintf(&tmp2, call_program_and_get_last_line_of_output(tmp1));
     1652            asprintf(&tmp2, "%s", call_program_and_get_last_line_of_output(tmp1));
    16601653            log_msg(2, "Found windows files: %s",tmp2);
    16611654        }
  • branches/2.2.9/mondo/src/common/libmondo-raid.c

    r1261 r2190  
    10431043    pos = string;
    10441044    while (*pos == ' ') pos += 1;
    1045     asprintf(&strtmp, pos);
     1045    asprintf(&strtmp, "%s", pos);
    10461046    strcpy(string, strtmp);
    10471047    paranoid_free(strtmp);
  • branches/2.2.9/mondo/src/common/libmondo-string.c

    r2125 r2190  
    875875    } else {
    876876        /* Some full devices like this /dev/mapper/mpath0
    877         * /dev/cciss/c0d0 may be used as partition names */
     877          /dev/cciss/c0d0 may be used as partition names */
    878878        if ((strstr(partition,"/dev/mapper/mpath") != NULL) ||
    879879            (strstr(partition,"/dev/cciss/c") != NULL) ||
  • branches/2.2.9/mondo/src/common/libmondo-tools.c

    r2160 r2190  
    232232
    233233    uname(&utsn);
    234     asprintf(&tmp, utsn.machine);
     234    asprintf(&tmp, "%s", utsn.machine);
    235235    return (tmp);
    236236}
  • branches/2.2.9/mondo/src/mondorestore/mondo-prep.c

    r2188 r2190  
    596596  }
    597597  // create device list from normal disks followed by spare ones
    598   asprintf(&devices, raidlist->el[i].data_disks.el[0].device);
     598  asprintf(&devices, "%s", raidlist->el[i].data_disks.el[0].device);
    599599  for (j = 1; j < raidlist->el[i].data_disks.entries; j++) {
    600600    asprintf(&strtmp, "%s", devices);
     
    21512151            } else {
    21522152                res = 0;
    2153                 fprintf(fout, output);
     2153                fprintf(fout, "%s", output);
    21542154                paranoid_pclose(fout);
    21552155            }
Note: See TracChangeset for help on using the changeset viewer.