Changeset 3821 in MondoRescue


Ignore:
Timestamp:
Mar 3, 2024, 1:56:24 AM (5 months ago)
Author:
Bruno Cornec
Message:

image_devs is now dynamically allocated

Location:
branches/3.3/mondo/src/common
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/common/libmondo-cli.c

    r3777 r3821  
    661661
    662662    if (flag_set['x']) {
    663         strncpy(bkpinfo->image_devs, flag_val['x'],(MAX_STR_LEN / 4)-1);
     663        mr_asprintf(bkpinfo->image_devs, "%s", flag_val['x']);
    664664        if ((run_program_and_log_output("which ntfsclone", 2)) && (! bkpinfo->restore_data)) {
    665665            fatal_error("Please install ntfsprogs package/tarball.");
  • branches/3.3/mondo/src/common/libmondo-devices.c

    r3777 r3821  
    27362736                finish(1);
    27372737            }
    2738             strncpy(bkpinfo->image_devs, tmp1, (MAX_STR_LEN / 4)-1);
     2738            mr_asprint(bkpinfo->image_devs, "%s", tmp1);
    27392739        }
    27402740
  • branches/3.3/mondo/src/common/libmondo-files.c

    r3623 r3821  
    11031103 * @param bkpinfo The backup information structure. Fields used:
    11041104 * - @c bkpinfo->backup_media_type
    1105  * - @c bkpinfo->image_devs
    11061105 * - @c bkpinfo->media_size
    11071106 * - @c bkpinfo->optimal_set_size
  • branches/3.3/mondo/src/common/libmondo-tools.c

    r3794 r3821  
    820820    bkpinfo->zip_exe[0] = '\0';
    821821    bkpinfo->zip_suffix[0] = '\0';
    822     bkpinfo->image_devs[0] = '\0';
     822    bkpinfo->image_devs = NULL;
    823823    bkpinfo->compression_level = 3;
    824824    bkpinfo->use_lzo = FALSE;
  • branches/3.3/mondo/src/common/mondostructures.h

    r3429 r3821  
    398398   * This is a useful feature, but use at your own risk.
    399399   */
    400     char image_devs[MAX_STR_LEN / 4];
     400    char *image_devs;
    401401
    402402  /**
  • branches/3.3/mondo/src/common/newt-specific.c

    r3618 r3821  
    428428        mr_free(bkpinfo->include_paths);
    429429        mr_free(bkpinfo->subdir);
     430        mr_free(bkpinfo->image_devs);
    430431        /* Then free the structure */
    431432        paranoid_free(bkpinfo);
Note: See TracChangeset for help on using the changeset viewer.