Ignore:
Timestamp:
Nov 20, 2007, 3:36:00 PM (16 years ago)
Author:
Bruno Cornec
Message:

exclude_paths now a configuration item

File:
1 edited

Legend:

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

    r1770 r1817  
    15551555    char *tmp = NULL;
    15561556    char *tmp1 = NULL;
     1557    char *tmp2 = NULL;
    15571558    char *sz_size = NULL;
    15581559    char *command = NULL;
     
    16991700                    bkpinfo->media_device);
    17001701        } else {
    1701 <<<<<<< .courant
    1702             mr_asprintf(&comment, _("What is your media device ?"));
     1702            if (bkpinfo->backup_media_type == usb) {
     1703                mr_asprintf(&comment, _("What is the /dev entry of your USB Disk/Key, please ?"));
     1704            } else {
     1705                mr_asprintf(&comment, _("What is your media device ?"));
     1706            }
    17031707            mr_asprintf(&tmp, mr_conf->media_device);
    17041708
     
    17061710                log_to_screen(_("User has chosen not to backup the PC"));
    17071711                finish(1);
    1708 =======
    1709             if ((find_cdrw_device(bkpinfo->media_device)) && (bkpinfo->backup_media_type != usb)) {
    1710                 bkpinfo->media_device[0] = '\0';
    1711 >>>>>>> .fusion-droit.r1769
    1712             }
    1713 <<<<<<< .courant
     1712            }
    17141713            mr_free(comment);
    17151714
     
    17251724                if (!popup_and_get_string("Device", comment, tmp, 5)) {
    17261725                    log_to_screen(_("User has chosen not to backup the PC"));
    1727 =======
    1728             if (bkpinfo->media_device[0]) {
    1729                 if (bkpinfo->backup_media_type == usb) {
    1730                     sprintf(tmp,
    1731                         "I think your %s media corresponds to %s. Is this correct?",
    1732                         media_descriptor_string(bkpinfo->backup_media_type),
    1733                         bkpinfo->media_device);
    1734                 } else {
    1735                     sprintf(tmp,
    1736                         "I think I've found your %s burner at SCSI node %s. Is this correct? (Say no if you have an IDE burner and you are running a 2.6 kernel. You will then be prompted for further details.)",
    1737                         media_descriptor_string(bkpinfo->backup_media_type),
    1738                         bkpinfo->media_device);
    1739                 }
    1740                 if (!ask_me_yes_or_no(tmp)) {
    1741                     bkpinfo->media_device[0] = '\0';
    1742                 }
    1743             }
    1744             if (!bkpinfo->media_device[0]) {
    1745                 if (bkpinfo->backup_media_type == usb) {
    1746                     i = popup_and_get_string("/dev entry?",
    1747                                          "What is the /dev entry of your USB Disk/Key, please?",
    1748                                          bkpinfo->media_device,
    1749                                          MAX_STR_LEN / 4);
    1750                 } else {
    1751                     if (g_kernel_version < 2.6) {
    1752                         i = popup_and_get_string("Device node?",
    1753                                              "What is the SCSI node of your CD (re)writer, please?",
    1754                                              bkpinfo->media_device,
    1755                                              MAX_STR_LEN / 4);
    1756                     } else {
    1757                         i = popup_and_get_string("/dev entry?",
    1758                                              "What is the /dev entry of your CD (re)writer, please?",
    1759                                              bkpinfo->media_device,
    1760                                              MAX_STR_LEN / 4);
    1761                     }
    1762                 }
    1763                 if (!i) {
    1764                     log_to_screen("User has chosen not to backup the PC");
    1765 >>>>>>> .fusion-droit.r1769
    17661726                    finish(1);
    17671727                }
     
    21062066        mr_asprintf(&tmp, list_of_NFS_mounts_only());
    21072067        if (strlen(tmp) > 2) {
    2108             if (bkpinfo->exclude_paths[0]) {
    2109                 strcat(bkpinfo->exclude_paths, " ");
    2110             }
    2111             strncpy(bkpinfo->exclude_paths, tmp, MAX_STR_LEN);
     2068            if (bkpinfo->exclude_paths != NULL) {
     2069                mr_strcat(bkpinfo->exclude_paths, " ");
     2070            }
     2071            mr_strcat(bkpinfo->exclude_paths,tmp);
    21122072        }
    21132073        mr_free(tmp);
Note: See TracChangeset for help on using the changeset viewer.