[1054] | 1 | /*
|
---|
| 2 | * Common defines across the project
|
---|
| 3 | *
|
---|
| 4 | * $Id: my-stuff.h 973 2006-11-23 18:05:21Z bruno $
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | #ifndef _MY_STUFF_H_
|
---|
| 8 | #define _MY_STUFF_H_
|
---|
| 9 |
|
---|
| 10 | // Extra info for ACLs and SELINUX users
|
---|
| 11 | #define STAR_ACL_SZ "-xfflags -acl"
|
---|
| 12 |
|
---|
[1069] | 13 | /*The number of lines of log output to keep at the bottom of the screen.*/
|
---|
| 14 | #define NOOF_ERR_LINES 6
|
---|
| 15 |
|
---|
[1087] | 16 | /* Hardcoded: Bad for the moment */
|
---|
| 17 | #define MONDO_CACHE "/var/cache/mondo"
|
---|
| 18 | #define MONDORESTORECFG MONDO_CACHE"/mondo-restore.cfg"
|
---|
[1158] | 19 | /**
|
---|
| 20 | * The mondo-restore.cfg stub (appended to the directory where all.tar.gz was unpacked).
|
---|
| 21 | */
|
---|
| 22 | #define MONDO_CFG_FILE_STUB "tmp/mondo-restore.cfg"
|
---|
[1087] | 23 |
|
---|
| 24 |
|
---|
[1158] | 25 |
|
---|
[1054] | 26 | /**
|
---|
| 27 | * @file
|
---|
| 28 | * The main header file for Mondo.
|
---|
| 29 | */
|
---|
| 30 |
|
---|
| 31 | #include <stdio.h>
|
---|
[1080] | 32 | #include "mr_mem.h"
|
---|
[1144] | 33 | #include "mr_msg.h"
|
---|
[1054] | 34 |
|
---|
| 35 | #if !defined(bool) && !defined(__cplusplus)
|
---|
| 36 | /**
|
---|
| 37 | * Create the illusion of a Boolean type.
|
---|
| 38 | */
|
---|
| 39 | #define bool unsigned char
|
---|
| 40 | #define TRUE 1
|
---|
| 41 | #define FALSE 0
|
---|
| 42 | #endif
|
---|
| 43 |
|
---|
| 44 | #ifdef HAVE_CONFIG_H
|
---|
| 45 | #include <config.h>
|
---|
| 46 | #endif
|
---|
| 47 | /* BERLIOS
|
---|
| 48 | * Useful ?
|
---|
| 49 | */
|
---|
| 50 |
|
---|
| 51 | #ifndef __FreeBSD__
|
---|
| 52 | #include <getopt.h>
|
---|
| 53 | #endif
|
---|
| 54 |
|
---|
| 55 | #include <sys/types.h>
|
---|
| 56 | #include <sys/shm.h>
|
---|
| 57 | #include <sys/ipc.h>
|
---|
| 58 | #include <sys/ioctl.h>
|
---|
| 59 | #include <sys/sem.h>
|
---|
| 60 | #include <sys/param.h>
|
---|
| 61 |
|
---|
| 62 | #include <stdlib.h>
|
---|
| 63 | #include <sys/stat.h>
|
---|
| 64 | #include <fcntl.h>
|
---|
| 65 | #include <errno.h>
|
---|
| 66 | #include <stddef.h>
|
---|
| 67 | #include <sys/stat.h>
|
---|
| 68 | #include <sys/wait.h>
|
---|
| 69 | #include <time.h>
|
---|
| 70 | #include <unistd.h>
|
---|
| 71 | #ifndef S_SPLINT_S
|
---|
| 72 | #include <signal.h>
|
---|
| 73 | #endif
|
---|
| 74 | #include <newt.h>
|
---|
| 75 | #include <ctype.h>
|
---|
| 76 | #include <string.h>
|
---|
| 77 | #ifndef S_SPLINT_S
|
---|
| 78 | #include <pthread.h>
|
---|
| 79 | #endif
|
---|
| 80 | #include <assert.h>
|
---|
| 81 |
|
---|
| 82 | #define STD_PREFIX "mondorescue"
|
---|
| 83 |
|
---|
| 84 | /**
|
---|
| 85 | * The biggielist stub (appended to the directory where all.tar.gz was unpacked).
|
---|
| 86 | */
|
---|
| 87 | #define BIGGIELIST_TXT_STUB "tmp/biggielist.txt"
|
---|
| 88 |
|
---|
| 89 | /**
|
---|
| 90 | * The filelist stub (appended to the directory where all.tar.gz was unpacked).
|
---|
| 91 | */
|
---|
| 92 | #define FILELIST_FULL_STUB "tmp/filelist.full.gz"
|
---|
| 93 |
|
---|
| 94 | /**
|
---|
| 95 | * The mountlist stub (appended to the directory where all.tar.gz was unpacked).
|
---|
| 96 | */
|
---|
| 97 | #define MOUNTLIST_FNAME_STUB "tmp/mountlist.txt"
|
---|
| 98 |
|
---|
| 99 | /**
|
---|
| 100 | * The RAID kernel proc file
|
---|
| 101 | */
|
---|
| 102 | #define MDSTAT_FILE "/proc/mdstat"
|
---|
| 103 |
|
---|
| 104 | #undef assert
|
---|
| 105 |
|
---|
| 106 | extern void _mondo_assert_fail(const char *file, const char *function,
|
---|
| 107 | int line, const char *exp);
|
---|
| 108 |
|
---|
| 109 | /**
|
---|
| 110 | * An assert macro that calls _mondo_assert_fail() when it fails.
|
---|
| 111 | */
|
---|
| 112 | #ifdef NDEBUG
|
---|
| 113 | # define assert(exp) ((void)0)
|
---|
| 114 | #else
|
---|
| 115 | # ifndef S_SPLINT_S
|
---|
| 116 | # define assert(exp) ((exp)?((void)0):_mondo_assert_fail(__FILE__, __FUNCTION__, __LINE__, #exp))
|
---|
| 117 | # else
|
---|
| 118 | # define assert(exp) ((void)0)
|
---|
| 119 | # endif
|
---|
| 120 | #endif
|
---|
| 121 |
|
---|
| 122 | #define CRC_M16 0xA001 ///< Mask for crc16.
|
---|
| 123 | #define CRC_MTT 0x1021 ///< Mask for crc-ccitt.
|
---|
| 124 |
|
---|
| 125 | #define SCREEN_LENGTH 25 ///< The default size of the screen.
|
---|
| 126 | #define ARBITRARY_MAXIMUM 2000 ///< The maximum number of items showing at once in the mountlist or filelist editor.
|
---|
| 127 | #define MAX_TAPECATALOG_ENTRIES 8192 ///< The maximum number of entries in the tape catalog.
|
---|
[1078] | 128 | #define MAX_STR_LEN 384 ///< The maximum length of almost all @p char buffers in Mondo.
|
---|
| 129 | /// Note: Make this divisible by eight to avoid aligment issues
|
---|
| 130 | /// on 64bit platforms like ia64.
|
---|
[1054] | 131 | #define MAXIMUM_RAID_DEVS 32 ///< The maximum number of RAID devices in the raidlist.
|
---|
| 132 | #define MAXIMUM_ADDITIONAL_RAID_VARS 32 ///< The maximum number of additional RAID variables per RAID device in the raidlist.
|
---|
| 133 | #define MAXIMUM_DISKS_PER_RAID_DEV 32 ///< The maximum number of disks per RAID device in the raidtab.
|
---|
| 134 |
|
---|
| 135 | #define RAIDTAB_FNAME "/etc/raidtab" ///< The filename of the raidtab file, at least on Linux.
|
---|
| 136 |
|
---|
| 137 | #define BLK_START_OF_BACKUP 1 ///< Marker block: start a backup.
|
---|
| 138 | #define BLK_START_OF_TAPE 2 ///< Marker block: start a tape.
|
---|
| 139 | #define BLK_START_AFIOBALLS 10 ///< Marker block: start the afioball section.
|
---|
| 140 | #define BLK_STOP_AFIOBALLS 19 ///< Marker block: stop the afioball section.
|
---|
| 141 | #define BLK_START_AN_AFIO_OR_SLICE 20 ///< Marker block: start an afioball or a slice.
|
---|
| 142 | #define BLK_STOP_AN_AFIO_OR_SLICE 29 ///< Marker block: stop an afioball or a slice.
|
---|
| 143 | #define BLK_START_BIGGIEFILES 30 ///< Marker block: start the biggiefile section.
|
---|
| 144 | #define BLK_STOP_BIGGIEFILES 39 ///< Marker block: stop the biggiefile section.
|
---|
| 145 | #define BLK_START_A_NORMBIGGIE 40 ///< Marker block: start a normal biggiefile.
|
---|
| 146 | #define BLK_START_A_PIHBIGGIE 41 ///< Marker block: start a ntfsprog'd biggiefile
|
---|
| 147 | #define BLK_START_EXTENDED_ATTRIBUTES 45 ///< Marker block: start xattr/acl info
|
---|
| 148 | #define BLK_STOP_EXTENDED_ATTRIBUTES 46 ///< Marker block: stop xattr/acl info
|
---|
| 149 | #define BLK_START_EXAT_FILE 47
|
---|
| 150 | #define BLK_STOP_EXAT_FILE 48
|
---|
| 151 | #define BLK_STOP_A_BIGGIE 59 ///< Marker block: stop a biggiefile.
|
---|
| 152 | #define BLK_START_FILE 80 ///< Marker block: start a file (non-afio or slice).
|
---|
| 153 | #define BLK_STOP_FILE 89 ///< Marker block: stop a file (non-afio or slice).
|
---|
| 154 | #define BLK_END_OF_TAPE 100 ///< Marker block: end of tape.
|
---|
| 155 | #define BLK_END_OF_BACKUP 101 ///< Marker block: end of backup.
|
---|
| 156 | #define BLK_ABORTED_BACKUP 102 ///< Marker block: backup was aborted.
|
---|
| 157 |
|
---|
| 158 | /// The external tape blocksize.
|
---|
| 159 | #ifdef EXTTAPE
|
---|
| 160 | #define TAPE_BLOCK_SIZE (long)EXTTAPE
|
---|
| 161 | #else
|
---|
| 162 | #define TAPE_BLOCK_SIZE 131072L /* was 8192; 06/2002-->65536; 11/2002-->131072 */
|
---|
| 163 | #endif
|
---|
| 164 |
|
---|
| 165 | #define DEFAULT_INTERNAL_TAPE_BLOCK_SIZE 32768 // Nov 2003?
|
---|
| 166 |
|
---|
| 167 |
|
---|
| 168 |
|
---|
| 169 |
|
---|
| 170 | #define SLICE_SIZE 4096 ///< The size of a slice of a biggiefile.
|
---|
| 171 |
|
---|
| 172 |
|
---|
| 173 |
|
---|
| 174 |
|
---|
| 175 |
|
---|
| 176 |
|
---|
| 177 | /**
|
---|
| 178 | * Determine whether @p x (t_bkptype) is a streaming backup.
|
---|
| 179 | */
|
---|
| 180 | #define IS_THIS_A_STREAMING_BACKUP(x) (x == tape || x == udev || x == cdstream)
|
---|
| 181 |
|
---|
| 182 |
|
---|
| 183 | /**
|
---|
| 184 | * @c mkisofs command to generate a nonbootable CD, except for -o option and the directory to image.
|
---|
| 185 | */
|
---|
| 186 | #define MONDO_MKISOFS_NONBOOT "mkisofs -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_"
|
---|
| 187 |
|
---|
| 188 | /**
|
---|
| 189 | * @c mkisofs command to generate a bootable CD using isolinux, except for -o option and the directory to image.
|
---|
| 190 | */
|
---|
| 191 | #define MONDO_MKISOFS_REGULAR_SYSLINUX "mkisofs -J -boot-info-table -no-emul-boot -b isolinux.bin -c boot.cat -boot-load-size 4 -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL_Version -V _CD#_"
|
---|
| 192 | #define MONDO_MKISOFS_REGULAR_LILO "mkisofs -J -boot-info-table -no-emul-boot -b isolinux.bin -c boot.cat -boot-load-size 4 -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_"
|
---|
| 193 | #define MONDO_MKISOFS_REGULAR_ELILO "mkisofs -no-emul-boot -b images/mindi-bootroot.8192.img -c boot.cat -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_"
|
---|
| 194 |
|
---|
| 195 | /**
|
---|
| 196 | * The stub name of the temporary ISO image to create, burn, and remove.
|
---|
| 197 | */
|
---|
| 198 | #define MONDO_TMPISOS "/temporary.iso"
|
---|
| 199 |
|
---|
| 200 | /**
|
---|
| 201 | * @c growisofs command to generate a bootable DVD using isolinux, except for the directory to image.
|
---|
| 202 | */
|
---|
| 203 | #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"
|
---|
| 204 |
|
---|
| 205 | /**
|
---|
| 206 | * @c growisofs command to generate a bootable DVD using LILO, except for the directory to image.
|
---|
| 207 | */// -b images/mindi-boot.2880.img
|
---|
| 208 | #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"
|
---|
| 209 |
|
---|
| 210 | /**
|
---|
| 211 | * @c growisofs command to generate a bootable DVD using LILO, except for the directory to image.
|
---|
| 212 | */// -b images/mindi-boot.2880.img
|
---|
| 213 | #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"
|
---|
| 214 |
|
---|
| 215 | /**
|
---|
| 216 | * @c growisofs command to generate a nonbootable DVD, except for the directory to image.
|
---|
| 217 | */
|
---|
| 218 | #define MONDO_GROWISOFS_NONBOOT "growisofs -use-the-force-luke -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ -v"
|
---|
| 219 |
|
---|
| 220 | /**
|
---|
| 221 | * Welcome string displayed at the top of the newt interface.
|
---|
| 222 | */
|
---|
| 223 | #define WELCOME_STRING _("W E L C O M E T O M O N D O R E S C U E")
|
---|
| 224 |
|
---|
| 225 | /**
|
---|
| 226 | * The maximum length of a filename in the tape catalog.
|
---|
| 227 | */
|
---|
| 228 | #define MAX_TAPECAT_FNAME_LEN 32
|
---|
| 229 |
|
---|
| 230 | /**
|
---|
| 231 | * Compatibility #define to ease the transition to logfile-in-a-variable.
|
---|
| 232 | */
|
---|
| 233 | #define MONDO_LOGFILE "/var/log/mondo-archive.log"
|
---|
| 234 |
|
---|
| 235 | /**
|
---|
| 236 | * Assert that (@p x != NULL) and (@p x[0] != '\\0').
|
---|
| 237 | */
|
---|
| 238 | #define assert_string_is_neither_NULL_nor_zerolength(x) {assert(x!=NULL);assert(x[0]!='\0');}
|
---|
| 239 |
|
---|
| 240 | /**
|
---|
| 241 | * Log the file, line, Mondo error message, and OS error message (errno).
|
---|
| 242 | */
|
---|
[1144] | 243 | #define log_OS_error(x) {mr_msg(1, "%s, line %ld: %s (%s)", __FILE__, __LINE__, x, strerror(errno));}
|
---|
[1054] | 244 |
|
---|
| 245 | /**
|
---|
| 246 | * Assert that (@p x != NULL).
|
---|
| 247 | */
|
---|
| 248 | #define assert_pointer_is_not_NULL(x) {assert(x!=NULL);}
|
---|
| 249 |
|
---|
| 250 | /**
|
---|
| 251 | * close() @p x and log a message if it fails.
|
---|
| 252 | */
|
---|
[1144] | 253 | #define paranoid_close(x) {if(close(x)) {mr_msg(5, "close err");} x=-999; }
|
---|
[1054] | 254 |
|
---|
| 255 | /**
|
---|
| 256 | * fclose() @p x and log a message if it fails.
|
---|
| 257 | */
|
---|
[1144] | 258 | #define paranoid_fclose(x) {if(fclose(x)) {mr_msg(5, "fclose err");} x=NULL; }
|
---|
[1054] | 259 |
|
---|
| 260 | /**
|
---|
| 261 | * pclose() @p x and log a message if it fails.
|
---|
| 262 | */
|
---|
[1144] | 263 | #define paranoid_pclose(x) {if(pclose(x)) {mr_msg(5, "pclose err");} x=NULL; }
|
---|
[1054] | 264 |
|
---|
| 265 | /**
|
---|
| 266 | * Run the command @p x and log it if it fails.
|
---|
| 267 | */
|
---|
[1144] | 268 | #define paranoid_system(x) {if(system(x)) mr_msg(4, x); }
|
---|
[1054] | 269 |
|
---|
| 270 | /**
|
---|
| 271 | * Free variables and call finish(@p x).
|
---|
| 272 | */
|
---|
[1166] | 273 | #define paranoid_MR_finish(x) {free_MR_global_filenames (); if (bkpinfo) mr_free (bkpinfo); finish(x); }
|
---|
[1054] | 274 |
|
---|
| 275 | /**
|
---|
| 276 | * Log file, function, line, and @p x.
|
---|
| 277 | */
|
---|
| 278 | #define iamhere(x) {log_it("%s, %s, %ld: %s", __FILE__, __FUNCTION__, __LINE__, x);}
|
---|
| 279 |
|
---|
| 280 | /**
|
---|
| 281 | * Yes, we want malloc() to help us fix bugs.
|
---|
| 282 | */
|
---|
| 283 | #define MALLOC_CHECK_ 1
|
---|
| 284 |
|
---|
| 285 | /**
|
---|
| 286 | * Malloc @p x to be MAX_STR_LEN bytes and call fatal_error() if we're out of memory.
|
---|
| 287 | */
|
---|
[1080] | 288 | #define malloc_string(x) { x = (char *)mr_malloc(MAX_STR_LEN); x[0] = x[1] = '\0'; }
|
---|
[1054] | 289 |
|
---|
| 290 | /**
|
---|
| 291 | * Path to the location the hard drive is mounted on during a restore.
|
---|
| 292 | */
|
---|
| 293 | #define MNT_RESTORING "/mnt/RESTORING"
|
---|
| 294 |
|
---|
| 295 | /** @def VANILLA_SCSI_CDROM The first SCSI CD-ROM in the system (most likely to be the one to write to). */
|
---|
| 296 | /** @def VANILLA_SCSI_TAPE The SCSI tape radical on the system (most likely to be the one towrite to. */
|
---|
| 297 | /** @def DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE A string whose presence in a device name indicates the
|
---|
| 298 | * inability to check this device for errors in the mountlist. */
|
---|
| 299 | /** @def RAID_DEVICE_STUB The stub of a RAID device (set up RAID if we find it). */
|
---|
| 300 | /** @def SANE_FORMATS Sane formats for this OS, separated by spaces. */
|
---|
| 301 | /** @def ALT_TAPE The first IDE tape in the system. */
|
---|
| 302 | /** @def MKE2FS_OR_NEWFS @c mke2fs or @c newfs, depending on the OS. */
|
---|
| 303 | /** @def CP_BIN The GNU @c cp binary to use. */
|
---|
| 304 | #ifdef __FreeBSD__
|
---|
| 305 | #define VANILLA_SCSI_CDROM "/dev/cd0"
|
---|
| 306 | #define VANILLA_SCSI_TAPE "/dev/sa"
|
---|
[1068] | 307 | #define VANILLA_USB_DEVICE "/dev/tobegivenbyfreebsdguru"
|
---|
[1054] | 308 | #define DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE "/dev/vinum/"
|
---|
| 309 | #define RAID_DEVICE_STUB DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE
|
---|
| 310 | #define SANE_FORMATS "swap image msdosfs nfs ntfs raid lvm ffs ufs ext2fs"
|
---|
| 311 | #define ALT_TAPE "/dev/ast"
|
---|
| 312 | #define MKE2FS_OR_NEWFS "newfs"
|
---|
| 313 | #define CP_BIN "gcp"
|
---|
| 314 | #else
|
---|
| 315 | #define VANILLA_SCSI_CDROM "/dev/scd0"
|
---|
| 316 | #define VANILLA_SCSI_TAPE "/dev/st"
|
---|
[1121] | 317 | #define VANILLA_USB_DEVICE "/dev/sda"
|
---|
[1054] | 318 | #define DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE "/dev/md"
|
---|
| 319 | #define RAID_DEVICE_STUB DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE
|
---|
| 320 | #define SANE_FORMATS "swap image vfat ext2 ext3 xfs vfs jfs reiserfs dos minix coda nfs ntfs hpfs raid lvm cifs"
|
---|
| 321 | #define ALT_TAPE "/dev/ht"
|
---|
| 322 | #define MKE2FS_OR_NEWFS "mke2fs"
|
---|
| 323 | #define CP_BIN "cp"
|
---|
| 324 | #endif
|
---|
| 325 |
|
---|
| 326 |
|
---|
| 327 | /**
|
---|
| 328 | * The template for a filelist filename.
|
---|
| 329 | * The first argument (%s) is the tempdir and the second (%d) is the filelist number.
|
---|
| 330 | */
|
---|
| 331 | #define FILELIST_FNAME_RAW_SZ "%s/filelist.%ld"
|
---|
| 332 |
|
---|
| 333 | #define XATTR_LIST_FNAME_RAW_SZ "%s/xattr_list.%ld.gz"
|
---|
| 334 | #define XATTR_BIGGLST_FNAME_RAW_SZ "%s/xattr_list.big.gz"
|
---|
| 335 | #define ACL_LIST_FNAME_RAW_SZ "%s/acl_list.%ld.gz"
|
---|
| 336 | #define ACL_BIGGLST_FNAME_RAW_SZ "%s/acl_list.big.gz"
|
---|
| 337 |
|
---|
| 338 | /**
|
---|
| 339 | * The template for an afioball filename.
|
---|
| 340 | * The first argument (%s) is the tempdir and the second (%d) is the filelist number.
|
---|
| 341 | */
|
---|
| 342 | #define AFIOBALL_FNAME_RAW_SZ (bkpinfo->use_star)?"%s/tmpfs/%ld.star.%s":"%s/tmpfs/%ld.afio.%s"
|
---|
| 343 | #define ARCH_THREADS 2 ///< The number of simultaneous threads running afio in the background.
|
---|
| 344 | #define ARCH_BUFFER_NUM (ARCH_THREADS*4) // Number of permissible queued afio files
|
---|
| 345 | #define FORTY_SPACES " " ///< 40 spaces.
|
---|
| 346 | #define PPCFG_RAMDISK_SIZE 350 ///< Size of the tmpfs, in megabytes, to attempt to mount (to speed up Mondo).
|
---|
| 347 |
|
---|
| 348 | #define DO_MBR_PLEASE "/tmp/DO-MBR-PLEASE"
|
---|
| 349 |
|
---|
| 350 |
|
---|
| 351 | /**
|
---|
[1144] | 352 | * Shorter log command
|
---|
[1054] | 353 | */
|
---|
[1144] | 354 | #define log_it(format, args...) mr_msg(2, format, ## args)
|
---|
[1054] | 355 |
|
---|
| 356 | #define DEFAULT_DVD_DISK_SIZE 4380 ///< The default size (in MB) of a DVD disk, unless the user says otherwise.
|
---|
| 357 |
|
---|
| 358 | #define DEFAULT_DEBUG_LEVEL 4 ///< By default, don't log messages with a loglevel higher than this.
|
---|
| 359 |
|
---|
| 360 | #define SZ_NTFSPROG_VOLSIZE "1048576" // was 4096
|
---|
| 361 | #define NTFSPROG_PARAMS "-z0 -V" SZ_NTFSPROG_VOLSIZE " -o -b -d -g1"
|
---|
| 362 |
|
---|
| 363 | #define MNT_CDROM "/mnt/cdrom"
|
---|
| 364 | #define MNT_FLOPPY "/mnt/floppy"
|
---|
| 365 |
|
---|
| 366 | #define DEFAULT_MR_LOGLEVEL 4
|
---|
| 367 |
|
---|
| 368 | #ifdef ENABLE_NLS
|
---|
| 369 | # include <libintl.h>
|
---|
| 370 | # undef _
|
---|
| 371 | # define _(String) dgettext (PACKAGE, String)
|
---|
| 372 | # ifdef gettext_noop
|
---|
| 373 | # define N_(String) gettext_noop (String)
|
---|
| 374 | # else
|
---|
| 375 | # define N_(String) (String)
|
---|
| 376 | # endif
|
---|
| 377 | #else
|
---|
| 378 | # define textdomain(String) (String)
|
---|
| 379 | # define gettext(String) (String)
|
---|
| 380 | # define dgettext(Domain,Message) (Message)
|
---|
| 381 | # define dcgettext(Domain,Message,Type) (Message)
|
---|
| 382 | # define bindtextdomain(Domain,Directory) (Domain)
|
---|
| 383 | # define _(String) (String)
|
---|
| 384 | # define N_(String) (String)
|
---|
| 385 |
|
---|
| 386 | #endif
|
---|
| 387 |
|
---|
| 388 |
|
---|
| 389 | #endif /* _MY_STUFF_H_ */
|
---|