Changeset 3831 in MondoRescue


Ignore:
Timestamp:
Mar 4, 2024, 5:47:08 PM (5 months ago)
Author:
Bruno Cornec
Message:

Fix compilation warnings

Location:
branches/3.3/mondo/src
Files:
2 edited

Legend:

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

    r3826 r3831  
    27192719        }
    27202720        bkpinfo->boot_loader = i;
    2721         /* TODO: Check consisytency of boot type and boot loader */
     2721        /* TODO: Check consistency of boot type and boot loader */
    27222722
    27232723        if (bkpinfo->include_paths) {
     
    28152815        bkpinfo->backup_data = TRUE;
    28162816        if (strcmp(compression_type,"lzo") == 0) {
    2817             strcpy(bkpinfo->zip_exe, "lzop");
    2818             strcpy(bkpinfo->zip_suffix, "lzo");
     2817            mr_asprintf(bkpinfo->zip_exe, "%s", "lzop");
     2818            mr_asprintf(bkpinfo->zip_suffix, "%s", "lzo");
    28192819        } else if (strcmp(compression_type,"gzip") == 0) {
    2820             strcpy(bkpinfo->zip_exe, "gzip");
    2821             strcpy(bkpinfo->zip_suffix, "gz");
     2820            mr_asprintf(bkpinfo->zip_exe, "%s", "gzip");
     2821            mr_asprintf(bkpinfo->zip_suffix, "%s", "gz");
    28222822        } else if (strcmp(compression_type,"lzma") == 0) {
    2823             //strcpy(bkpinfo->zip_exe, "xy");
    2824             //strcpy(bkpinfo->zip_suffix, "xy");
     2823            mr_asprintf(bkpinfo->zip_exe, "%s", "xz");
     2824            mr_asprintf(bkpinfo->zip_suffix, "%s", "xz");
    28252825        } else if (strcmp(compression_type,"bzip2") == 0) {
    2826             strcpy(bkpinfo->zip_exe, "bzip2");
    2827             strcpy(bkpinfo->zip_suffix, "bz2");
     2826            mr_asprintf(bkpinfo->zip_exe, "%s", "bzip2");
     2827            mr_asprintf(bkpinfo->zip_suffix, "%s", "bz2");
    28282828        } else {
    2829             bkpinfo->zip_exe[0] = bkpinfo->zip_suffix[0] = '\0';
     2829            mr_free(bkpinfo->zip_exe);
     2830            mr_free(bkpinfo->zip_suffix);
    28302831        }
    28312832#if __FreeBSD__ == 5
    2832         strcpy(bkpinfo->kernel_path, "/boot/kernel/kernel");
     2833        mr_asprintf(bkpinfo->kernel_path, "%s", "/boot/kernel/kernel");
    28332834#elif __FreeBSD__ == 4
    2834         strcpy(bkpinfo->kernel_path, "/kernel");
     2835        mr_asprintf(bkpinfo->kernel_path, "%s", "/kernel");
    28352836#elif linux
    28362837        if (figure_out_kernel_path_interactively_if_necessary(bkpinfo->kernel_path)) {
  • branches/3.3/mondo/src/mondorestore/mondorestore.c

    r3830 r3831  
    2323
    2424extern void wait_until_software_raids_are_prepped(char *, int);
     25extern char *mr_popup_and_get_string(char *, char *, char *);
    2526
    2627extern void twenty_seconds_til_yikes(void);
     
    19911992                gotos_suck:
    19921993                // (NB: MNT_RESTORING is where your filesystem is mounted now, by default)
    1993                 tmp = mr_popup_and_get_string("Restore path", "Restore files to where?", old_restpath);
    1994                 if (tmp != NULL) {
    1995                     if (!strcmp(tmp, "/")) {
     1994                tmp1 = mr_popup_and_get_string("Restore path", "Restore files to where?", old_restpath);
     1995                if (tmp1 != NULL) {
     1996                    if (!strcmp(tmp1, "/")) {
    19961997                        if (!ask_me_yes_or_no("Are you sure?")) {
    1997                             mr_free(tmp);
     1998                            mr_free(tmp1);
    19981999                            goto gotos_suck;
    19992000                        }
    2000                         mr_asprintf(tmp, "%s", ""); // so we restore to [blank]/file/name :)
     2001                        mr_free(tmp1);
     2002                        mr_asprintf(tmp1, "%s", "");    // so we restore to [blank]/file/name :)
    20012003                    }
    2002                     mr_asprintf(bkpinfo->restore_path, "%s", tmp);
     2004                    mr_asprintf(bkpinfo->restore_path, "%s", tmp1);
    20032005                    log_msg(1, "Restoring subset");
    20042006                    retval += restore_everything(filelist);
     
    20072009                    mr_asprintf(bkpinfo->restore_path, "%s", old_restpath);
    20082010                }
     2011                mr_free(tmp1);
    20092012                free_filelist(filelist);
    20102013                if (!ask_me_yes_or_no("Restore another subset of your backup?")) {
     
    20642067                            "Warning - errors occurred during the restore phase.");
    20652068    }
    2066   end_of_func:
    20672069    log_it("Leaving interactive_mode()");
    20682070    return (retval);
Note: See TracChangeset for help on using the changeset viewer.