Changeset 541 in MondoRescue for branches/stable/mondo/mondo/common
- Timestamp:
- May 13, 2006, 8:47:23 PM (18 years ago)
- Location:
- branches/stable/mondo/mondo/common
- Files:
-
- 3 deleted
- 19 edited
- 9 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/common/Makefile.am
r538 r541 9 9 libmondo_a_SOURCES = libmondo-archive.c libmondo-devices.c libmondo-fifo.c \ 10 10 libmondo-filelist.c libmondo-files.c libmondo-fork.c \ 11 libmondo-mountlist.c libmondo-raid.c libmondo-msg.c\11 libmondo-mountlist.c libmondo-raid.c \ 12 12 libmondo-stream.c libmondo-string.c libmondo-tools.c \ 13 13 libmondo-verify.c newt-specific.c \ 14 14 libmondo-archive.h libmondo-devices.h \ 15 15 libmondo-filelist.h libmondo-files.h libmondo-fork.h \ 16 libmondo- mountlist.h libmondo-raid.h \16 libmondo-gui.h libmondo-mountlist.h libmondo-raid.h \ 17 17 libmondo-stream.h libmondo-string.h libmondo-tools.h \ 18 18 libmondo-verify.h libmondo-fifo.h \ … … 20 20 libmondo-devices-EXT.h libmondo-fifo-EXT.h \ 21 21 libmondo-files-EXT.h libmondo-fork-EXT.h \ 22 libmondo- filelist-EXT.h \22 libmondo-gui-EXT.h libmondo-filelist-EXT.h \ 23 23 libmondo-mountlist-EXT.h libmondo-raid-EXT.h \ 24 24 libmondo-string-EXT.h libmondo-tools-EXT.h \ -
branches/stable/mondo/mondo/common/libmondo-archive-EXT.h
r538 r541 15 15 extern int make_slices_and_images(struct s_bkpinfo *bkpinfo, 16 16 char *biggielist_fname); 17 extern int make_iso_fs(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf,char *destfile);17 extern int make_iso_fs(struct s_bkpinfo *bkpinfo, char *destfile); 18 18 extern int make_afioballs_and_images(struct s_bkpinfo *bkpinfo); 19 19 extern int (*move_files_to_cd) (struct s_bkpinfo *, char *, ...); … … 41 41 char *filelist, char *fname, 42 42 int setno); 43 extern void setenv_mondo_ share(void);43 extern void setenv_mondo_lib(void); -
branches/stable/mondo/mondo/common/libmondo-archive.c
r538 r541 179 179 #include "libmondo-devices-EXT.h" 180 180 #include "libmondo-tools-EXT.h" 181 #include " newt-specific-EXT.h"181 #include "libmondo-gui-EXT.h" 182 182 #include "libmondo-fork-EXT.h" 183 183 #include "libmondo-files-EXT.h" … … 186 186 #include "libmondo-verify-EXT.h" 187 187 #include "libmondo-archive.h" 188 #include "lib-common-externs.h" 188 189 #include <sys/sem.h> 189 190 #include <sys/types.h> … … 580 581 * @ingroup archiveGroup 581 582 */ 582 int backup_data(struct s_bkpinfo *bkpinfo , struct s_mrconf *mrconf)583 int backup_data(struct s_bkpinfo *bkpinfo) 583 584 { 584 585 int retval = 0, res = 0; … … 643 644 sprintf(tmp, "rm -f %s/images/*.iso", bkpinfo->scratchdir); 644 645 run_program_and_log_output(tmp, 1); 645 retval += make_those_afios_phase(bkpinfo ,mrconf); // backup regular files646 retval += make_those_afios_phase(bkpinfo); // backup regular files 646 647 retval += make_those_slices_phase(bkpinfo); // backup BIG files 647 648 retval += do_that_final_phase(bkpinfo); // clean up … … 1014 1015 if (!res) { 1015 1016 log_to_screen("Boot+data disks were created OK"); 1016 sprintf(command, "mkdir -p / var/cache/mindi/");1017 sprintf(command, "mkdir -p /root/images/mindi/"); 1017 1018 log_msg(2, command); 1018 1019 run_program_and_log_output(command, FALSE); 1019 1020 sprintf(command, 1020 "cp -f %s/images/mindi.iso / var/cache/mindi/mondorescue.iso",1021 "cp -f %s/images/mindi.iso /root/images/mindi/mondorescue.iso", 1021 1022 bkpinfo->scratchdir); 1022 1023 log_msg(2, command); … … 1252 1253 * @ingroup MLarchiveGroup 1253 1254 */ 1254 int do_that_final_phase(struct s_bkpinfo *bkpinfo , struct s_mrconf *mrconf)1255 int do_that_final_phase(struct s_bkpinfo *bkpinfo) 1255 1256 { 1256 1257 … … 1273 1274 /* write final ISO */ 1274 1275 { 1275 res = write_final_iso_if_necessary(bkpinfo , mrconf);1276 res = write_final_iso_if_necessary(bkpinfo); 1276 1277 retval += res; 1277 1278 if (res) { … … 1563 1564 * @return The number of errors encountered (0 for success) 1564 1565 */ 1565 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo , struct s_mrconf *mrconf)1566 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo) 1566 1567 { 1567 1568 … … 1619 1620 log_to_screen("Archiving regular files"); 1620 1621 log_msg(5, "Go, Shorty. It's your birthday."); 1621 open_progress_form( _("Backing up filesystem"),1622 _("I am backing up your live filesystem now."),1623 _("Please wait. This may take a couple of hours."),1624 _("Working..."),1622 open_progress_form("Backing up filesystem", 1623 "I am backing up your live filesystem now.", 1624 "Please wait. This may take a couple of hours.", 1625 "Working...", 1625 1626 get_last_filelist_number(bkpinfo) + 1); 1626 1627 … … 1707 1708 } else { 1708 1709 res = 1709 move_files_to_cd(bkpinfo, mrconf,storing_filelist_fname,1710 move_files_to_cd(bkpinfo, storing_filelist_fname, 1710 1711 curr_xattr_list_fname, 1711 1712 curr_acl_list_fname, … … 1785 1786 * @return The number of errors encountered (0 for success) 1786 1787 */ 1787 int make_iso_fs(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf,char *destfile)1788 int make_iso_fs(struct s_bkpinfo *bkpinfo, char *destfile) 1788 1789 { 1789 1790 /*@ int ********************************************** */ … … 1848 1849 tmp3 = NULL; 1849 1850 if (bkpinfo->backup_media_type == iso && bkpinfo->manual_cd_tray) { 1850 popup_and_OK( _("Please insert new media and press Enter."));1851 popup_and_OK("Please insert new media and press Enter."); 1851 1852 } 1852 1853 … … 2005 2006 #ifdef __IA64__ 2006 2007 log_msg(1, "IA64 --> elilo"); 2007 asprintf(&tmp2,"mkisofs -no-emul-boot -b images/mindi-bootroot.%s.img -c boot.cat -o _ISO_ -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", mrconf->ia64_boot_size);2008 2008 res = eval_call_to_make_ISO(bkpinfo, 2009 2009 //-b images/mindi-boot.2880.img 2010 tmp2, 2010 "mkisofs -no-emul-boot -b images/mindi-bootroot." 2011 IA64_BOOT_SIZE 2012 ".img -c boot.cat -o _ISO_ -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .", 2011 2013 destfile, 2012 2014 g_current_media_number, … … 2016 2018 // FIXME --- change mkisofs string to MONDO_MKISOFS_REGULAR_SYSLINUX/LILO depending on bkpinfo->make_cd_usE_lilo 2017 2019 // and add ' .' at end 2018 paranoid_free(tmp2);2019 2020 log_msg(1, "Non-ia64 --> lilo"); 2020 2021 res = … … 2150 2151 */ 2151 2152 int 2152 make_slices_and_images(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf,char *biggielist_fname)2153 make_slices_and_images(struct s_bkpinfo *bkpinfo, char *biggielist_fname) 2153 2154 { 2154 2155 … … 2223 2224 } else { 2224 2225 // Call ntfsclone (formerly partimagehack) if it's a /dev entry (i.e. a partition to be imaged) 2225 log_msg(2, "bigfile_fname = '%s'", bigfile_fname);2226 log_msg(2, "bigfile_fname = %s", bigfile_fname); 2226 2227 use_ntfsprog = FALSE; 2227 2228 if (!strncmp(bigfile_fname, "/dev/", 5) … … 2269 2270 } 2270 2271 res = 2271 slice_up_file_etc(bkpinfo, mrconf,bigfile_fname,2272 slice_up_file_etc(bkpinfo, bigfile_fname, 2272 2273 ntfsprog_fifo, biggie_file_number, 2273 2274 noof_biggie_files, use_ntfsprog); … … 2321 2322 * @see make_afioballs_and_images 2322 2323 */ 2323 int make_afioballs_and_images_OLD(struct s_bkpinfo *bkpinfo , struct s_mrconf *mrconf)2324 int make_afioballs_and_images_OLD(struct s_bkpinfo *bkpinfo) 2324 2325 { 2325 2326 … … 2349 2350 log_to_screen("Archiving regular files"); 2350 2351 2351 open_progress_form( _("Backing up filesystem"),2352 _("I am backing up your live filesystem now."),2353 _("Please wait. This may take a couple of hours."),2354 _("Working..."),2352 open_progress_form("Backing up filesystem", 2353 "I am backing up your live filesystem now.", 2354 "Please wait. This may take a couple of hours.", 2355 "Working...", 2355 2356 get_last_filelist_number(bkpinfo) + 1); 2356 2357 … … 2403 2404 } else { 2404 2405 res = 2405 move_files_to_cd(bkpinfo, mrconf,curr_filelist_fname,2406 move_files_to_cd(bkpinfo, curr_filelist_fname, 2406 2407 curr_xattr_list_fname, 2407 2408 curr_acl_list_fname, curr_afioball_fname, … … 2448 2449 * @ingroup MLarchiveGroup 2449 2450 */ 2450 int make_those_afios_phase(struct s_bkpinfo *bkpinfo , struct s_mrconf *mrconf)2451 int make_those_afios_phase(struct s_bkpinfo *bkpinfo) 2451 2452 { 2452 2453 /*@ int ******************************************* */ … … 2465 2466 log_msg(1, 2466 2467 "Using single-threaded make_afioballs_and_images() to suit b0rken FreeBSD 5.0"); 2467 res = make_afioballs_and_images_OLD(bkpinfo , mrconf);2468 res = make_afioballs_and_images_OLD(bkpinfo); 2468 2469 #else 2469 res = make_afioballs_and_images_OLD(bkpinfo , mrconf);2470 res = make_afioballs_and_images_OLD(bkpinfo); 2470 2471 #endif 2471 2472 write_header_block_to_stream(0, "stop-afioballs", 2472 2473 BLK_STOP_AFIOBALLS); 2473 2474 } else { 2474 res = make_afioballs_and_images(bkpinfo , mrconf);2475 res = make_afioballs_and_images(bkpinfo); 2475 2476 } 2476 2477 … … 2575 2576 * transfer files over the network) or leave it as is. 2576 2577 */ 2577 int (*move_files_to_cd) (struct s_bkpinfo *, struct s_mrconf *mrconf,char *, ...) =2578 int (*move_files_to_cd) (struct s_bkpinfo *, char *, ...) = 2578 2579 _move_files_to_cd; 2579 2580 … … 2596 2597 * @return The number of errors encountered (0 for success) 2597 2598 */ 2598 int _move_files_to_cd(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf,char *files_to_add, ...)2599 int _move_files_to_cd(struct s_bkpinfo *bkpinfo, char *files_to_add, ...) 2599 2600 { 2600 2601 … … 2635 2636 } 2636 2637 if (would_occupy / 1024 > bkpinfo->media_size[g_current_media_number]) { 2637 res = write_iso_and_go_on(bkpinfo, struct s_mrconf *mrconf,FALSE); /* FALSE because this is not the last CD we'll write */2638 res = write_iso_and_go_on(bkpinfo, FALSE); /* FALSE because this is not the last CD we'll write */ 2638 2639 retval += res; 2639 2640 if (res) { … … 2685 2686 * @c backup_media_type field is used in this function. 2686 2687 * @param imagesdir The directory containing the floppy images (usually 2687 * / var/cache/mindi).2688 * /root/images/mindi). 2688 2689 * 2689 2690 * @return The number of errors encountered (0 for success) … … 2864 2865 if (!bkpinfo->nonbootable_backup) { 2865 2866 #ifdef __FreeBSD__ 2866 if (!does_file_exist("/ var/cache/mindi/mindi-kern.1722.img"))2867 if (!does_file_exist("/root/images/mindi/mindi-kern.1722.img")) 2867 2868 #else 2868 if (!does_file_exist("/var/cache/mindi/mindi-bootroot.1722.img") 2869 && !does_file_exist("/var/cache/mindi/mindi-boot.1440.img") 2870 && !does_file_exist("/var/cache/mindi/mindi-boot.2880.img") 2871 && !does_file_exist("/var/cache/mindi/mindi-boot.5760.img")) 2869 if (!does_file_exist("/root/images/mindi/mindi-bootroot.1722.img") 2870 && !does_file_exist("/root/images/mindi/mindi-boot.1440.img")) 2872 2871 #endif 2873 2872 { 2874 2873 mvaddstr_and_log_it(g_currentY++, 74, "No Imgs"); 2875 if (does_file_exist("/ var/cache/mindi/mondorescue.iso")) {2874 if (does_file_exist("/root/images/mindi/mondorescue.iso")) { 2876 2875 popup_and_OK 2877 ("Boot+data floppy creation failed. However, FYI, you may burn / var/cache/mindi/mondorescue.iso to a CD and boot from that instead if you wish.");2876 ("Boot+data floppy creation failed. However, FYI, you may burn /root/images/mindi/mondorescue.iso to a CD and boot from that instead if you wish."); 2878 2877 res++; 2879 2878 } 2880 2879 } else { 2881 offer_to_write_floppies(bkpinfo, "/ var/cache/mindi");2880 offer_to_write_floppies(bkpinfo, "/root/images/mindi"); 2882 2881 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 2883 2882 } … … 3279 3278 */ 3280 3279 int 3281 slice_up_file_etc(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf,char *biggie_filename,3280 slice_up_file_etc(struct s_bkpinfo *bkpinfo, char *biggie_filename, 3282 3281 char *ntfsprog_fifo, long biggie_file_number, 3283 3282 long noof_biggie_files, bool use_ntfsprog) … … 3409 3408 } else { 3410 3409 res = 3411 move_files_to_cd(bkpinfo, mrconf,3410 move_files_to_cd(bkpinfo, 3412 3411 slice_fname(biggie_file_number, 0, 3413 3412 bkpinfo->tmpdir, ""), NULL); … … 3511 3510 res = move_files_to_stream(bkpinfo, file_to_archive, NULL); 3512 3511 } else { 3513 res = move_files_to_cd(bkpinfo, mrconf,file_to_archive, NULL);3512 res = move_files_to_cd(bkpinfo, file_to_archive, NULL); 3514 3513 } 3515 3514 retval += res; … … 3603 3602 * however, this occurs rarely. 3604 3603 */ 3605 int write_final_iso_if_necessary(struct s_bkpinfo *bkpinfo , struct s_mrconf *mrconf)3604 int write_final_iso_if_necessary(struct s_bkpinfo *bkpinfo) 3606 3605 { 3607 3606 /*@ int ***************************************************** */ … … 3624 3623 } 3625 3624 #endif 3626 res = write_iso_and_go_on(bkpinfo, struct s_mrconf *mrconf,TRUE);3625 res = write_iso_and_go_on(bkpinfo, TRUE); 3627 3626 #ifndef _XWIN 3628 3627 if (!g_text_mode) { … … 3653 3652 * @see make_iso_fs 3654 3653 */ 3655 int write_iso_and_go_on(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf,bool last_cd)3654 int write_iso_and_go_on(struct s_bkpinfo *bkpinfo, bool last_cd) 3656 3655 { 3657 3656 /*@ pointers **************************************************** */ … … 3729 3728 g_current_media_number); 3730 3729 for (that_one_was_ok = FALSE; !that_one_was_ok;) { 3731 res = make_iso_fs(bkpinfo, mrconf,isofile);3730 res = make_iso_fs(bkpinfo, isofile); 3732 3731 if (g_current_media_number == 1 && !res 3733 3732 && (bkpinfo->backup_media_type == cdr … … 4031 4030 setenv("MONDO_SHARE", MONDO_SHARE, 1); 4032 4031 } 4033 4034 void mrarchive_init_conf(struct s_mrconf *mrconf) {4035 char *command = NULL;4036 FILE *conffd = NULL;4037 FILE *fin = NULL;4038 int n = 0;4039 char *param = NULL;4040 4041 mrconf = (struct s_mrconf *)malloc(sizeof(struct s_mrconf));4042 if (mrconf == NULL) {4043 fatal_error("Unable to malloc mrconf");4044 }4045 /* Default for everything int : 0 char * : NULL */4046 4047 /* mindi conf parameters also needed in mondo */4048 mrconf->ia64_boot_size = 0;4049 4050 asprintf(&command, "mindi -printvar IA64_BOOT_SIZE");4051 fin = popen(command, "r");4052 getline(¶m, &n, fin);4053 pclose(fin);4054 paranoid_free(command);4055 mrconf->ia64_boot_size = atoi(param);4056 paranoid_free(param);4057 4058 mrconf->iso_creation_cmd = NULL;4059 4060 /* Finds mondo conf file */4061 mrconf_open(MONDO_CONF_DIR"/mondo.conf");4062 4063 /* mondo conf parameters needed */4064 mrconf->iso_creation_cmd = mrconf_sread(iso_creation_cmd);4065 4066 mrconf_close(); -
branches/stable/mondo/mondo/common/libmondo-archive.h
r538 r541 17 17 int make_slices_and_images(struct s_bkpinfo *bkpinfo, 18 18 char *biggielist_fname); 19 int make_iso_fs(struct s_bkpinfo *bkpinfo, struct s_mrconf *mrconf,char *destfile);19 int make_iso_fs(struct s_bkpinfo *bkpinfo, char *destfile); 20 20 int make_afioballs_and_images(struct s_bkpinfo *bkpinfo); 21 21 extern int (*move_files_to_cd) (struct s_bkpinfo *, char *, ...); … … 42 42 int archive_this_fileset_with_star(struct s_bkpinfo *bkpinfo, 43 43 char *filelist, char *fname, int setno); 44 void setenv_mondo_ share(void);44 void setenv_mondo_lib(void); -
branches/stable/mondo/mondo/common/libmondo-devices.c
r501 r541 232 232 #include "libmondo-files-EXT.h" 233 233 #include "libmondo-devices.h" 234 #include "lib-common-externs.h" 234 235 #include "libmondo-string-EXT.h" 235 236 #include "libmondo-tools-EXT.h" 236 #include " newt-specific-EXT.h"237 #include "libmondo-gui-EXT.h" 237 238 #include "libmondo-fork-EXT.h" 238 239 #include "libmondo-stream-EXT.h" … … 351 352 && !does_file_exist("/tmp/mountlist.txt.sample")) { 352 353 log_to_screen 353 ( _("Using /dev/root is stupid of you but I'll forgive you."));354 ("Using /dev/root is stupid of you but I'll forgive you."); 354 355 is_this_a_ramdisk = FALSE; 355 356 } … … 379 380 switch (bt) { 380 381 case none: 381 strcpy(output, _("none"));382 strcpy(output, "none"); 382 383 break; 383 384 case iso: 384 strcpy(output, _("iso"));385 strcpy(output, "iso"); 385 386 break; 386 387 case cdr: 387 strcpy(output, _("cdr"));388 strcpy(output, "cdr"); 388 389 break; 389 390 case cdrw: 390 strcpy(output, _("cdrw"));391 strcpy(output, "cdrw"); 391 392 break; 392 393 case cdstream: 393 strcpy(output, _("cdstream"));394 strcpy(output, "cdstream"); 394 395 break; 395 396 case nfs: 396 strcpy(output, _("nfs"));397 strcpy(output, "nfs"); 397 398 break; 398 399 case tape: 399 strcpy(output, _("tape"));400 strcpy(output, "tape"); 400 401 break; 401 402 case udev: 402 strcpy(output, _("udev"));403 strcpy(output, "udev"); 403 404 break; 404 405 default: 405 strcpy(output, _("default"));406 strcpy(output, "default"); 406 407 } 407 408 return (output); … … 694 695 if (!dev[0] || (res = mount_CDROM_here(dev, mountpoint))) { 695 696 if (!popup_and_get_string 696 ( _("CD-ROM device"), _("Please enter your CD-ROM's /dev device"),697 ("CD-ROM device", "Please enter your CD-ROM's /dev device", 697 698 dev, MAX_STR_LEN / 4)) { 698 699 res = 1; … … 702 703 } 703 704 if (res) { 704 log_msg(1, _("mount failed"));705 log_msg(1, "mount failed"); 705 706 } else { 706 log_msg(1, _("mount succeeded with %s"), dev);707 log_msg(1, "mount succeeded with %s", dev); 707 708 } 708 709 paranoid_free(dev); … … 1771 1772 } 1772 1773 if (res) { 1773 log_to_screen( _("WARNING - failed to unmount CD-ROM drive"));1774 log_to_screen("WARNING - failed to unmount CD-ROM drive"); 1774 1775 } 1775 1776 if (!bkpinfo->please_dont_eject) { … … 1779 1780 } 1780 1781 if (res) { 1781 log_to_screen( _("WARNING - failed to eject CD-ROM disk"));1782 log_to_screen("WARNING - failed to eject CD-ROM disk"); 1782 1783 } 1783 1784 popup_and_OK(request); … … 1840 1841 which_backup_media_type(bkpinfo->restore_data); 1841 1842 if (bkpinfo->backup_media_type == none) { 1842 log_to_screen( _("User has chosen not to backup the PC"));1843 log_to_screen("User has chosen not to backup the PC"); 1843 1844 finish(1); 1844 1845 } 1845 1846 if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) { 1846 popup_and_OK( _("Please remove CD/floppy from drive(s)"));1847 popup_and_OK("Please remove CD/floppy from drive(s)"); 1847 1848 } 1848 1849 log_msg(3, "media type = %s", … … 1879 1880 if (archiving_to_media) { 1880 1881 if (ask_me_yes_or_no 1881 ( _("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?")))1882 ("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?")) 1882 1883 { 1883 1884 bkpinfo->manual_cd_tray = TRUE; … … 1885 1886 if ((bkpinfo->compression_level = 1886 1887 which_compression_level()) == -1) { 1887 log_to_screen( _("User has chosen not to backup the PC"));1888 log_to_screen("User has chosen not to backup the PC"); 1888 1889 finish(1); 1889 1890 } 1890 sprintf(comment, _("What speed is your %s (re)writer?"),1891 sprintf(comment, "What speed is your %s (re)writer?", 1891 1892 media_descriptor_string(bkpinfo->backup_media_type)); 1892 1893 if (bkpinfo->backup_media_type == dvd) { … … 1902 1903 } 1903 1904 if (bkpinfo->backup_media_type != dvd) { 1904 if (!popup_and_get_string( _("Speed"), comment, tmp, 4)) {1905 log_to_screen( _("User has chosen not to backup the PC"));1905 if (!popup_and_get_string("Speed", comment, tmp, 4)) { 1906 log_to_screen("User has chosen not to backup the PC"); 1906 1907 finish(1); 1907 1908 } … … 1909 1910 bkpinfo->cdrw_speed = atoi(tmp); // if DVD then this shouldn't ever be used anyway :) 1910 1911 sprintf(comment, 1911 _("How much data (in Megabytes) will each %s store?"),1912 "How much data (in Megabytes) will each %s store?", 1912 1913 media_descriptor_string(bkpinfo->backup_media_type)); 1913 1914 if (!popup_and_get_string("Size", comment, sz_size, 5)) { 1914 log_to_screen( _("User has chosen not to backup the PC"));1915 log_to_screen("User has chosen not to backup the PC"); 1915 1916 finish(1); 1916 1917 } … … 1919 1920 } 1920 1921 if (bkpinfo->media_size[0] <= 0) { 1921 log_to_screen( _("User has chosen not to backup the PC"));1922 log_to_screen("User has chosen not to backup the PC"); 1922 1923 finish(1); 1923 1924 } … … 1940 1941 bkpinfo->media_device); 1941 1942 sprintf(comment, 1942 _("Please specify your %s drive's /dev entry"),1943 "Please specify your %s drive's /dev entry", 1943 1944 media_descriptor_string(bkpinfo-> 1944 1945 backup_media_type)); 1945 1946 if (!popup_and_get_string 1946 ( _("Device?"), comment, bkpinfo->media_device,1947 ("Device?", comment, bkpinfo->media_device, 1947 1948 MAX_STR_LEN / 4)) { 1948 log_to_screen( _("User has chosen not to backup the PC"));1949 log_to_screen("User has chosen not to backup the PC"); 1949 1950 finish(1); 1950 1951 } … … 1959 1960 if (bkpinfo->media_device[0]) { 1960 1961 sprintf(tmp, 1961 _("I think I've found your %s burner at SCSI node %s; am I right on the money?"),1962 "I think I've found your %s burner at SCSI node %s; am I right on the money?", 1962 1963 media_descriptor_string(bkpinfo-> 1963 1964 backup_media_type), … … 1969 1970 if (!bkpinfo->media_device[0]) { 1970 1971 if (g_kernel_version < 2.6) { 1971 i = popup_and_get_string( _("Device node?"),1972 _("What is the SCSI node of your CD (re)writer, please?"),1972 i = popup_and_get_string("Device node?", 1973 "What is the SCSI node of your CD (re)writer, please?", 1973 1974 bkpinfo->media_device, 1974 1975 MAX_STR_LEN / 4); 1975 1976 } else { 1976 i = popup_and_get_string( _("/dev entry?"),1977 _("What is the /dev entry of your CD (re)writer, please?"),1977 i = popup_and_get_string("/dev entry?", 1978 "What is the /dev entry of your CD (re)writer, please?", 1978 1979 bkpinfo->media_device, 1979 1980 MAX_STR_LEN / 4); 1980 1981 } 1981 1982 if (!i) { 1982 log_to_screen( _("User has chosen not to backup the PC"));1983 log_to_screen("User has chosen not to backup the PC"); 1983 1984 finish(1); 1984 1985 } … … 1993 1994 case udev: 1994 1995 if (!ask_me_yes_or_no 1995 ( _("This option is for advanced users only. Are you sure?"))) {1996 log_to_screen( _("User has chosen not to backup the PC"));1996 ("This option is for advanced users only. Are you sure?")) { 1997 log_to_screen("User has chosen not to backup the PC"); 1997 1998 finish(1); 1998 1999 } … … 2000 2001 2001 2002 if (find_tape_device_and_size(bkpinfo->media_device, sz_size)) { 2002 log_msg(3, _("Ok, using vanilla scsi tape."));2003 log_msg(3, "Ok, using vanilla scsi tape."); 2003 2004 strcpy(bkpinfo->media_device, VANILLA_SCSI_TAPE); 2004 2005 if ((fin = fopen(bkpinfo->media_device, "r"))) { … … 2018 2019 } 2019 2020 sprintf(tmp, 2020 _("I think I've found your tape streamer at %s; am I right on the money?"),2021 "I think I've found your tape streamer at %s; am I right on the money?", 2021 2022 bkpinfo->media_device); 2022 2023 } 2023 2024 if (bkpinfo->media_device[0]) { 2024 2025 sprintf(tmp, 2025 _("I think I've found your tape streamer at %s; am I right on the money?"),2026 "I think I've found your tape streamer at %s; am I right on the money?", 2026 2027 bkpinfo->media_device); 2027 2028 if (!ask_me_yes_or_no(tmp)) { … … 2031 2032 if (!bkpinfo->media_device[0]) { 2032 2033 if (!popup_and_get_string 2033 ( _("Device name?"),2034 _("What is the /dev entry of your tape streamer?"),2034 ("Device name?", 2035 "What is the /dev entry of your tape streamer?", 2035 2036 bkpinfo->media_device, MAX_STR_LEN / 4)) { 2036 log_to_screen( _("User has chosen not to backup the PC"));2037 log_to_screen("User has chosen not to backup the PC"); 2037 2038 finish(1); 2038 2039 } … … 2040 2041 sprintf(tmp, "ls -l %s", bkpinfo->media_device); 2041 2042 if (run_program_and_log_output(tmp, FALSE)) { 2042 log_to_screen( _("User has not specified a valid /dev entry"));2043 log_to_screen("User has not specified a valid /dev entry"); 2043 2044 finish(1); 2044 2045 } … … 2068 2069 if ((bkpinfo->compression_level = 2069 2070 which_compression_level()) == -1) { 2070 log_to_screen( _("User has chosen not to backup the PC"));2071 log_to_screen("User has chosen not to backup the PC"); 2071 2072 finish(1); 2072 2073 } … … 2089 2090 { 2090 2091 if (!popup_and_get_string 2091 ( _("NFS dir."),2092 _("Please enter path and directory where archives are stored remotely. (Mondo has taken a guess at the correct value. If it is incorrect, delete it and type the correct one.)"),2092 ("NFS dir.", 2093 "Please enter path and directory where archives are stored remotely. (Mondo has taken a guess at the correct value. If it is incorrect, delete it and type the correct one.)", 2093 2094 bkpinfo->nfs_mount, MAX_STR_LEN / 4)) { 2094 log_to_screen( _("User has chosen not to backup the PC"));2095 log_to_screen("User has chosen not to backup the PC"); 2095 2096 finish(1); 2096 2097 } … … 2098 2099 if ((bkpinfo->compression_level = 2099 2100 which_compression_level()) == -1) { 2100 log_to_screen( _("User has chosen not to backup the PC"));2101 log_to_screen("User has chosen not to backup the PC"); 2101 2102 finish(1); 2102 2103 } … … 2113 2114 2114 2115 sprintf(comment, 2115 _("How much data (in Megabytes) will each media store?"));2116 if (!popup_and_get_string( _("Size"), comment, sz_size, 5)) {2117 log_to_screen( _("User has chosen not to backup the PC"));2116 "How much data (in Megabytes) will each media store?"); 2117 if (!popup_and_get_string("Size", comment, sz_size, 5)) { 2118 log_to_screen("User has chosen not to backup the PC"); 2118 2119 finish(1); 2119 2120 } … … 2122 2123 } 2123 2124 if (bkpinfo->media_size[0] <= 0) { 2124 log_to_screen( _("User has chosen not to backup the PC"));2125 log_to_screen("User has chosen not to backup the PC"); 2125 2126 finish(1); 2126 2127 } … … 2129 2130 system("umount /tmp/isodir 2> /dev/null"); 2130 2131 if (!popup_and_get_string 2131 ( _("NFS share"), _("Which remote NFS share should I mount?"),2132 ("NFS share", "Which remote NFS share should I mount?", 2132 2133 bkpinfo->nfs_mount, MAX_STR_LEN)) { 2133 log_to_screen( _("User has chosen not to backup the PC"));2134 log_to_screen("User has chosen not to backup the PC"); 2134 2135 finish(1); 2135 2136 } … … 2148 2149 if (!is_this_device_mounted(bkpinfo->nfs_mount)) { 2149 2150 popup_and_OK 2150 ( _("Please mount that partition before you try to backup to or restore from it."));2151 ("Please mount that partition before you try to backup to or restore from it."); 2151 2152 finish(1); 2152 2153 } 2153 2154 strcpy(tmp, bkpinfo->nfs_remote_dir); 2154 2155 if (!popup_and_get_string 2155 ( _("Directory"), _("Which directory within that mountpoint?"), tmp,2156 ("Directory", "Which directory within that mountpoint?", tmp, 2156 2157 MAX_STR_LEN)) { 2157 log_to_screen( _("User has chosen not to backup the PC"));2158 log_to_screen("User has chosen not to backup the PC"); 2158 2159 finish(1); 2159 2160 } … … 2166 2167 strcpy(tmp, bkpinfo->nfs_remote_dir); 2167 2168 sprintf(prompt, 2168 _("Directory '%s' under mountpoint '%s' does not exist or is not writable. You can fix this or change the directory and retry or cancel the backup."),2169 "Directory '%s' under mountpoint '%s' does not exist or is not writable. You can fix this or change the directory and retry or cancel the backup.", 2169 2170 bkpinfo->nfs_remote_dir, bkpinfo->isodir); 2170 2171 if (!popup_and_get_string 2171 ( _("Directory"), prompt, tmp, MAX_STR_LEN)) {2172 log_to_screen( _("User has chosen not to backup the PC"));2172 ("Directory", prompt, tmp, MAX_STR_LEN)) { 2173 log_to_screen("User has chosen not to backup the PC"); 2173 2174 finish(1); 2174 2175 } … … 2180 2181 } 2181 2182 if (!popup_and_get_string 2182 ( _("Prefix."),2183 _("Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files"),2183 ("Prefix.", 2184 "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files", 2184 2185 bkpinfo->prefix, MAX_STR_LEN / 4)) { 2185 log_to_screen( _("User has chosen not to backup the PC"));2186 log_to_screen("User has chosen not to backup the PC"); 2186 2187 finish(1); 2187 2188 } … … 2199 2200 if (!bkpinfo->disaster_recovery) { 2200 2201 if (!popup_and_get_string 2201 ( _("Storage dir."),2202 _("Please enter the full path that contains your ISO images. Example: /mnt/raid0_0"),2202 ("Storage dir.", 2203 "Please enter the full path that contains your ISO images. Example: /mnt/raid0_0", 2203 2204 bkpinfo->isodir, MAX_STR_LEN / 4)) { 2204 log_to_screen( _("User has chosen not to backup the PC"));2205 log_to_screen("User has chosen not to backup the PC"); 2205 2206 finish(1); 2206 2207 } … … 2208 2209 if ((bkpinfo->compression_level = 2209 2210 which_compression_level()) == -1) { 2210 log_to_screen( _("User has chosen not to backup the PC"));2211 log_to_screen("User has chosen not to backup the PC"); 2211 2212 finish(1); 2212 2213 } 2213 2214 if (!popup_and_get_string 2214 ( _("ISO size."),2215 _("Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s or DVD's you plan to backup to."),2215 ("ISO size.", 2216 "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s or DVD's you plan to backup to.", 2216 2217 sz_size, 16)) { 2217 log_to_screen( _("User has chosen not to backup the PC"));2218 log_to_screen("User has chosen not to backup the PC"); 2218 2219 finish(1); 2219 2220 } … … 2222 2223 } 2223 2224 if (!popup_and_get_string 2224 ( _("Prefix."),2225 _("Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files"),2225 ("Prefix.", 2226 "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files", 2226 2227 bkpinfo->prefix, MAX_STR_LEN / 4)) { 2227 2228 log_to_screen("User has chosen not to backup the PC"); … … 2258 2259 #ifdef __FreeBSD__ 2259 2260 if (!popup_and_get_string 2260 ( _("Boot device"),2261 _("What is your boot device? (e.g. /dev/ad0)"),2261 ("Boot device", 2262 "What is your boot device? (e.g. /dev/ad0)", 2262 2263 bkpinfo->boot_device, MAX_STR_LEN / 4)) { 2263 log_to_screen( _("User has chosen not to backup the PC"));2264 log_to_screen("User has chosen not to backup the PC"); 2264 2265 finish(1); 2265 2266 } … … 2267 2268 #else 2268 2269 if (!popup_and_get_string 2269 ( _("Boot device"),2270 _("What is your boot device? (e.g. /dev/hda)"),2270 ("Boot device", 2271 "What is your boot device? (e.g. /dev/hda)", 2271 2272 bkpinfo->boot_device, MAX_STR_LEN / 4)) { 2272 log_to_screen( _("User has chosen not to backup the PC"));2273 log_to_screen("User has chosen not to backup the PC"); 2273 2274 finish(1); 2274 2275 } … … 2290 2291 if (i == 'U') { 2291 2292 if (ask_me_yes_or_no 2292 ( _("Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?")))2293 ("Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?")) 2293 2294 { 2294 2295 i = 'R'; // raw 2295 2296 } else { 2296 2297 log_to_screen 2297 ( _("I cannot find your boot loader. Please run mondoarchive with parameters."));2298 ("I cannot find your boot loader. Please run mondoarchive with parameters."); 2298 2299 finish(1); 2299 2300 } … … 2303 2304 strcpy(bkpinfo->include_paths, "/"); 2304 2305 if (!popup_and_get_string 2305 ( _("Backup paths"),2306 _("Please enter paths which you want me to backup. The default is '/' (i.e. everything)."),2306 ("Backup paths", 2307 "Please enter paths which you want me to backup. The default is '/' (i.e. everything).", 2307 2308 bkpinfo->include_paths, MAX_STR_LEN)) { 2308 log_to_screen( _("User has chosen not to backup the PC"));2309 log_to_screen("User has chosen not to backup the PC"); 2309 2310 finish(1); 2310 2311 } … … 2322 2323 if (strlen(tmp) > 2) { 2323 2324 if (!popup_and_get_string 2324 ( _("NTFS partitions"),2325 _("Please enter/confirm the NTFS partitions you wish to backup as well."),2325 ("NTFS partitions", 2326 "Please enter/confirm the NTFS partitions you wish to backup as well.", 2326 2327 tmp, MAX_STR_LEN / 4)) { 2327 log_to_screen( _("User has chosen not to backup the PC"));2328 log_to_screen("User has chosen not to backup the PC"); 2328 2329 finish(1); 2329 2330 } … … 2333 2334 2334 2335 if (!popup_and_get_string 2335 ( _("Exclude paths"),2336 _("Please enter paths which you do NOT want to backup. Separate them with spaces. NB: /tmp and /proc are always excluded. :-) Just hit 'Enter' if you want to do a full system backup."),2336 ("Exclude paths", 2337 "Please enter paths which you do NOT want to backup. Separate them with spaces. NB: /tmp and /proc are always excluded. :-) Just hit 'Enter' if you want to do a full system backup.", 2337 2338 bkpinfo->exclude_paths, MAX_STR_LEN)) { 2338 log_to_screen( _("User has chosen not to backup the PC"));2339 log_to_screen("User has chosen not to backup the PC"); 2339 2340 finish(1); 2340 2341 } … … 2343 2344 bkpinfo->verify_data = 2344 2345 ask_me_yes_or_no 2345 ( _("Will you want to verify your backups after Mondo has created them?"));2346 ("Will you want to verify your backups after Mondo has created them?"); 2346 2347 2347 2348 #ifndef __FreeBSD__ 2348 2349 if (!ask_me_yes_or_no 2349 ( _("Are you confident that your kernel is a sane, sensible, standard Linux kernel? Say 'no' if you are using a Gentoo <1.4 or Debian <3.0, please.")))2350 ("Are you confident that your kernel is a sane, sensible, standard Linux kernel? Say 'no' if you are using a Gentoo <1.4 or Debian <3.0, please.")) 2350 2351 #endif 2351 2352 { … … 2354 2355 2355 2356 if (!ask_me_yes_or_no 2356 ( _("Are you sure you want to proceed? Hit 'no' to abort."))) {2357 log_to_screen( _("User has chosen not to backup the PC"));2357 ("Are you sure you want to proceed? Hit 'no' to abort.")) { 2358 log_to_screen("User has chosen not to backup the PC"); 2358 2359 finish(1); 2359 2360 } -
branches/stable/mondo/mondo/common/libmondo-fifo.c
r501 r541 178 178 if (!res) { 179 179 bufsize++; 180 sprintf(tmp, _("Negotiated max buffer of %d MB "), bufsize);180 sprintf(tmp, "Negotiated max buffer of %d MB ", bufsize); 181 181 log_to_screen(tmp); 182 182 } else { … … 184 184 res = 0; 185 185 log_to_screen 186 ( _("Cannot negotiate a buffer of ANY size. Using dd instead."));186 ("Cannot negotiate a buffer of ANY size. Using dd instead."); 187 187 } 188 188 if (direction == 'r') { … … 220 220 if (run_program_and_log_output(command, 1)) { 221 221 fres = NULL; 222 log_to_screen( _("Failed to open tape streamer. Buffer error."));223 } else { 224 log_to_screen( _("Buffer successfully started."));222 log_to_screen("Failed to open tape streamer. Buffer error."); 223 } else { 224 log_to_screen("Buffer successfully started."); 225 225 } 226 226 -
branches/stable/mondo/mondo/common/libmondo-filelist.c
r538 r541 110 110 #include "my-stuff.h" 111 111 #include "mondostructures.h" 112 #include "lib-common-externs.h" 112 113 #include "libmondo-filelist.h" 113 114 #include "libmondo-string-EXT.h" 114 115 #include "libmondo-files-EXT.h" 115 116 #include "libmondo-fork-EXT.h" 116 #include " newt-specific-EXT.h"117 #include "libmondo-gui-EXT.h" 117 118 #include "libmondo-tools-EXT.h" 118 119 … … 202 203 malloc_string(cksumlist); 203 204 malloc_string(tmp); 204 mvaddstr_and_log_it(g_currentY, 0, _("Dividing filelist into sets"));205 206 log_to_screen( _("Dividing filelist into sets. Please wait."));205 mvaddstr_and_log_it(g_currentY, 0, "Dividing filelist into sets"); 206 207 log_to_screen("Dividing filelist into sets. Please wait."); 207 208 i = 0; 208 209 /* … … 502 503 if (depth == 0) { 503 504 open_evalcall_form("Freeing memory"); 504 log_to_screen( _("Freeing memory formerly occupied by filelist"));505 log_to_screen("Freeing memory formerly occupied by filelist"); 505 506 } 506 507 depth++; … … 940 941 /* add here */ 941 942 if (!(newnode = (struct s_node *) malloc(sizeof(struct s_node)))) { 942 log_to_screen( _("failed to malloc"));943 log_to_screen("failed to malloc"); 943 944 depth--; 944 945 return (1); … … 972 973 (node->down = 973 974 (struct s_node *) malloc(sizeof(struct s_node)))) { 974 log_to_screen( _("%s - failed to malloc"), string_to_add);975 log_to_screen("%s - failed to malloc", string_to_add); 975 976 return (1); 976 977 } … … 1025 1026 fatal_error("filelist does not exist -- cannot load it"); 1026 1027 } 1027 log_to_screen( _("Loading filelist"));1028 log_to_screen("Loading filelist"); 1028 1029 sprintf(command_to_open_fname, "gzip -dc %s", filelist_fname); 1029 1030 sprintf(tmp, "zcat %s | wc -l", filelist_fname); … … 1032 1033 atol(call_program_and_get_last_line_of_output(tmp)); 1033 1034 if (lines_in_filelist < 3) { 1034 log_to_screen( _("Warning - surprisingly short filelist."));1035 log_to_screen("Warning - surprisingly short filelist."); 1035 1036 } 1036 1037 g_original_noof_lines_in_filelist = lines_in_filelist; … … 1049 1050 return (NULL); 1050 1051 } 1051 open_evalcall_form( _("Loading filelist from disk"));1052 open_evalcall_form("Loading filelist from disk"); 1052 1053 for (fgets(fname, MAX_STR_LEN, pin); !feof(pin); 1053 1054 fgets(fname, MAX_STR_LEN, pin)) { … … 1166 1167 assert(outfname != NULL); // will be zerolength if save_filelist() is called by itself 1167 1168 if (depth == 0) { 1168 log_to_screen( _("Saving filelist"));1169 log_to_screen("Saving filelist"); 1169 1170 if (!(fout = fopen(outfname, "w"))) { 1170 1171 fatal_error("Cannot openout/save filelist"); 1171 1172 } 1172 1173 lines_in_filelist = g_original_noof_lines_in_filelist; /* set by load_filelist() */ 1173 open_evalcall_form( _("Saving selection to disk"));1174 open_evalcall_form("Saving selection to disk"); 1174 1175 } 1175 1176 for (node = filelist; node != NULL; node = node->right) { … … 1451 1452 if (bkpinfo->make_filelist) { 1452 1453 mvaddstr_and_log_it(g_currentY, 0, 1453 _("Making catalog of files to be backed up"));1454 "Making catalog of files to be backed up"); 1454 1455 } else { 1455 1456 mvaddstr_and_log_it(g_currentY, 0, 1456 _("Using supplied catalog of files to be backed up"));1457 "Using supplied catalog of files to be backed up"); 1457 1458 } 1458 1459 … … 1475 1476 log_OS_error("Call to mondo-makefilelist failed"); 1476 1477 *p_res++; 1477 mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));1478 mvaddstr_and_log_it(g_currentY++, 74, "Failed."); 1478 1479 } else { 1479 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));1480 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 1480 1481 } 1481 1482 return (res); … … 1571 1572 #ifndef _XWIN 1572 1573 if (!g_text_mode) { 1573 sprintf(tmp, _("Reading %-68s"), dir);1574 sprintf(tmp, "Reading %-68s", dir); 1574 1575 newtDrawRootText(0, g_noof_rows - 3, tmp); 1575 1576 } … … 1705 1706 char *userdef_filelist) 1706 1707 { 1707 char sz_datefile_wildcard[] = "/var/cache/mondo /difflevel.%d";1708 char sz_datefile_wildcard[] = "/var/cache/mondo-archive/difflevel.%d"; 1708 1709 char *p, *q; 1709 1710 char sz_datefile[80]; … … 1774 1775 sprintf(exclude_paths, " %s %s %s %s %s %s . .. \ 1775 1776 " MNT_CDROM " " MNT_FLOPPY " /media/cdrom /media/cdrecorder \ 1776 /proc /sys / tmp /var/cache/mondo /var/cache/mindi", excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir);1777 /proc /sys /root/images/mondo /root/images/mindi ", excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir); 1777 1778 1778 1779 log_msg(2, "Excluding paths = '%s'", exclude_paths); -
branches/stable/mondo/mondo/common/libmondo-files.c
r501 r541 88 88 #include "libmondo-files.h" 89 89 90 #include "lib-common-externs.h" 91 90 92 #include "libmondo-tools-EXT.h" 91 #include " newt-specific-EXT.h"93 #include "libmondo-gui-EXT.h" 92 94 #include "libmondo-devices-EXT.h" 93 95 #include "libmondo-fork-EXT.h" … … 360 362 while (!kernel[0]) { 361 363 if (!ask_me_yes_or_no 362 ( _("Kernel not found or invalid. Choose another?"))) {364 ("Kernel not found or invalid. Choose another?")) { 363 365 return (1); 364 366 } 365 367 if (!popup_and_get_string 366 ( _("Kernel path"),367 _("What is the full path and filename of your kernel, please?"),368 ("Kernel path", 369 "What is the full path and filename of your kernel, please?", 368 370 kernel, MAX_STR_LEN / 4)) { 369 371 fatal_error … … 573 575 574 576 if (!does_file_exist(filename)) { 575 sprintf(tmp, "Tr ying to get last line of nonexistent file (%s)",577 sprintf(tmp, "Tring to get last line of nonexistent file (%s)", 576 578 filename); 577 579 log_it(tmp); … … 662 664 log_OS_error("Unable to openout cksumlist"); 663 665 paranoid_fclose(fin); 664 log_to_screen( _("Can't open checksum list"));666 log_to_screen("Can't open checksum list"); 665 667 return (1); 666 668 } … … 687 689 time_taken * 100 / (long) (percentage) - time_taken; 688 690 sprintf(tmp, 689 _("%02d%% done %02d:%02d taken %02d:%02d remaining %-37s"),691 "%02d%% done %02d:%02d taken %02d:%02d remaining %-37s\r", 690 692 percentage, (int) (time_taken / 60), 691 693 (int) (time_taken % 60), … … 1027 1029 sprintf(command, "which %s > /dev/null 2> /dev/null", fname); 1028 1030 sprintf(errorstr, 1029 _("Please install '%s'. I cannot find it on your system."),1031 "Please install '%s'. I cannot find it on your system.", 1030 1032 fname); 1031 1033 if (system(command)) { 1032 1034 log_to_screen(errorstr); 1033 1035 log_to_screen 1034 ( _("There may be hyperlink at http://www.mondorescue.com which"));1035 log_to_screen( _("will take you to the relevant (missing) package."));1036 ("There may be hyperlink at http://www.mondorescue.com which"); 1037 log_to_screen("will take you to the relevant (missing) package."); 1036 1038 return (1); 1037 1039 } else { … … 1148 1150 fatal_error("Failed to copy Mondo's stuff to scratchdir"); 1149 1151 } 1150 1151 /* i18n */1152 sprintf(command, CP_BIN " --parents /usr/share/locale/*/LC_MESSAGES/mondo.mo %s",bkpinfo->scratchdir);1153 log_msg(4, "command = %s", command);1154 run_program_and_log_output(command, 1);1155 1152 1156 1153 sprintf(tmp, "%s/payload.tgz", g_mondo_home); … … 1387 1384 if (scratchLL <= 1) { 1388 1385 sprintf(tmp, 1389 _("Your backup will probably occupy a single %s. Maybe two."),1386 "Your backup will probably occupy a single %s. Maybe two.", 1390 1387 media_descriptor_string(bkpinfo->backup_media_type)); 1391 1388 } else if (scratchLL > 4) { 1392 1389 sprintf(tmp, 1393 _("Your backup will occupy one meeeeellion media! (maybe %s)"),1390 "Your backup will occupy one meeeeellion media! (maybe %s)", 1394 1391 number_to_text((int) (scratchLL + 1))); 1395 1392 } else { 1396 sprintf(tmp, _("Your backup will occupy approximately %s media."),1393 sprintf(tmp, "Your backup will occupy approximately %s media.", 1397 1394 number_to_text((int) (scratchLL + 1))); 1398 1395 } -
branches/stable/mondo/mondo/common/libmondo-fork.c
r501 r541 106 106 #include "libmondo-fork.h" 107 107 #include "libmondo-string-EXT.h" 108 #include " newt-specific-EXT.h"108 #include "libmondo-gui-EXT.h" 109 109 #include "libmondo-files-EXT.h" 110 110 #include "libmondo-tools-EXT.h" 111 #include "lib-common-externs.h" 111 112 112 113 /*@unused@*/ … … 162 163 163 164 164 #define MONDO_POPMSG _("Your PC will not retract the CD tray automatically. Please call mondoarchive with the -m (manual CD tray) flag.")165 #define MONDO_POPMSG "Your PC will not retract the CD tray automatically. Please call mondoarchive with the -m (manual CD tray) flag." 165 166 166 167 /** … … 233 234 234 235 log_to_screen 235 ( _("Please be patient. Do not be alarmed by on-screen inactivity."));236 ("Please be patient. Do not be alarmed by on-screen inactivity."); 236 237 log_msg(4, "Calling open_evalcall_form() with what_i_am_doing='%s'", 237 238 what_i_am_doing); … … 261 262 if (retval) { 262 263 log_msg(2, "Basic call '%s' returned an error.", basic_call); 263 popup_and_OK( _("Press ENTER to continue."));264 popup_and_OK("Press ENTER to continue."); 264 265 popup_and_OK 265 ( _("mkisofs and/or cdrecord returned an error. CD was not created"));266 ("mkisofs and/or cdrecord returned an error. CD was not created"); 266 267 } 267 268 } … … 447 448 if (!(fin = popen(command, "r"))) { 448 449 log_OS_error("Unable to popen-in command"); 449 sprintf(tmp, _("Failed utterly to call '%s'"), command);450 sprintf(tmp, "Failed utterly to call '%s'", command); 450 451 log_to_screen(tmp); 451 452 return (1); 452 453 } 453 454 if (!does_file_exist(lockfile)) { 454 log_to_screen( _("Waiting for external binary to start"));455 log_to_screen("Waiting for external binary to start"); 455 456 for (i = 0; i < 60 && !does_file_exist(lockfile); sleep(1), i++) { 456 457 log_msg(3, "Waiting for lockfile %s to exist", lockfile); … … 711 712 if (pcno <= 5 && last_pcno > 40) { 712 713 close_evalcall_form(); 713 strcpy(title, _("Verifying..."));714 strcpy(title, "Verifying..."); 714 715 open_evalcall_form(title); 715 716 } … … 799 800 if (pcno <= 5 && last_pcno >= 40) { 800 801 close_evalcall_form(); 801 strcpy(title, _("Verifying..."));802 strcpy(title, "Verifying..."); 802 803 open_evalcall_form(title); 803 804 } -
branches/stable/mondo/mondo/common/libmondo-mountlist.c
r501 r541 53 53 #include "mondostructures.h" 54 54 #include "libmondo-mountlist.h" 55 #include "lib-common-externs.h" 55 56 #include "libmondo-raid-EXT.h" 56 57 #include "libmondo-devices-EXT.h" 57 58 #include "libmondo-tools-EXT.h" 58 59 #include "libmondo-string-EXT.h" 59 #include " newt-specific-EXT.h"60 #include "libmondo-gui-EXT.h" 60 61 61 62 /*@unused@*/ … … 950 951 if (!(fin = fopen(fname, "r"))) { 951 952 log_it("Unable to open mountlist - '%s'", fname); 952 log_to_screen( _("Cannot open mountlist"));953 log_to_screen("Cannot open mountlist"); 953 954 paranoid_free(incoming); 954 955 paranoid_free(siz); … … 993 994 && mountlist->el[items].device[0] != '#') { 994 995 if (items >= ARBITRARY_MAXIMUM) { 995 log_to_screen( _("Too many lines in mountlist.. ABORTING"));996 log_to_screen("Too many lines in mountlist.. ABORTING"); 996 997 finish(1); 997 998 } -
branches/stable/mondo/mondo/common/libmondo-raid.c
r501 r541 42 42 #include "my-stuff.h" 43 43 #include "mondostructures.h" 44 #include " newt-specific-EXT.h"44 #include "libmondo-gui-EXT.h" 45 45 #include "libmondo-files-EXT.h" 46 46 #include "libmondo-tools-EXT.h" 47 47 #include "libmondo-string-EXT.h" 48 #include "lib-common-externs.h" 48 49 #include "libmondo-raid.h" 49 50 … … 957 958 ("Oh my gosh. You actually think a YOTTABYTE will get you anywhere? What're you going to do with 1,208,925,819,614,629,174,706,176 bytes?!?!"); 958 959 popup_and_OK 959 ( _("That sizespec is more than 1,208,925,819,614,629,174,706,176 bytes. You have a shocking amount of data. Please send a screenshot to the list :-)"));960 ("That sizespec is more than 1,208,925,819,614,629,174,706,176 bytes. You have a shocking amount of data. Please send a screenshot to the list :-)"); 960 961 return size * sign * 1024 * 1024 * 1024 * 1024 * 1024 * 961 962 1024 * 1024 * 1024; … … 1112 1113 // FIXME --- the above line does not allow for spare disks 1113 1114 log_to_screen 1114 ( _("FIXME - create_raidtab_from_mdstat does not allow for spare disks"));1115 ("FIXME - create_raidtab_from_mdstat does not allow for spare disks"); 1115 1116 } 1116 1117 raidlist->entries = i; -
branches/stable/mondo/mondo/common/libmondo-stream.c
r501 r541 100 100 #include "mondostructures.h" 101 101 #include "libmondo-devices.h" 102 #include "lib-common-externs.h" 102 103 #include "libmondo-stream.h" 103 104 #include "libmondo-string-EXT.h" 104 105 #include "libmondo-files-EXT.h" 105 #include " newt-specific-EXT.h"106 #include "libmondo-gui-EXT.h" 106 107 #include "libmondo-fork-EXT.h" 107 108 #include "libmondo-tools-EXT.h" … … 518 519 // log_it("g_current_media_number = %d", g_current_media_number); 519 520 sprintf(tmp, 520 _("When the tape drive goes quiet, please insert volume %d in this series."),521 "When the tape drive goes quiet, please insert volume %d in this series.", 521 522 tapeno); 522 523 popup_and_OK(tmp); 523 open_evalcall_form( _("Waiting while the tape drive settles"));524 } else { 525 open_evalcall_form( _("Waiting while the tape drive rewinds"));524 open_evalcall_form("Waiting while the tape drive settles"); 525 } else { 526 open_evalcall_form("Waiting while the tape drive rewinds"); 526 527 } 527 528 … … 730 731 bkpinfo->internal_tape_block_size))) { 731 732 log_OS_error(g_tape_fifo); 732 log_to_screen( _("Cannot openin stream device"));733 log_to_screen("Cannot openin stream device"); 733 734 return (1); 734 735 } 735 log_to_screen( _("Reading stream"));736 log_to_screen("Reading stream"); 736 737 log_it("stream device = '%s'", bkpinfo->media_device); 737 738 /* skip data disks */ 738 739 open_evalcall_form("Skipping data disks on stream"); 739 log_to_screen( _("Skipping data disks on stream"));740 log_to_screen("Skipping data disks on stream"); 740 741 if (!(fout = fopen(outfname, "w"))) { 741 742 log_OS_error(outfname); 742 log_to_screen( _("Cannot openout datadisk all.tar.gz file"));743 log_to_screen("Cannot openout datadisk all.tar.gz file"); 743 744 return (-1); 744 745 } 745 746 if (!(datablock = (char *) malloc(256 * 1024))) { 746 log_to_screen( _("Unable to malloc 256*1024"));747 log_to_screen("Unable to malloc 256*1024"); 747 748 exit(1); 748 749 } … … 821 822 return (0); 822 823 } else { 823 log_to_screen( _("Failed to openout to cdstream (fifo)"));824 log_to_screen("Failed to openout to cdstream (fifo)"); 824 825 return (1); 825 826 } … … 854 855 open_device_via_buffer(tapedev, 'w', internal_tape_block_size))) { 855 856 log_OS_error(g_tape_fifo); 856 log_to_screen( _("Cannot openin stream device"));857 log_to_screen("Cannot openin stream device"); 857 858 return (1); 858 859 } … … 997 998 if (!fout) { 998 999 log_OS_error(outfname); 999 log_to_screen( _("Cannot openout file"));1000 log_to_screen("Cannot openout file"); 1000 1001 return (1); 1001 1002 } … … 1055 1056 } 1056 1057 if (strcmp(temp_cksum, actual_cksum)) { 1057 sprintf(tmp, _("actual cksum=%s; recorded cksum=%s"), actual_cksum,1058 sprintf(tmp, "actual cksum=%s; recorded cksum=%s", actual_cksum, 1058 1059 temp_cksum); 1059 1060 log_to_screen(tmp); 1060 sprintf(tmp, _("%s (%ld K) is corrupt on tape"), temp_fname,1061 sprintf(tmp, "%s (%ld K) is corrupt on tape", temp_fname, 1061 1062 (long) orig_size >> 10); 1062 1063 log_to_screen(tmp); … … 1210 1211 log_it("mediasize = %ld", mediasize); 1211 1212 we_need_a_new_tape = TRUE; 1212 log_to_screen( _("Should have started a new tape/CD already"));1213 log_to_screen("Should have started a new tape/CD already"); 1213 1214 } 1214 1215 if ((g_tape_posK + length_of_incoming_file / 1024) >> 10 >= … … 1367 1368 bkpinfo->internal_tape_block_size))) { 1368 1369 log_OS_error(g_tape_fifo); 1369 log_to_screen( _("Cannot openin stream device"));1370 log_to_screen("Cannot openin stream device"); 1370 1371 return (1); 1371 1372 } … … 1405 1406 if (g_current_media_number > MAX_NOOF_MEDIA) { 1406 1407 res++; 1407 log_to_screen( _("Too many tapes. Man, you need to use nfs!"));1408 log_to_screen("Too many tapes. Man, you need to use nfs!"); 1408 1409 } 1409 1410 if (bkpinfo->backup_media_type == cdstream) { … … 1417 1418 g_tape_stream = popen(command, "w"); 1418 1419 if (!g_tape_stream) { 1419 log_to_screen( _("Failed to openout to cdstream (fifo)"));1420 log_to_screen("Failed to openout to cdstream (fifo)"); 1420 1421 return (1); 1421 1422 } … … 1427 1428 bkpinfo->internal_tape_block_size))) { 1428 1429 log_OS_error(g_tape_fifo); 1429 log_to_screen( _("Cannot openin stream device"));1430 log_to_screen("Cannot openin stream device"); 1430 1431 return (1); 1431 1432 } … … 1512 1513 /*@ end vars *************************************************** */ 1513 1514 1514 open_evalcall_form( _("Writing data disks to tape"));1515 log_to_screen( _("Writing data disks to tape"));1515 open_evalcall_form("Writing data disks to tape"); 1516 log_to_screen("Writing data disks to tape"); 1516 1517 log_it("Data disks = %s", fname); 1517 1518 if (!does_file_exist(fname)) { 1518 sprintf(tmp, _("Cannot find %s"), fname);1519 sprintf(tmp, "Cannot find %s", fname); 1519 1520 log_to_screen(tmp); 1520 1521 return (1); … … 1705 1706 if (!g_tape_stream) { 1706 1707 log_to_screen 1707 ( _("You're not backing up to tape. Why write a tape header?"));1708 ("You're not backing up to tape. Why write a tape header?"); 1708 1709 return (1); 1709 1710 } … … 1750 1751 1751 1752 /*@ end vars *************************************************** */ 1752 sprintf(tmp, _("Wrong marker! (Should be %s, "),1753 sprintf(tmp, "Wrong marker! (Should be %s, ", 1753 1754 marker_to_string(should_be)); 1754 sprintf(tmp + strlen(tmp), _("is actually %s)"), marker_to_string(it_is));1755 sprintf(tmp + strlen(tmp), "is actually %s)", marker_to_string(it_is)); 1755 1756 log_to_screen(tmp); 1756 1757 } -
branches/stable/mondo/mondo/common/libmondo-string.c
r501 r541 65 65 #include "mondostructures.h" 66 66 #include "libmondo-string.h" 67 #include "lib-common-externs.h" 67 68 #include "libmondo-files-EXT.h" 68 #include " newt-specific-EXT.h"69 #include "libmondo-gui-EXT.h" 69 70 #include "libmondo-tools-EXT.h" 70 71 … … 296 297 ("Oh my gosh. You actually think a YOTTABYTE will get you anywhere? What're you going to do with 1,208,925,819,614,629,174,706,176 bytes of data?!?!"); 297 298 popup_and_OK 298 ( _("That sizespec is more than 1,208,925,819,614,629,174,706,176 bytes. You have a shocking amount of data. Please send a screenshot to the list :-)"));299 ("That sizespec is more than 1,208,925,819,614,629,174,706,176 bytes. You have a shocking amount of data. Please send a screenshot to the list :-)"); 299 300 fatal_error("Integer overflow."); 300 301 } else if (ch != 'm' && ch != 'M') { … … 983 984 sev = 3; 984 985 sprintf(reason, 985 _("Changed since backup. Consider running a differential backup in a day or two."));986 "Changed since backup. Consider running a differential backup in a day or two."); 986 987 if (!strncmp(filename, "/var/", 5)) { 987 988 sev = 2; 988 989 sprintf(reason, 989 _("/var's contents will change regularly, inevitably."));990 "/var's contents will change regularly, inevitably."); 990 991 } 991 992 if (!strncmp(filename, "/home", 5)) { 992 993 sev = 2; 993 994 sprintf(reason, 994 _("It's in your /home partiton. Therefore, it is important."));995 "It's in your /home partiton. Therefore, it is important."); 995 996 } 996 997 if (!strncmp(filename, "/usr/", 5)) { 997 998 sev = 3; 998 999 sprintf(reason, 999 _("You may have installed/removed software during the backup."));1000 "You may have installed/removed software during the backup."); 1000 1001 } 1001 1002 if (!strncmp(filename, "/etc/", 5)) { 1002 1003 sev = 3; 1003 1004 sprintf(reason, 1004 _("Do not edit config files while backing up your PC."));1005 "Do not edit config files while backing up your PC."); 1005 1006 } 1006 1007 if (!strcmp(filename, "/etc/adjtime") 1007 1008 || !strcmp(filename, "/etc/mtab")) { 1008 1009 sev = 1; 1009 sprintf(reason, _("This file changes all the time. It's OK."));1010 sprintf(reason, "This file changes all the time. It's OK."); 1010 1011 } 1011 1012 if (!strncmp(filename, "/root/", 6)) { 1012 1013 sev = 3; 1013 sprintf(reason, _("Were you compiling/editing something in /root?"));1014 sprintf(reason, "Were you compiling/editing something in /root?"); 1014 1015 } 1015 1016 if (!strncmp(filename, "/root/.", 7)) { 1016 1017 sev = 2; 1017 sprintf(reason, _("Temp or 'dot' files changed in /root."));1018 sprintf(reason, "Temp or 'dot' files changed in /root."); 1018 1019 } 1019 1020 if (!strncmp(filename, "/var/lib/", 9)) { 1020 1021 sev = 2; 1021 sprintf(reason, _("Did you add/remove software during backing?"));1022 sprintf(reason, "Did you add/remove software during backing?"); 1022 1023 } 1023 1024 if (!strncmp(filename, "/var/lib/rpm", 12)) { 1024 1025 sev = 3; 1025 sprintf(reason, _("Did you add/remove software during backing?"));1026 sprintf(reason, "Did you add/remove software during backing?"); 1026 1027 } 1027 1028 if (!strncmp(filename, "/var/lib/slocate", 16)) { 1028 1029 sev = 1; 1029 1030 sprintf(reason, 1030 _("The 'update' daemon ran during backup. This does not affect the integrity of your backup."));1031 "The 'update' daemon ran during backup. This does not affect the integrity of your backup."); 1031 1032 } 1032 1033 if (!strncmp(filename, "/var/log/", 9) … … 1035 1036 sev = 1; 1036 1037 sprintf(reason, 1037 _("Log files change frequently as the computer runs. Fret not."));1038 "Log files change frequently as the computer runs. Fret not."); 1038 1039 } 1039 1040 if (!strncmp(filename, "/var/spool", 10)) { 1040 1041 sev = 1; 1041 1042 sprintf(reason, 1042 _("Background processes or printers were active. This does not affect the integrity of your backup."));1043 "Background processes or printers were active. This does not affect the integrity of your backup."); 1043 1044 } 1044 1045 if (!strncmp(filename, "/var/spool/mail", 10)) { 1045 1046 sev = 2; 1046 sprintf(reason, _("Mail was sent/received during backup."));1047 sprintf(reason, "Mail was sent/received during backup."); 1047 1048 } 1048 1049 if (filename[strlen(filename) - 1] == '~') { 1049 1050 sev = 1; 1050 1051 sprintf(reason, 1051 _("Backup copy of another file which was modified recently."));1052 "Backup copy of another file which was modified recently."); 1052 1053 } 1053 1054 if (strstr(filename, "cache")) { 1054 1055 sev = 1; 1055 1056 sprintf(reason, 1056 _("Part of a cache of data. Caches change from time to time. Don't worry."));1057 "Part of a cache of data. Caches change from time to time. Don't worry."); 1057 1058 } 1058 1059 if (!strncmp(filename, "/var/run/", 9) … … 1131 1132 // { fatal_error( "percentage_media_full_comment() - unknown media size"); } 1132 1133 { 1133 sprintf(outstr, _("Volume %d: %s kilobytes archived so far"),1134 sprintf(outstr, "Volume %d: %s kilobytes archived so far", 1134 1135 g_current_media_number, pos_w_commas); 1135 1136 return (outstr); … … 1144 1145 percentage = 100; 1145 1146 } 1146 sprintf(outstr, _("Volume %d: ["), g_current_media_number);1147 sprintf(outstr, "Volume %d: [", g_current_media_number); 1147 1148 } else { 1148 1149 percentage = … … 1160 1161 } 1161 1162 j = (int) strlen(outstr); 1162 sprintf(outstr + j, _("] %d%% used"), percentage);1163 sprintf(outstr + j, "] %d%% used", percentage); 1163 1164 paranoid_free(pos_w_commas); 1164 1165 paranoid_free(tmp); -
branches/stable/mondo/mondo/common/libmondo-tools.c
r538 r541 174 174 #include "my-stuff.h" 175 175 #include "mondostructures.h" 176 #include "lib-common-externs.h" 176 177 #include "libmondo-tools.h" 177 #include " newt-specific-EXT.h"178 #include "libmondo-gui-EXT.h" 178 179 #include "libmondo-files-EXT.h" 179 180 #include "libmondo-fork-EXT.h" … … 270 271 newtSuspend(); 271 272 #endif 272 printf( _("ASSERTION FAILED: `%s'\n"), exp);273 printf( _("\tat %s:%d in %s\n\n"), file, line, function);274 printf( _("(I)gnore, ignore (A)ll, (D)ebug, a(B)ort, or (E)xit? "));273 printf("ASSERTION FAILED: `%s'\n", exp); 274 printf("\tat %s:%d in %s\n\n", file, line, function); 275 printf("(I)gnore, ignore (A)ll, (D)ebug, a(B)ort, or (E)xit? "); 275 276 do { 276 277 is_valid = TRUE; … … 299 300 case '\n': 300 301 printf 301 ( _("(I)gnore, ignore (A)ll, (D)ebug, a(B)ort, or (E)xit? "));302 ("(I)gnore, ignore (A)ll, (D)ebug, a(B)ort, or (E)xit? "); 302 303 break; 303 304 default: 304 305 is_valid = FALSE; 305 printf( _("Invalid choice.\n"));306 printf("Invalid choice.\n"); 306 307 break; 307 308 } … … 472 473 #endif 473 474 } 475 476 477 /** 478 * Log a trace message to the trace file. 479 * @bug This function seems orphaned. Please remove. 480 */ 481 void log_trace(char *o) 482 { 483 /*@ pointers **************************************************** */ 484 FILE *fout; 485 486 /*@ buffers ***************************************************** */ 487 char output[MAX_STR_LEN]; 488 489 /*@ int ****************************************************** */ 490 int i; 491 492 /*@ end vars *************************************************** */ 493 494 if (o[0] == '\0') { 495 return; 496 } 497 strcpy(output, o); 498 i = (int) strlen(output); 499 if (i <= 0) { 500 return; 501 } 502 if (output[i - 1] < 32) { 503 output[i - 1] = '\0'; 504 } 505 if (g_text_mode 506 /* && !strstr(last_line_of_file(MONDO_LOGFILE),output) */ ) { 507 printf("%s\n", output); 508 } 509 510 fout = fopen(MONDO_TRACEFILE, "a"); 511 if (fout) { 512 fprintf(fout, "%s\n", output); 513 paranoid_fclose(fout); 514 } else { 515 log_OS_error("Cannot write to tracefile"); 516 } 517 } 518 519 520 474 521 475 522 … … 923 970 strcpy(bkpinfo->isodir, "/"); 924 971 } else { 925 strcpy(bkpinfo->isodir, "/ var/cache/mondo/iso");972 strcpy(bkpinfo->isodir, "/root/images/mondo"); 926 973 } 927 974 strcpy(bkpinfo->prefix, STD_PREFIX); … … 1022 1069 if (atol(tmp) < 35000) { 1023 1070 retval++; 1024 log_to_screen( _("You must have at least 32MB of RAM to use Mondo."));1071 log_to_screen("You must have at least 32MB of RAM to use Mondo."); 1025 1072 } 1026 1073 if (atol(tmp) < 66000) { 1027 1074 log_to_screen 1028 ( _("WARNING! You have very little RAM. Please upgrade to 64MB or more."));1029 } 1030 #endif 1031 1032 if ((Lres = free_space_on_given_partition("/ var/cache/mondo")) == -1) /*{1075 ("WARNING! You have very little RAM. Please upgrade to 64MB or more."); 1076 } 1077 #endif 1078 1079 if ((Lres = free_space_on_given_partition("/root")) == -1) { 1033 1080 Lres = free_space_on_given_partition("/"); 1034 1081 } 1035 */1036 1082 log_it("Free space on given partition = %ld MB", Lres); 1037 1083 1038 1084 if (Lres < 50) { 1039 fatal_error("Your /var/cache/mondo partition has <50MB free. Please adjust your partition table to something saner."); 1085 run_program_and_log_output 1086 ("rm -Rf /root/images/mindi; mkdir -p /home/root/images/mindi; mkdir -p /root/images; ln -sf /home/root/images/mindi /root/images/mindi", 1087 3); 1088 // fatal_error("Your / (or /root) partition has <50MB free. Please adjust your partition table to something saner."); 1040 1089 } 1041 1090 … … 1051 1100 ("grep ramdisk /proc/devices", FALSE)) { 1052 1101 if (!ask_me_yes_or_no 1053 ( _("Your kernel has no ramdisk support. That's mind-numbingly stupid but I'll allow it if you're planning to use a failsafe kernel. Are you?")))1102 ("Your kernel has no ramdisk support. That's mind-numbingly stupid but I'll allow it if you're planning to use a failsafe kernel. Are you?")) 1054 1103 { 1055 1104 // retval++; 1056 1105 log_to_screen 1057 ( _("It looks as if your kernel lacks ramdisk and initrd support."));1106 ("It looks as if your kernel lacks ramdisk and initrd support."); 1058 1107 log_to_screen 1059 ( _("I'll allow you to proceed but FYI, if I'm right, your kernel is broken."));1108 ("I'll allow you to proceed but FYI, if I'm right, your kernel is broken."); 1060 1109 } 1061 1110 } … … 1079 1128 !run_program_and_log_output 1080 1129 ("mount | grep -w dos | grep -v /dev/fd | grep -v nexdisk", 0)) { 1081 log_to_screen( _("I think you have a Windows 9x partition."));1130 log_to_screen("I think you have a Windows 9x partition."); 1082 1131 retval += whine_if_not_found("parted"); 1083 1132 #ifndef __IA64__ … … 1085 1134 // retval += 1086 1135 if (!find_home_of_exe("ms-sys")) { 1087 log_to_screen( _("Please install ms-sys just in case."));1136 log_to_screen("Please install ms-sys just in case."); 1088 1137 } 1089 1138 #endif … … 1095 1144 } else { 1096 1145 log_to_screen 1097 ( _("Your system lacks the 'cmp' binary. I'll create a dummy cmp for you."));1146 ("Your system lacks the 'cmp' binary. I'll create a dummy cmp for you."); 1098 1147 if (run_program_and_log_output 1099 1148 ("cp -f `which true` /usr/bin/cmp", 0)) { … … 1110 1159 if (strstr(tmp, "autofs")) { 1111 1160 log_to_screen 1112 ( _("Your CD-ROM is mounted via autofs. I therefore cannot tell"));1161 ("Your CD-ROM is mounted via autofs. I therefore cannot tell"); 1113 1162 log_to_screen 1114 ( _("if a CD actually is inserted. If a CD is inserted, please"));1115 log_to_screen( _("eject it. Thank you."));1163 ("if a CD actually is inserted. If a CD is inserted, please"); 1164 log_to_screen("eject it. Thank you."); 1116 1165 log_it 1117 1166 ("Ignoring autofs CD-ROM 'mount' since we hope nothing's in it."); … … 1139 1188 retval++; 1140 1189 log_to_screen 1141 ( _("Please find out what happened to /etc/modules.conf"));1190 ("Please find out what happened to /etc/modules.conf"); 1142 1191 } 1143 1192 } … … 1152 1201 1153 1202 if (run_program_and_log_output("mindi -V", 1)) { 1154 log_to_screen( _("Could not ascertain mindi's version number."));1203 log_to_screen("Could not ascertain mindi's version number."); 1155 1204 log_to_screen 1156 ( _("You have not installed Mondo and/or Mindi properly."));1157 log_to_screen( _("Please uninstall and reinstall them both."));1205 ("You have not installed Mondo and/or Mindi properly."); 1206 log_to_screen("Please uninstall and reinstall them both."); 1158 1207 fatal_error("Please reinstall Mondo and Mindi."); 1159 1208 } … … 1161 1210 ("mindi --makemountlist /tmp/mountlist.txt.test", 5)) { 1162 1211 log_to_screen 1163 ( _("Mindi --makemountlist /tmp/mountlist.txt.test failed for some reason."));1212 ("Mindi --makemountlist /tmp/mountlist.txt.test failed for some reason."); 1164 1213 log_to_screen 1165 ( _("Please run that command by hand and examine /var/log/mindi.log"));1214 ("Please run that command by hand and examine /var/log/mindi.log"); 1166 1215 log_to_screen 1167 ( _("for more information. Perhaps your /etc/fstab file is insane."));1216 ("for more information. Perhaps your /etc/fstab file is insane."); 1168 1217 log_to_screen 1169 ( _("Perhaps Mindi's MakeMountlist() subroutine has a bug. We'll see."));1218 ("Perhaps Mindi's MakeMountlist() subroutine has a bug. We'll see."); 1170 1219 retval++; 1171 1220 } … … 1174 1223 && !does_file_exist("/etc/raidtab")) { 1175 1224 log_to_screen 1176 ( _("You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat"));1225 ("You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat"); 1177 1226 create_raidtab_from_mdstat("/etc/raidtab", "/proc/mdstat"); 1178 1227 } 1179 1228 1180 1229 if (retval) { 1181 mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));1230 mvaddstr_and_log_it(g_currentY++, 74, "Failed."); 1182 1231 } else { 1183 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));1232 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 1184 1233 } 1185 1234 return (retval); … … 1443 1492 } 1444 1493 1494 1495 /** 1496 * The standard log_debug_msg() (log_msg() also due to a macro). Writes some describing 1497 * information to the logfile. 1498 */ 1499 void standard_log_debug_msg(int debug_level, const char *szFile, 1500 const char *szFunction, int nLine, 1501 const char *fmt, ...) 1502 { 1503 va_list args; 1504 int i; 1505 static int depth = 0; 1506 char *tmp; 1507 FILE *fout; 1508 1509 if (depth > 5) { 1510 depth--; 1511 return; 1512 } 1513 depth++; 1514 1515 malloc_string(tmp); 1516 1517 if (debug_level <= g_loglevel) { 1518 va_start(args, fmt); 1519 if (!(fout = fopen(MONDO_LOGFILE, "a"))) { 1520 return; 1521 } // fatal_error("Failed to openout to logfile - sheesh..."); } 1522 1523 // add tabs to distinguish log levels 1524 if (debug_level > 0) { 1525 for (i = 1; i < debug_level; i++) 1526 fprintf(fout, "\t"); 1527 if (getpid() == g_main_pid) 1528 fprintf(fout, "[Main] %s->%s#%d: ", szFile, szFunction, 1529 nLine); 1530 else if (getpid() == g_buffer_pid && g_buffer_pid > 0) 1531 fprintf(fout, "[Buff] %s->%s#%d: ", szFile, szFunction, 1532 nLine); 1533 else 1534 fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile, 1535 szFunction, nLine); 1536 } 1537 vfprintf(fout, fmt, args); 1538 1539 // do not slow down the progran if standard debug level 1540 // must be enabled: if no flush, the log won't be up-to-date if there 1541 // is a segfault 1542 //if (g_dwDebugLevel != 1) 1543 1544 va_end(args); 1545 fprintf(fout, "\n"); 1546 paranoid_fclose(fout); 1547 } 1548 depth--; 1549 paranoid_free(tmp); 1550 } 1551 1552 /** 1553 * Function pointer to the @c log_debug_msg function to use. Points to standard_log_debug_msg() by default. 1554 */ 1555 void (*log_debug_msg) (int, const char *, const char *, int, const char *, 1556 ...) = standard_log_debug_msg; 1557 1558 1445 1559 /** 1446 1560 * If @p y, malloc @p x, else free @p x. … … 1472 1586 paranoid_free(g_magicdev_command); 1473 1587 } 1588 1589 /* 1590 char**list_of_arrays[] = { 1591 &g_boot_mountpt, 1592 &g_mondo_home, 1593 &g_tmpfs_mountpt, 1594 &g_erase_tmpdir_and_scratchdir, 1595 &g_serial_string, 1596 &g_magicdev_command, 1597 NULL}; 1598 1599 char**ppcurr; 1600 int i; 1601 1602 for(i=0;list_of_arrays[i];i++) 1603 { 1604 log_msg(5, "Allocating %d", i); 1605 ppcurr = list_of_arrays[i]; 1606 if (mal) 1607 { *ppcurr = malloc(MAX_STR_LEN); } 1608 else 1609 { 1610 if (*ppcurr) 1611 { 1612 free(*ppcurr); 1613 } 1614 } 1615 } 1616 log_msg(5, "Returning"); 1617 */ 1474 1618 } 1475 1619 -
branches/stable/mondo/mondo/common/libmondo-verify.c
r501 r541 103 103 #include "mondostructures.h" 104 104 #include "libmondo-verify.h" 105 #include " newt-specific-EXT.h"105 #include "libmondo-gui-EXT.h" 106 106 #include "libmondo-files-EXT.h" 107 107 #include "libmondo-fork-EXT.h" … … 110 110 #include "libmondo-devices-EXT.h" 111 111 #include "libmondo-tools-EXT.h" 112 #include "lib-common-externs.h" 112 113 113 114 /*@unused@*/ … … 757 758 orig_cksum); 758 759 log_msg(2, tmp); 759 sprintf(tmp, _("%s has changed on live filesystem"),760 sprintf(tmp, "%s has changed on live filesystem", 760 761 biggie_fname); 761 762 log_to_screen(tmp); … … 810 811 sprintf(curr_acl_list_fname, ACL_BIGGLST_FNAME_RAW_SZ, 811 812 bkpinfo->tmpdir); 812 log_to_screen( _("Verifying regular archives on tape"));813 log_to_screen("Verifying regular archives on tape"); 813 814 total_afioballs = get_last_filelist_number(bkpinfo) + 1; 814 open_progress_form( _("Verifying filesystem"),815 _("I am verifying archives against your live filesystem now."),816 _("Please wait. This may take a couple of hours."), "",815 open_progress_form("Verifying filesystem", 816 "I am verifying archives against your live filesystem now.", 817 "Please wait. This may take a couple of hours.", "", 817 818 total_afioballs); 818 819 res = read_header_block_from_stream(&size, fname, &ctrl_chr); … … 853 854 res = verify_an_afioball_from_stream(bkpinfo, fname, size); 854 855 if (res) { 855 sprintf(tmp, _("Afioball %ld differs from live filesystem"),856 sprintf(tmp, "Afioball %ld differs from live filesystem", 856 857 current_afioball_number); 857 858 log_to_screen(tmp); … … 937 938 noof_biggiefiles = (long) size; 938 939 log_msg(1, "noof_biggiefiles = %ld", noof_biggiefiles); 939 open_progress_form( _("Verifying big files"), comment,940 _("Please wait. This may take some time."), "",940 open_progress_form("Verifying big files", comment, 941 "Please wait. This may take some time.", "", 941 942 noof_biggiefiles); 942 943 for (res = read_header_block_from_stream(&size, orig_fname, &ctrl_chr); … … 954 955 p++; 955 956 } 956 sprintf(comment, _("Verifying bigfile #%ld (%ld K)"),957 sprintf(comment, "Verifying bigfile #%ld (%ld K)", 957 958 current_biggiefile_number, (long) size >> 10); 958 959 update_progress_form(comment); … … 1019 1020 1020 1021 sprintf(mountpoint, "%s/cdrom", bkpinfo->tmpdir); 1021 sprintf(fname, "%s/%s/%s-%d.iso", bkpinfo-> isodir, bkpinfo->nfs_remote_dir,1022 bkpinfo-> prefix, g_current_media_number);1022 sprintf(fname, "%s/%s/%s-%d.iso", bkpinfo->nfs_remote_dir, 1023 bkpinfo->isodir, bkpinfo->prefix, g_current_media_number); 1023 1024 1024 1025 mkdir(mountpoint, 1777); … … 1030 1031 log_msg(2, tmp); 1031 1032 if (bkpinfo->manual_cd_tray) { 1032 popup_and_OK( _("Please push CD tray closed."));1033 popup_and_OK("Please push CD tray closed."); 1033 1034 } 1034 1035 if (find_and_mount_actual_cd(bkpinfo, mountpoint)) { 1035 log_to_screen( _("failed to mount actual CD"));1036 log_to_screen("failed to mount actual CD"); 1036 1037 return (1); 1037 1038 } … … 1043 1044 mddevice = make_vn(fname); 1044 1045 if (ret) { 1045 sprintf(tmp, _("make_vn of %s failed; unable to verify ISO\n"),1046 sprintf(tmp, "make_vn of %s failed; unable to verify ISO\n", 1046 1047 fname); 1047 1048 log_to_screen(tmp); … … 1054 1055 #endif 1055 1056 if (run_program_and_log_output(command, FALSE)) { 1056 sprintf(tmp, _("%s failed; unable to mount ISO image\n"),1057 sprintf(tmp, "%s failed; unable to mount ISO image\n", 1057 1058 command); 1058 1059 log_to_screen(tmp); … … 1132 1133 1133 1134 log_msg(3, "verify_tape_backups --- starting"); 1134 log_to_screen( _("Verifying backups"));1135 log_to_screen("Verifying backups"); 1135 1136 openin_tape(bkpinfo); 1136 1137 /* verify archives themselves */ … … 1157 1158 && length_of_file(changed_files_fname) > 2) { 1158 1159 log_to_screen 1159 ( _("Warning - unable to check logfile to derive list of changed files"));1160 ("Warning - unable to check logfile to derive list of changed files"); 1160 1161 } else { 1161 1162 log_to_screen 1162 ( _("No differences found. Therefore, no 'changed.files' text file."));1163 ("No differences found. Therefore, no 'changed.files' text file."); 1163 1164 } 1164 1165 } … … 1176 1177 log_msg(0, tmp); 1177 1178 log_to_screen 1178 ( _("See /tmp/changed.files for a list of nonmatching files."));1179 ("See /tmp/changed.files for a list of nonmatching files."); 1179 1180 log_to_screen 1180 ( _("The files probably changed on filesystem, not on backup media."));1181 ("The files probably changed on filesystem, not on backup media."); 1181 1182 // retval++; 1182 1183 } -
branches/stable/mondo/mondo/common/libmondo.h
r501 r541 9 9 #include "libmondo-files-EXT.h" 10 10 #include "libmondo-fork-EXT.h" 11 #include " newt-specific-EXT.h"11 #include "libmondo-gui-EXT.h" 12 12 #include "libmondo-mountlist-EXT.h" 13 13 #include "libmondo-raid-EXT.h" -
branches/stable/mondo/mondo/common/mondostructures.h
r538 r541 477 477 * If you do nothing, "/" will be used. 478 478 */ 479 char include_paths[MAX_STR_LEN *4];479 char include_paths[MAX_STR_LEN]; 480 480 481 481 /** … … 484 484 * the scratchdir, and the tempdir are automatically excluded. 485 485 */ 486 char exclude_paths[MAX_STR_LEN *4];486 char exclude_paths[MAX_STR_LEN]; 487 487 488 488 /** … … 801 801 struct s_mdrec el[MAXIMUM_RAID_DEVS]; 802 802 }; 803 804 struct s_mrconf {805 int ia64_boot_size;806 char *iso_creation_cmd;807 }; -
branches/stable/mondo/mondo/common/my-stuff.h
r538 r541 1 /* 2 * Common defines across the project 3 * 4 * $Id$ 5 */ 6 7 #ifndef _MY_STUFF_H_ 8 #define _MY_STUFF_H_ 9 10 /* BERLIOS 1 /* my-stuff.h 2 $Id$ 3 . 4 5 6 07/14 7 - ARCH_THREADS is now 2; buffers, 4 8 9 07/10 10 - added acl, xattr stuff 11 12 06/19 13 - added AUX_VER 14 15 06/14 16 - added DO_MBR_PLEASE 17 18 04/17 19 - replaced INTERNAL_TAPE_BLK_SIZE with g_internal_tape_block_size 20 and DEFAULT_INTERNAL_TAPE_BLOCK_SIZE 21 22 04/13 23 - log_msg is now calling standard_log_debug_msg, not the alias (log_debug_msg) 24 25 04/03/2004 26 - added star and SELINUX support 27 28 11/20/2003 29 - boot from isolinux.bin, not mindi-boot.2880.img 30 31 11/15 32 - reduced SLICE_SIZE from 8192 to 4096 33 34 10/08 35 - set p-i-h volsize to 1GB 36 37 10/21 38 - added MNT_CDROM and FREELOADER 39 40 10/11 41 - added DEFAULT_DVD_DISK_SIZE 42 - added PARTIMAGE_DEBUG_LEVEL 43 44 09/27 45 - better logging 46 47 09/24 48 - added MR_LOGFILE="/tmp/mondo-restore.log" 49 50 09/22 51 - added bool, FALSE, TRUE 52 53 09/20 54 - increasd PPCFG_RAMDISK_SIZE to 150 55 56 09/12 57 - reduced MAX_STR_LEN from 512 to 460 58 59 09/10 60 - moved PPCFG_RAMDISK_SIZE here 61 62 09/05 63 - better config.h stuff 64 65 06/05 66 - changed fgrep to grep 67 68 05/19 69 - added CP_BIN 70 71 05/05 72 - added #include <sys/param.h> and sys/sem.h and ioctl.h 73 74 05/03 75 - added kill_anything_like_this() 76 77 04/24/2003 78 - added *STUB #define's 79 80 11/22/2002 81 - added INTERNAL_TAPE_BLK_SIZE 82 83 10/10 84 - use #define to create XMondo-friendly log file name if appropriate 85 86 08/30 87 - changed ARBITRARY_MAXIMUM to 512 88 89 08/26 90 - set MAX_STR_LEN at 512 but halved it within many _structures_ 91 - changed ARBITRARY_MAXIMUM to 128 92 93 08/08 94 - added '#include <signal.h>' 95 - added WELCOME_STRING 96 97 06/19 98 - changed tape block size from 8192 to 65536 99 100 04/08 101 - added manual_cd_tray flag to bkpinfo 102 103 03/31 104 - added restore_path to struct s_bkpinfo 105 106 03/21 107 - updated version# to 1.42 108 109 02/20 110 - added bkpinfo->using_cdstream 111 112 02/06 113 - added MONDO_VERSION 114 115 02/02 116 - added MONDO_CFG_FILE 117 - added SLICE_SIZE 118 119 01/31 120 - removed MINDI_HOME: it is unnecessary 121 - replaced MONDO_HOME with variable g_mondo_home 122 123 01/25 124 - added MONDO_HOME, MINDI_HOME 125 126 01/21 127 - added s_node{} structure 128 129 01/17 130 - added sys/shm.h, types.h, ipc.h 131 132 01/02/2002 133 - added that groovy bkpinfo{} stuff 134 135 11/29/2001 136 - added raidlist{} struct 137 138 08/27 139 - stuff 140 */ 141 11 142 #define HAVE_MALLOC 1 12 */ 143 13 144 14 145 // Extra info for ACLs and SELINUX users … … 27 158 * Create the illusion of a Boolean type. 28 159 */ 29 #define bool unsigned char160 #define bool int 30 161 #define TRUE 1 31 162 #define FALSE 0 32 163 #endif 33 164 34 /* BERLIOS 165 #ifndef _MY_STUFF_H_ 166 #define _MY_STUFF_H_ 167 35 168 #ifdef HAVE_CONFIG_H 36 169 #include <config.h> 37 170 #endif 38 */39 171 40 172 #ifndef __FreeBSD__ … … 49 181 #include <stdio.h> 50 182 #include <stdlib.h> 51 /* BERLIOS52 183 #ifndef __USE_FILE_OFFSET64 53 184 #define __USE_FILE_OFFSET64 … … 56 187 #define __USE_LARGEFILE64 57 188 #endif 58 */59 189 #include <sys/stat.h> 60 190 #include <fcntl.h> … … 66 196 #include <unistd.h> 67 197 #include <signal.h> 198 //#include <curses.h> 68 199 #include <newt.h> 69 200 #include <ctype.h> … … 72 203 #include <assert.h> 73 204 74 /*75 205 #if defined(DEBUG) && !__cplusplus 76 206 int count; 77 char trace_log[255]; 207 char trace_log[255]; /*buffer for logging */ 78 208 char *trace_log_ptr; 79 #endif 80 */ 81 82 #define STD_PREFIX "mondorescue" 209 #endif /* DEBUG */ 210 211 #define IA64_BOOT_SIZE "8192" /* Should be coherent with mindi */ 212 #define STD_PREFIX "mondorescue" /* Should be coherent with mindi */ 83 213 84 214 /** … … 123 253 #define CRC_M16 0xA001 ///< Mask for crc16. 124 254 #define CRC_MTT 0x1021 ///< Mask for crc-ccitt. 255 256 #define FALSE 0 ///< The ubiquitous FALSE macro. 257 #define TRUE 1 ///< The even more ubiquitous TRUE macro. 125 258 126 259 #define SCREEN_LENGTH 25 ///< The default size of the screen. … … 212 345 * @c growisofs command to generate a bootable DVD using isolinux, except for the directory to image. 213 346 */ 214 #define MONDO_GROWISOFS_REGULAR_SYSLINUX "growisofs - use-the-force-luke -J -no-emul-boot -boot-load-size 4 -b isolinux.bin --boot-info-table -c boot.cat -boot-load-size 4 -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_ -v"347 #define MONDO_GROWISOFS_REGULAR_SYSLINUX "growisofs -speed=1 -use-the-force-luke -J -no-emul-boot -boot-load-size 4 -b isolinux.bin --boot-info-table -c boot.cat -boot-load-size 4 -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_ -v" 215 348 216 349 /** 217 350 * @c growisofs command to generate a bootable DVD using LILO, except for the directory to image. 218 351 */// -b images/mindi-boot.2880.img 219 #define MONDO_GROWISOFS_REGULAR_ELILO "growisofs - use-the-force-luke -no-emul-boot -b images/mindi-boot.2880.img -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v"352 #define MONDO_GROWISOFS_REGULAR_ELILO "growisofs -speed=1 -use-the-force-luke -no-emul-boot -b images/mindi-boot.2880.img -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v" 220 353 221 354 /** 222 355 * @c growisofs command to generate a bootable DVD using LILO, except for the directory to image. 223 356 */// -b images/mindi-boot.2880.img 224 #define MONDO_GROWISOFS_REGULAR_LILO "growisofs - no-emul-boot -b isolinux.bin -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v"357 #define MONDO_GROWISOFS_REGULAR_LILO "growisofs -speed=1 -no-emul-boot -b isolinux.bin -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v" 225 358 226 359 /** 227 360 * @c growisofs command to generate a nonbootable DVD, except for the directory to image. 228 361 */ 229 #define MONDO_GROWISOFS_NONBOOT "growisofs - use-the-force-luke -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v"362 #define MONDO_GROWISOFS_NONBOOT "growisofs -speed=1 -use-the-force-luke -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v" 230 363 231 364 /** 232 365 * Welcome string displayed at the top of the newt interface. 233 366 */ 234 #define WELCOME_STRING _("W E L C O M E T O M O N D O R E S C U E")367 #define WELCOME_STRING "W E L C O M E T O M O N D O R E S C U E" 235 368 236 369 /** … … 393 526 #define DEFAULT_MR_LOGLEVEL 4 394 527 395 #ifdef ENABLE_NLS396 # include <libintl.h>397 # undef _398 # define _(String) dgettext (PACKAGE, String)399 # ifdef gettext_noop400 # define N_(String) gettext_noop (String)401 # else402 # define N_(String) (String)403 # endif404 #else405 # define textdomain(String) (String)406 # define gettext(String) (String)407 # define dgettext(Domain,Message) (Message)408 # define dcgettext(Domain,Message,Type) (Message)409 # define bindtextdomain(Domain,Directory) (Domain)410 # define _(String) (String)411 # define N_(String) (String)412 413 #endif414 415 416 417 528 #endif /* _MY_STUFF_H_ */ -
branches/stable/mondo/mondo/common/newt-specific.c
r502 r541 118 118 #include "libmondo-tools-EXT.h" 119 119 #include "libmondo-fork-EXT.h" 120 #include "newt-specific-EXT.h" 120 #include "libmondo-gui-EXT.h" 121 #include "lib-common-externs.h" 121 122 122 123 /*@unused@*/ … … 226 227 tmp[i - 1] = '\0'; 227 228 } 228 if (strstr( _("yesYES"), tmp)) {229 if (strstr("yesYES", tmp)) { 229 230 paranoid_free(tmp); 230 231 return (TRUE); 231 } else if (strstr( _("NOno"), tmp)) {232 } else if (strstr("NOno", tmp)) { 232 233 paranoid_free(tmp); 233 234 return (FALSE); … … 235 236 system("sync"); 236 237 printf 237 ( _("Please enter either YES or NO (or yes or no, or y or n, or...)\n"));238 ("Please enter either YES or NO (or yes or no, or y or n, or...)\n"); 238 239 } 239 240 } 240 241 } else { 241 242 paranoid_free(tmp); 242 return (popup_with_buttons(prompt, _("Yes"), _("No")));243 return (popup_with_buttons(prompt, "Yes", "No")); 243 244 } 244 245 } … … 272 273 tmp[i - 1] = '\0'; 273 274 } 274 if (strstr( _("okOKOkYESyes"), tmp)) {275 if (strstr("okOKOkYESyes", tmp)) { 275 276 paranoid_free(tmp); 276 277 return (TRUE); … … 281 282 } else { 282 283 paranoid_free(tmp); 283 return (popup_with_buttons(prompt, _(" Okay "), _("Cancel")));284 return (popup_with_buttons(prompt, " Okay ", "Cancel")); 284 285 } 285 286 } … … 425 426 ("gzip -9c /var/log/mondo-archive.log > /tmp/MA.log.gz 2> /dev/null"); 426 427 printf 427 ( _("If you require technical support, please contact the mailing list.\n"));428 printf( _("See http://www.mondorescue.org for details.\n"));428 ("If you require technical support, please contact the mailing list.\n"); 429 printf("See http://www.mondorescue.org for details.\n"); 429 430 printf 430 ( _("The list's members can help you, if you attach that file to your e-mail.\n"));431 printf( _("Log file: %s\n"), MONDO_LOGFILE);431 ("The list's members can help you, if you attach that file to your e-mail.\n"); 432 printf("Log file: %s\n", MONDO_LOGFILE); 432 433 if (does_file_exist("/tmp/MA.log.gz")) { 433 434 printf 434 ( _("FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n"));435 } 436 printf( _("Mondo has aborted.\n"));435 ("FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n"); 436 } 437 printf("Mondo has aborted.\n"); 437 438 register_pid(0, "mondo"); // finish() does this too, FYI 438 439 if (!g_main_pid) { … … 489 490 // system("clear"); 490 491 // iamhere("Finished calling newtFinished"); 491 printf( _("Execution run ended; result=%d\n"), signal);492 printf( _("Type 'less %s' to see the output log\n"), MONDO_LOGFILE);492 printf("Execution run ended; result=%d\n", signal); 493 printf("Type 'less %s' to see the output log\n", MONDO_LOGFILE); 493 494 free_libmondo_global_strings(); 494 495 exit(signal); … … 782 783 while (((ch = getchar()) != '\n') && (ch != EOF)); 783 784 } else { 784 (void) popup_with_buttons(prompt, _(" OK "), "");785 (void) popup_with_buttons(prompt, " OK ", ""); 785 786 } 786 787 } … … 842 843 #endif 843 844 ); 844 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, _(" OK "));845 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, _("Cancel"));845 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, " OK "); 846 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, "Cancel"); 846 847 // newtOpenWindow (8, 5, 54, newtTextboxGetNumLines (text) + 9, title); 847 848 newtCenteredWindow(54, newtTextboxGetNumLines(text) + 9, title); … … 930 931 } 931 932 // newtOpenWindow (25, 5, 46, newtTextboxGetNumLines (text) + 7, "Alert"); 932 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, _("Alert"));933 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, "Alert"); 933 934 myForm = newtForm(NULL, NULL, 0); 934 935 newtFormAddComponents(myForm, text, b_1, b_2, NULL); … … 996 997 newtCls(); 997 998 newtPushHelpLine 998 ( _("Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed."));999 ("Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed."); 999 1000 /* newtDrawRootText(28,0,"Welcome to Mondo Rescue"); */ 1000 1001 newtDrawRootText(18, 0, WELCOME_STRING); … … 1074 1075 g_isoform_old_progress = percentage; 1075 1076 sprintf(timeline_str, 1076 _("%2ld:%02ld taken %2ld:%02ld remaining"),1077 "%2ld:%02ld taken %2ld:%02ld remaining", 1077 1078 time_taken / 60, time_taken % 60, time_remaining / 60, 1078 1079 time_remaining % 60); 1079 1080 if (percentage < 3) { 1080 sprintf(pcline_str, _(" Working"));1081 sprintf(pcline_str, " Working"); 1081 1082 for (j = 0; j < g_mysterious_dot_counter; j++) { 1082 1083 strcat(pcline_str, "."); … … 1088 1089 special_dot_char(g_mysterious_dot_counter)); 1089 1090 } else { 1090 sprintf(pcline_str, _(" %3d%% done %3d%% to go"),1091 sprintf(pcline_str, " %3d%% done %3d%% to go", 1091 1092 percentage, 100 - percentage); 1092 1093 } … … 1234 1235 1235 1236 if (g_text_mode) { 1236 printf( _("---progress-form---1--- %s%s"), blurb1, "\r\n");1237 printf( _("---progress-form---2--- %s%s"), blurb2, "\r\n");1238 printf( _("---progress-form---3--- %s%s"), blurb3, "\r\n");1239 printf( _("---progress-form---E---\n"));1237 printf("---progress-form---1--- %s\r\n", blurb1); 1238 printf("---progress-form---2--- %s\r\n", blurb2); 1239 printf("---progress-form---3--- %s\r\n", blurb3); 1240 printf("---progress-form---E---\n"); 1240 1241 sprintf(taskprogress, "TASK: ["); 1241 1242 for (i = 0; i < percentage; i += 5) { … … 1246 1247 } 1247 1248 if (percentage > 100) { 1248 log_msg(2, _("percentage = %d"), percentage);1249 log_msg(2, "percentage = %d", percentage); 1249 1250 } 1250 1251 sprintf(taskprogress + strlen(taskprogress), 1251 1252 "] %3d%c", percentage, '%'); 1252 1253 sprintf(taskprogress + strlen(taskprogress), 1253 _(" done; %2ld:%02ld to go"),1254 " done; %2ld:%02ld to go", 1254 1255 time_remaining / 60, time_remaining % 60); 1255 printf( _("---progress-form---4--- %s\r\n"), taskprogress);1256 printf("---progress-form---4--- %s\r\n", taskprogress); 1256 1257 } else { 1257 1258 center_string(blurb1, 54); … … 1329 1330 if (g_text_mode) { 1330 1331 for (backup_type = none; backup_type == none;) { 1331 printf( _("Backup type ("));1332 printf("Backup type ("); 1332 1333 for (i = 0; possible_responses[i]; i++) { 1333 1334 printf("%c%s", (i == 0) ? '\0' : ' ', … … 1351 1352 if (restoring) { 1352 1353 strcpy(title_sz, 1353 _("Please choose the backup media from which you want to read data."));1354 strcpy(minimsg_sz, _("Read from:"));1354 "Please choose the backup media from which you want to read data."); 1355 strcpy(minimsg_sz, "Read from:"); 1355 1356 } else { 1356 1357 strcpy(title_sz, 1357 _("Please choose the backup media to which you want to archive data."));1358 strcpy(minimsg_sz, _("Backup to:"));1358 "Please choose the backup media to which you want to archive data."); 1359 strcpy(minimsg_sz, "Backup to:"); 1359 1360 } 1360 1361 newtPushHelpLine(title_sz); 1361 1362 // newtOpenWindow (23, 3, 34, 17, minimsg_sz); 1362 1363 newtCenteredWindow(34, 17, minimsg_sz); 1363 b1 = newtButton(1, 1, _("CD-R disks "));1364 b2 = newtButton(17, 1, _("CD-RW disks"));1365 b3 = newtButton(1, 9, _("Tape drive "));1366 b4 = newtButton(17, 5, _("CD streamer"));1367 b5 = newtButton(1, 5, _(" DVD disks "));1368 b6 = newtButton(17, 9, _(" NFS mount "));1369 b7 = newtButton(1, 13, _(" Hard disk "));1370 b8 = newtButton(17, 13, _(" Exit "));1364 b1 = newtButton(1, 1, "CD-R disks "); 1365 b2 = newtButton(17, 1, "CD-RW disks"); 1366 b3 = newtButton(1, 9, "Tape drive "); 1367 b4 = newtButton(17, 5, "CD streamer"); 1368 b5 = newtButton(1, 5, " DVD disks "); 1369 b6 = newtButton(17, 9, " NFS mount "); 1370 b7 = newtButton(1, 13, " Hard disk "); 1371 b8 = newtButton(17, 13, " Exit "); 1371 1372 myForm = newtForm(NULL, NULL, 0); 1372 1373 newtFormAddComponents(myForm, b1, b5, b3, b7, b2, b4, b6, b8, … … 1426 1427 newtDrawRootText(18, 0, WELCOME_STRING); 1427 1428 newtPushHelpLine 1428 ( _(" Please specify the level of compression that you want."));1429 (" Please specify the level of compression that you want."); 1429 1430 // newtOpenWindow (23, 3, 34, 13, "How much compression?"); 1430 newtCenteredWindow(34, 13, _("How much compression?"));1431 b1 = newtButton(4, 1, _("Maximum"));1432 b2 = newtButton(18, 1, _("Average"));1433 b3 = newtButton(4, 5, _("Minimum"));1434 b4 = newtButton(18, 5, _(" None "));1435 b5 = newtButton(4, 9, _(" Exit "));1431 newtCenteredWindow(34, 13, "How much compression?"); 1432 b1 = newtButton(4, 1, "Maximum"); 1433 b2 = newtButton(18, 1, "Average"); 1434 b3 = newtButton(4, 5, "Minumum"); 1435 b4 = newtButton(18, 5, " None "); 1436 b5 = newtButton(4, 9, " Exit "); 1436 1437 myForm = newtForm(NULL, NULL, 0); 1437 1438 newtFormAddComponents(myForm, b1, b3, b2, b4, b5, NULL); … … 1514 1515 paranoid_fclose(fin); 1515 1516 if (filelist->entries >= ARBITRARY_MAXIMUM) { 1516 log_to_screen( _("Arbitrary limits suck, man!"));1517 log_to_screen("Arbitrary limits suck, man!"); 1517 1518 paranoid_free(tmp); 1518 1519 return (1); … … 1656 1657 } 1657 1658 sprintf(differ_sz, 1658 _(" %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."),1659 " %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.", 1659 1660 i); 1660 1661 newtPushHelpLine(differ_sz); 1661 bClose = newtCompactButton(10, 15, _(" Close "));1662 bSelect = newtCompactButton(30, 15, _(" Select "));1663 sprintf(tmp, "%-10s %-20s", _("Priority"), _("Filename"));1662 bClose = newtCompactButton(10, 15, " Close "); 1663 bSelect = newtCompactButton(30, 15, " Select "); 1664 sprintf(tmp, "%-10s %-20s", "Priority", "Filename"); 1664 1665 headerMsg = newtLabel(2, 1, tmp); 1665 newtOpenWindow(5, 4, 70, 16, _("Non-matching files"));1666 newtOpenWindow(5, 4, 70, 16, "Non-matching files"); 1666 1667 myForm = newtForm(NULL, NULL, 0); 1667 1668 newtFormAddComponents(myForm, headerMsg, fileListbox, bClose, … … 1677 1678 i++); 1678 1679 if (i == filelist->entries && filelist->entries > 0) { 1679 log_to_screen( _("I don't know what that button does!"));1680 log_to_screen("I don't know what that button does!"); 1680 1681 } else { 1681 1682 currline = i;
Note:
See TracChangeset
for help on using the changeset viewer.