Changeset 2391


Ignore:
Timestamp:
Sep 11, 2009, 3:17:46 AM (9 years ago)
Author:
bruno
Message:
  • Adds ext3 initrd support for 2.6.30
  • Fix a typo in mondorestore
Location:
branches/2.2.10
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/mindi

    r2382 r2391  
    633633    local lcMagicCramfs="<3>cramfs: wrong magic"
    634634    local lcMagicExt2fs="EXT2-fs: blocksize too small for device."
     635    local lcMagicExt3fs="<3>EXT3-fs: blocksize too small for journal device."
    635636    local lcMagicInitfs="<6>checking if image is initramfs...|<6>Unpacking initramfs...|<6>Trying to unpack rootfs image as
    636637initramfs"
     
    650651    file $lvKernelImage 2>&1 | grep -q gzip
    651652    if [ $? -eq 0 ]; then
    652         lvScanRes=`gzip -cd $lvKernelImage | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicInitfs"`
     653        lvScanRes=`gzip -cd $lvKernelImage | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicExt3fs|$lcMagicInitfs"`
    653654    else
    654655        # get offet of gzip magic "1f8b0800" in file
     
    659660
    660661        # scan kernel image for initrd filessystem support
    661         lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c 2> /dev/null | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicInitfs"`
     662        lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c 2> /dev/null | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicExt3fs|$lcMagicInitfs"`
    662663    fi
    663664
     
    665666    if [ `echo $lvScanRes | grep -Ec "$lcMagicExt2fs"` -eq 1 ]; then
    666667        lvUseFilesystem="ext2fs"
     668    elif [ `echo $lvScanRes | grep -Ec "$lcMagicExt3fs"` -eq 1 ]; then
     669        lvUseFilesystem="ext3fs"
    667670    elif [ `echo $lvScanRes | grep -Ec "$lcMagicInitfs"` -eq 1 ]; then
    668671        lvUseFilesystem="initramfs"
     
    24042407    gvFileSystem=`GetInitrdFilesystemToUse ${kernelpath}`
    24052408    [ -z  gvFileSystem ] && Die "GetFilesystemToUse() failed. Terminating."
    2406     case "$gvFileSystem" in
    2407     "ext2fs")
     2409    if [ "$gvFileSystem" = "ext2fs" ] || [ "$gvFileSystem" = "ext3fs" ]; then
    24082410        # say what will be used
    2409         LogFile "Creating an ext2 initrd image..."
     2411        LogFile "Creating an $gvFileSystem initrd image..."
    24102412        # kernel expects linuxrc in ext2 filesystem
    24112413        ( cd $mountpoint && ln -sf sbin/init linuxrc )
     
    24192421        # log that we are done
    24202422        LogFile "...done."
    2421     ;;
    2422     "initramfs")
     2423    elif [ "$gvFileSystem" = "initramfs" ]; then
    24232424        # say what will be used
    24242425        LogFile "Creating a gzip'ed cpio (AKA initramfs) initrd image..."
     
    24352436        # log that we are done
    24362437        LogFile "...done."
    2437     ;;
    2438     *)
     2438    else
    24392439        Die "Filesystem $gvFileSystem not supported for initrd image. Terminating."
    2440     ;;
    2441     esac
     2440    fi
     2441
    24422442    if [ "$res" -eq "0" ] ; then
    24432443        echo -en "..."
  • branches/2.2.10/mondo/src/mondorestore/mondorestore.c

    r2383 r2391  
    878878    if (retval) {
    879879        log_to_screen("Errors occurred during the nuke phase.");
    880     } else if (tmp1, "RESTORE")) {
     880    } else if (strstr(tmp1, "RESTORE")) {
    881881        log_to_screen("PC was restored successfully. Thank you for using Mondo Rescue.");
    882882        log_to_screen("Please visit our website at http://www.mondorescue.org for more information.");
  • branches/2.2.10/tools/quality

    r2357 r2391  
    2828
    2929# How many sprintf/strcat/strcpy vs asprintf are they
    30 for s in asprintf mr_asprintf sprintf snprintf strcat strncat strcpy strncpy fgets malloc mr_malloc malloc_string getline mr_getline ARBITRARY_MAXIMUM MAX_TAPECATALOG_ENTRIES MAX_MOUNTLIST_ENTRIES MAXIMUM_RAID_DEVS MAXIMUM_ADDITIONAL_RAID_VARS MAXIMUM_DISKS_PER_RAID_DEV MAX_TAPECAT_FNAME_LEN MAX_NOOF_MEDIA MAX_NEWT_COMMENT_LEN MAX_NOOF_SETS_HERE MAX_STR_LEN getcwd goto free mr_free paranoid_free paranoid_system mr_system assert; do
     30for s in asprintf mr_asprintf sprintf snprintf strcat strncat strcpy strncpy fgets malloc mr_malloc malloc_string getline mr_getline ARBITRARY_MAXIMUM MAX_TAPECATALOG_ENTRIES MAX_MOUNTLIST_ENTRIES MAXIMUM_RAID_DEVS MAXIMUM_ADDITIONAL_RAID_VARS MAXIMUM_DISKS_PER_RAID_DEV MAX_TAPECAT_FNAME_LEN MAX_NOOF_MEDIA MAX_NEWT_COMMENT_LEN MAX_NOOF_SETS_HERE MAX_STR_LEN getcwd goto free mr_free paranoid_free paranoid_system mr_system assert static; do
    3131    echo "mondorescue $s usage : "
    3232    tot=0
Note: See TracChangeset for help on using the changeset viewer.