Ignore:
Timestamp:
Mar 9, 2024, 3:10:04 AM (2 months ago)
Author:
Bruno Cornec
Message:

Fix all remaining compiler errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/mondorestore/mondorestore.c

    r3876 r3879  
    1313#include "mr_mem.h"
    1414#include "mr_file.h"
    15 #include "../common/mondostructures.h"
    16 #include "../common/libmondo.h"
    17 #include "mr-externs.h"
     15#include "mondostructures.h"
    1816#include "mondorestore.h"
    1917#include "mr_msg.h"
     
    2119#include "mondo-rstr-tools-EXT.h"
    2220#include "libmondo-mountlist-EXT.h"
     21#include "libmondo-tools-EXT.h"
     22#include "libmondo-gui-EXT.h"
     23#include "libmondo-devices-EXT.h"
     24#include "libmondo-fork-EXT.h"
     25#include "libmondo-string-EXT.h"
     26#include "libmondo-archive-EXT.h"
     27#include "libmondo-raid-EXT.h"
     28#include "libmondo-filelist-EXT.h"
     29#include "libmondo-files-EXT.h"
     30#include "libmondo-stream-EXT.h"
     31#include "libmondo-cli-EXT.h"
    2332#include "newt-specific-EXT.h"
    2433
    2534extern void wait_until_software_raids_are_prepped(char *, int);
    2635extern void twenty_seconds_til_yikes(void);
     36// in mondo-prep.c
     37extern void resize_mountlist_proportionately_to_suit_new_drives(struct mountlist_itself *);
     38extern int format_everything(struct mountlist_itself *, bool , struct raidlist_itself *);
     39extern int partition_everything(struct mountlist_itself *);
     40extern int fput_string_one_char_at_a_time(FILE *, char *);
     41extern int do_my_funky_lvm_stuff(bool, bool );
     42extern int stop_all_raid_devices(struct mountlist_itself *);
     43
     44// in mondo-rstr-newt.c
     45extern int edit_mountlist(char *, struct mountlist_itself *, struct raidlist_itself *);
     46
     47// from libmondo-devices.c
     48extern bool g_restoring_live_from_cd;
     49extern bool g_restoring_live_from_netfs;
     50
     51extern int g_currentY;
    2752
    2853/* We don't have a cleanup function yet */
     
    5378extern int g_partition_table_locked_up;
    5479extern int g_noof_rows;
    55 
    56 extern int partition_everything(struct mountlist_itself *mountlist);
    57 extern int handle_incoming_parameters(int argc, char *argv[]);
     80extern int g_current_media_number;
    5881
    5982/**
     
    121144char *g_getfattr;
    122145
     146extern long g_current_progress;
     147extern int g_currentY;
     148extern int g_current_media_number;
     149
     150
    123151/* @} - end of "Restore-Time Globals" in globalGroup */
    124152
    125 
    126 
    127 extern int copy_from_src_to_dest(FILE * f_orig, FILE * f_archived,
    128                                  char direction);
    129153
    130154
     
    580604                just_changed_cds = FALSE;
    581605                log_msg(3, "I'll continue to scan this CD for bigfiles to be restored.");
    582             } else if (does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST")) {
     606            } else if (does_file_exist(ARCHIVES_PATH "/NOT-THE-LAST")) {
    583607                insist_on_this_cd_number(++g_current_media_number);
    584608                log_to_screen("Restoring from %s #%d", mds, g_current_media_number);
     
    691715    paranoid_free(command);
    692716
    693     mr_asprintf(filelist_name, MNT_CDROM "/archives/filelist.%ld", current_tarball_number);
     717    mr_asprintf(filelist_name, ARCHIVES_PATH "/filelist.%ld", current_tarball_number);
    694718    if (length_of_file(filelist_name) <= 2) {
    695719        log_msg(2, "There are _zero_ files in filelist '%s'", filelist_name);
     
    726750    if (filelist == NULL || matches > 0) {
    727751        if (g_getfattr) {
    728             mr_asprintf(xattr_fname, XATTR_LIST_FNAME_RAW_SZ, MNT_CDROM "/archives", current_tarball_number);
     752            mr_asprintf(xattr_fname, XATTR_LIST_FNAME_RAW_SZ, ARCHIVES_PATH, current_tarball_number);
    729753        }
    730754        if (g_getfacl) {
    731             mr_asprintf(acl_fname, ACL_LIST_FNAME_RAW_SZ, MNT_CDROM "/archives", current_tarball_number);
     755            mr_asprintf(acl_fname, ACL_LIST_FNAME_RAW_SZ, ARCHIVES_PATH, current_tarball_number);
    732756        }
    733757        if (strstr(tarball_fname, ".bz2")) {
     
    922946        mr_free(progress_str);
    923947
    924         mr_asprintf(tarball_fname, MNT_CDROM "/archives/%ld.afio.bz2", current_tarball_number);
     948        mr_asprintf(tarball_fname, ARCHIVES_PATH "/%ld.afio.bz2", current_tarball_number);
    925949        if (!does_file_exist(tarball_fname)) {
    926950            mr_free(tarball_fname);
    927             mr_asprintf(tarball_fname, MNT_CDROM "/archives/%ld.afio.gz", current_tarball_number);
     951            mr_asprintf(tarball_fname, ARCHIVES_PATH "/%ld.afio.gz", current_tarball_number);
    928952        }
    929953        if (!does_file_exist(tarball_fname)) {
    930954            mr_free(tarball_fname);
    931             mr_asprintf(tarball_fname, MNT_CDROM "/archives/%ld.afio.lzma", current_tarball_number);
     955            mr_asprintf(tarball_fname, ARCHIVES_PATH "/%ld.afio.lzma", current_tarball_number);
    932956        }
    933957        if (!does_file_exist(tarball_fname)) {
    934958            mr_free(tarball_fname);
    935             mr_asprintf(tarball_fname, MNT_CDROM "/archives/%ld.afio.lzo", current_tarball_number);
     959            mr_asprintf(tarball_fname, ARCHIVES_PATH "/%ld.afio.lzo", current_tarball_number);
    936960        }
    937961        if (!does_file_exist(tarball_fname)) {
    938962            mr_free(tarball_fname);
    939             mr_asprintf(tarball_fname, MNT_CDROM "/archives/%ld.afio.", current_tarball_number);
     963            mr_asprintf(tarball_fname, ARCHIVES_PATH "/%ld.afio.", current_tarball_number);
    940964        }
    941965        if (!does_file_exist(tarball_fname)) {
    942966            mr_free(tarball_fname);
    943             mr_asprintf(tarball_fname, MNT_CDROM "/archives/%ld.star.bz2", current_tarball_number);
     967            mr_asprintf(tarball_fname, ARCHIVES_PATH "/%ld.star.bz2", current_tarball_number);
    944968        }
    945969        if (!does_file_exist(tarball_fname)) {
    946970            mr_free(tarball_fname);
    947             mr_asprintf(tarball_fname, MNT_CDROM "/archives/%ld.star.", current_tarball_number);
     971            mr_asprintf(tarball_fname, ARCHIVES_PATH "/%ld.star.", current_tarball_number);
    948972        }
    949973        if (!does_file_exist(tarball_fname)) {
     
    954978                return (0);
    955979            }
    956             if (!does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST")
    957                 || system("find " MNT_CDROM
    958                           "/archives/slice* > /dev/null 2> /dev/null") ==
     980            if (!does_file_exist(ARCHIVES_PATH "/NOT-THE-LAST")
     981                || system("find " ARCHIVES_PATH "/slice* > /dev/null 2> /dev/null") ==
    959982                0) {
    960983                break;
Note: See TracChangeset for help on using the changeset viewer.