Changeset 1917 in MondoRescue
- Timestamp:
- Apr 17, 2008, 1:29:45 AM (17 years ago)
- Location:
- branches/2.2.6/mondo/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/2.2.6/mondo/src/common/Makefile.am ¶
r831 r1917 11 11 libmondo-mountlist.c libmondo-raid.c \ 12 12 libmondo-stream.c libmondo-string.c libmondo-tools.c \ 13 libmondo-verify.c newt-specific.c \13 libmondo-verify.c newt-specific.c libmondo-cli.c \ 14 14 libmondo-archive.h libmondo-devices.h \ 15 15 libmondo-filelist.h libmondo-files.h libmondo-fork.h \ 16 16 libmondo-gui.h libmondo-mountlist.h libmondo-raid.h \ 17 17 libmondo-stream.h libmondo-string.h libmondo-tools.h \ 18 libmondo-verify.h libmondo-fifo.h \18 libmondo-verify.h libmondo-fifo.h libmondo-cli.h \ 19 19 libmondo-archive-EXT.h my-stuff.h mondostructures.h \ 20 20 libmondo-devices-EXT.h libmondo-fifo-EXT.h \ … … 23 23 libmondo-mountlist-EXT.h libmondo-raid-EXT.h \ 24 24 libmondo-string-EXT.h libmondo-tools-EXT.h \ 25 libmondo-verify-EXT.h libmondo-stream-EXT.h \25 libmondo-verify-EXT.h libmondo-stream-EXT.h libmondo-cli-EXT.h \ 26 26 newt-specific.h \ 27 27 mr_string.c mr_string.h -
TabularUnified branches/2.2.6/mondo/src/common/libmondo-cli-EXT.h ¶
r1915 r1917 1 /* mondo-cli-EXT.h */1 /* libmondo-cli-EXT.h */ 2 2 3 3 extern int handle_incoming_parameters(int argc, char *argv[]); -
TabularUnified branches/2.2.6/mondo/src/common/libmondo-cli.c ¶
r1915 r1917 162 162 163 163 #include <pthread.h> 164 #include "../common/my-stuff.h" 165 #include "../common/mondostructures.h" 166 #include "mondo-cli-EXT.h" 167 #include "../common/libmondo.h" 168 169 //static char cvsid[] = "$Id$"; 164 #include "my-stuff.h" 165 #include "mondostructures.h" 166 #include "libmondo-cli-EXT.h" 167 #include "libmondo.h" 170 168 171 169 extern int g_loglevel; 172 170 extern bool g_text_mode; 173 externbool g_skip_floppies; ///< Whether to skip the creation of boot disks171 bool g_skip_floppies; ///< Whether to skip the creation of boot disks 174 172 extern char g_startdir[MAX_STR_LEN]; ///< ????? @bug ????? 175 173 extern bool g_sigpipe; 174 extern char *MONDO_OPTIONS; 176 175 177 176 /*@ file pointer **************************************************/ … … 190 189 191 190 extern void setup_tmpdir(char *path); 192 193 /**194 * Whether we're restoring from ISOs. Obviously not, since this is the195 * backup program.196 * @note You @b MUST declare this variable somewhere in your program if197 * you use libmondo. Otherwise the link will fail.198 * @ingroup globalGroup199 */200 bool g_ISO_restore_mode = FALSE;201 202 203 191 extern double g_kernel_version; 204 192 extern int g_current_media_number; … … 208 196 /* Do we use extended attributes and acl ? 209 197 * By default no, use --acl & --attr options to force their usage */ 210 char *g_getfacl = NULL;211 char *g_getfattr = NULL;198 extern char *g_getfacl; 199 extern char *g_getfattr; 212 200 213 201 /* Reference to global bkpinfo */ … … 239 227 240 228 tmp = malloc(9*MAX_STR_LEN); 241 sensibly_set_tmpdir_and_scratchdir();242 229 for (i = 0; i < 128; i++) { 243 230 flag_val[i][0] = '\0'; … … 378 365 if (flag_set['K']) { 379 366 g_loglevel = atoi(flag_val['K']); 367 log_msg(1,"Loglevel forced to %s",g_loglevel); 380 368 if (g_loglevel < 3) { 381 369 g_loglevel = 3; … … 997 985 } 998 986 999 i = flag_set['O'] + flag_set['V']; 1000 if (i == 0) { 1001 retval++; 1002 log_to_screen("Specify backup (-O), verify (-V) or both (-OV).\n"); 987 if ( ! bkpinfo->restore_data ) { 988 i = flag_set['O'] + flag_set['V']; 989 if (i == 0) { 990 retval++; 991 log_to_screen("Specify backup (-O), verify (-V) or both (-OV).\n"); 992 } 1003 993 } 1004 994 … … 1045 1035 } 1046 1036 while ((opt = 1047 getopt(argc, argv, 1048 "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T:UVWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z")) 1037 getopt(argc, argv, MONDO_OPTIONS)) 1049 1038 != -1) { 1050 1039 if (opt == '?') { -
TabularUnified branches/2.2.6/mondo/src/common/libmondo-cli.h ¶
r1915 r1917 1 /* mondo-cli.h1 /* libmondo-cli.h 2 2 * $Id$ 3 3 */ -
TabularUnified branches/2.2.6/mondo/src/common/libmondo-devices.c ¶
r1916 r1917 2177 2177 } 2178 2178 } else { 2179 s z_size = 0;2179 strcpy(sz_size, "0"); 2180 2180 } 2181 2181 for (i = 0; i <= MAX_NOOF_MEDIA; i++) { 2182 2182 bkpinfo->media_size[i] = atoi(sz_size); 2183 2183 } 2184 if (bkpinfo->media_size[0] < =0) {2184 if (bkpinfo->media_size[0] < 0) { 2185 2185 log_to_screen("User has chosen not to backup the PC"); 2186 2186 finish(1); -
TabularUnified branches/2.2.6/mondo/src/common/libmondo-tools-EXT.h ¶
r1656 r1917 3 3 extern void clean_up_KDE_desktop_if_necessary(void); 4 4 extern long get_time(); 5 extern char *mr_date(void); 5 6 extern void (*log_debug_msg) (int debug_level, const char *szFile, 6 7 const char *szFunction, int nLine, -
TabularUnified branches/2.2.6/mondo/src/common/libmondo-tools.c ¶
r1855 r1917 180 180 #include "libmondo-fork-EXT.h" 181 181 #include "libmondo-raid-EXT.h" 182 #include "libmondo-devices-EXT.h" 182 183 #include <sys/socket.h> 183 184 #include <netdb.h> … … 244 245 245 246 extern bool am_I_in_disaster_recovery_mode(void); 247 248 /* Return a string containing the date */ 249 char *mr_date(void) { 250 251 time_t tcurr; 252 253 tcurr = time(NULL); 254 return(ctime(&tcurr)); 255 } 256 257 /*-----------------------------------------------------------*/ 246 258 247 259 … … 1001 1013 memset((void *) bkpinfo, 0, sizeof(struct s_bkpinfo)); 1002 1014 1003 /* special case for tmpdir as used eveywhere after */ 1004 setup_tmpdir(NULL); 1015 sensibly_set_tmpdir_and_scratchdir(); 1005 1016 1006 1017 bkpinfo->manual_cd_tray = FALSE; … … 1030 1041 strcpy(bkpinfo->prefix, STD_PREFIX); 1031 1042 1032 bkpinfo->scratchdir[0] = '\0';1033 1043 bkpinfo->make_filelist = TRUE; // unless -J supplied to mondoarchive 1034 1044 bkpinfo->optimal_set_size = 0; -
TabularUnified branches/2.2.6/mondo/src/common/libmondo-tools.h ¶
r1647 r1917 6 6 7 7 long get_time(); 8 char *mr_date(void); 8 9 extern void (*log_debug_msg) (int debug_level, const char *szFile, 9 10 const char *szFunction, int nLine, -
TabularUnified branches/2.2.6/mondo/src/common/mr_string.c ¶
r1552 r1917 3 3 */ 4 4 5 #include <stdlib.h> 5 6 #include <stdio.h> 6 7 #include <string.h> -
TabularUnified branches/2.2.6/mondo/src/mondoarchive/Makefile.am ¶
r1315 r1917 4 4 5 5 ## Headers 6 noinst_HEADERS = mondo -cli-EXT.h mondo-cli.h mondoarchive.h6 noinst_HEADERS = mondoarchive.h 7 7 8 8 ## The program 9 9 sbin_PROGRAMS = mondoarchive 10 mondoarchive_SOURCES = main.c mondo-cli.c10 mondoarchive_SOURCES = main.c 11 11 mondoarchive_LDADD = ${top_builddir}/src/common/libmondo.a -
TabularUnified branches/2.2.6/mondo/src/mondoarchive/main.c ¶
r1885 r1917 116 116 #include "../common/mondostructures.h" 117 117 #include "../common/libmondo.h" 118 #include " mondo-cli-EXT.h"118 #include "../common/libmondo-cli-EXT.h" 119 119 #include "../common/libmondo-tools-EXT.h" 120 120 #include "mondoarchive.h" … … 137 137 138 138 /***************** global vars, used only by main.c ******************/ 139 bool g_skip_floppies;139 extern bool g_skip_floppies; 140 140 long diffs; 141 141 142 142 extern t_bkptype g_backup_media_type; 143 143 extern int g_loglevel; 144 145 /** 146 * Whether we're restoring from ISOs. Obviously not, since this is the 147 * backup program. 148 * @note You @b MUST declare this variable somewhere in your program if 149 * you use libmondo. Otherwise the link will fail. 150 * @ingroup globalGroup 151 */ 152 bool g_ISO_restore_mode = FALSE; 153 154 /* Do we use extended attributes and acl ? 155 * * By default no, use --acl & --attr options to force their usage */ 156 char *g_getfacl = NULL; 157 char *g_getfattr = NULL; 144 158 145 159 /* Reference to global bkpinfo */ … … 242 256 } 243 257 244 /* Return a string containing the date */245 char *mr_date(void) {246 247 time_t tcurr;248 249 tcurr = time(NULL);250 return(ctime(&tcurr));251 }252 253 /*-----------------------------------------------------------*/254 255 256 258 257 259 /** -
TabularUnified branches/2.2.6/mondo/src/mondoarchive/mondoarchive.h ¶
r1318 r1917 9 9 */ 10 10 char *MONDO_LOGFILE = "/var/log/mondoarchive.log"; 11 char *MONDO_OPTIONS = "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T:UVWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z"; 11 12 12 13 /* No restriction on ps options */
Note:
See TracChangeset
for help on using the changeset viewer.