Ignore:
Timestamp:
Sep 24, 2007, 3:04:43 AM (17 years ago)
Author:
Bruno Cornec
Message:

Render bkpinfo global (potential issue on thread, but should not be a problem as that structure is indeed static during archive)
Should solve the tmpdir issue from previous rev.
May still not compile

File:
1 edited

Legend:

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

    r1644 r1645  
    276276extern t_bkptype g_backup_media_type;   // set by main()
    277277
    278 
    279 
    280 
    281 void set_g_cdrom_and_g_dvd_to_bkpinfo_value(struct s_bkpinfo *bkpinfo)
     278/* Reference to global bkpinfo */
     279extern struct s_bkpinfo *bkpinfo;
     280
     281
     282
     283
     284void set_g_cdrom_and_g_dvd_to_bkpinfo_value()
    282285{
    283286    strcpy(g_cdrom_drive_is_here, bkpinfo->media_device);   // just in case
     
    664667 * @see mount_CDROM_here
    665668 */
    666 int find_and_mount_actual_cd(struct s_bkpinfo *bkpinfo, char *mountpoint)
     669int find_and_mount_actual_cd(char *mountpoint)
    667670{
    668671    /*@ buffers ***************************************************** */
     
    16981701 */
    16991702void
    1700 insist_on_this_cd_number(struct s_bkpinfo *bkpinfo, int cd_number_i_want)
     1703insist_on_this_cd_number(int cd_number_i_want)
    17011704{
    17021705
     
    17551758//    return;
    17561759    }
    1757     if ((res = what_number_cd_is_this(bkpinfo)) != cd_number_i_want) {
     1760    if ((res = what_number_cd_is_this()) != cd_number_i_want) {
    17581761        log_msg(3, "Currently, we hold %d but we want %d", res,
    17591762                cd_number_i_want);
     
    17651768                cd_number_i_want);
    17661769        log_msg(3, tmp);
    1767         while (what_number_cd_is_this(bkpinfo) != cd_number_i_want) {
     1770        while (what_number_cd_is_this() != cd_number_i_want) {
    17681771            paranoid_system("sync");
    17691772            if (is_this_device_mounted(MNT_CDROM)) {
     
    18131816 * @ingroup archiveGroup
    18141817 */
    1815 int interactively_obtain_media_parameters_from_user(struct s_bkpinfo
    1816                                                     *bkpinfo,
    1817                                                     bool
    1818                                                     archiving_to_media)
     1818int interactively_obtain_media_parameters_from_user(bool archiving_to_media)
    18191819// archiving_to_media is TRUE if I'm being called by mondoarchive
    18201820// archiving_to_media is FALSE if I'm being called by mondorestore
     
    18521852            bkptype_to_string(bkpinfo->backup_media_type));
    18531853    if (archiving_to_media) {
    1854         sensibly_set_tmpdir_and_scratchdir(bkpinfo);
     1854        sensibly_set_tmpdir_and_scratchdir();
    18551855    }
    18561856    bkpinfo->cdrw_speed = (bkpinfo->backup_media_type == cdstream) ? 2 : 4;
     
    19321932                sprintf(comment,
    19331933                        "Please specify your %s drive's /dev entry",
    1934                         media_descriptor_string(bkpinfo->
    1935                                                 backup_media_type));
     1934                        media_descriptor_string(bkpinfo->backup_media_type));
    19361935                if (!popup_and_get_string
    19371936                    ("Device?", comment, bkpinfo->media_device,
     
    19511950                sprintf(tmp,
    19521951                        "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.)",
    1953                         media_descriptor_string(bkpinfo->
    1954                                                 backup_media_type),
     1952                        media_descriptor_string(bkpinfo->backup_media_type),
    19551953                        bkpinfo->media_device);
    19561954                if (!ask_me_yes_or_no(tmp)) {
     
    25072505 * @ingroup utilityGroup
    25082506 */
    2509 void sensibly_set_tmpdir_and_scratchdir(struct s_bkpinfo *bkpinfo)
     2507void sensibly_set_tmpdir_and_scratchdir()
    25102508{
    25112509    char *tmp, *command, *sz;
     
    26092607 * (and remain mounted after this function returns).
    26102608 */
    2611 int what_number_cd_is_this(struct s_bkpinfo *bkpinfo)
     2609int what_number_cd_is_this()
    26122610{
    26132611    int cd_number = -1;
Note: See TracChangeset for help on using the changeset viewer.