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