Changeset 1074 in MondoRescue for trunk/mondo/src/include


Ignore:
Timestamp:
Jan 25, 2007, 4:18:12 PM (17 years ago)
Author:
Bruno Cornec
Message:

This version of trunk desn't seg fault on mr_msg anymore.
Still not ready for 3.0.0 but improvements ongoing

Location:
trunk/mondo/src/include
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/include/mr_conf.h

    r852 r1074  
    1919/*initialization and closing*/
    2020extern int mr_conf_open(const char *filename);
    21 extern void mr_conf_close();
     21extern void mr_conf_close(void);
    2222
    2323/*read integer number after string str in the current file*/
  • trunk/mondo/src/include/mr_err.h

    r900 r1074  
    1111/* functions (public methods) */
    1212
    13 extern void mr_exit(int errorcode, const char *message);
    14 extern void mr_log_exit(int errorcode, const char *message);
     13extern inline void mr_exit(int errorcode, const char *message);
     14extern inline void mr_log_exit(int errorcode, const char *message);
    1515
    1616#endif                          /* MR_ERR_H */
  • trunk/mondo/src/include/mr_mem.h

    r900 r1074  
    99#define MR_MEM_H
    1010
     11#ifndef _GNU_SOURCE
     12#define _GNU_SOURCE
     13#endif
     14#include <stdarg.h>
     15
    1116/* functions (public methods) */
    1217
    13 extern void mr_free(char *allocated);
    14 extern void mr_allocstr(char *alloc, const char *orig);
    15 extern void mr_asprintf(char **alloc, const char *fmt, ...);
    16 extern void mr_vasprintf(char **alloc, const char *fmt, va_list ap);
    17 extern void mr_getline(char **lineptr, size_t *n, FILE *stream);
    18 extern void *mr_malloc(size_t size);
     18extern inline void mr_free(char *allocated);
     19extern inline void mr_allocstr(char *alloc, const char *orig);
     20extern inline void mr_asprintf(char **alloc, const char *fmt, ...);
     21extern inline void mr_getline(char **lineptr, size_t *n, FILE *stream);
     22extern inline void *mr_malloc(size_t size);
    1923
    2024#endif                          /* MR_MEM_H */
  • trunk/mondo/src/include/mr_msg.h

    r900 r1074  
    99#define MR_MSG_H
    1010
     11#ifndef _GNU_SOURCE
     12#define _GNU_SOURCE
     13#endif
     14#include <stdarg.h>
     15
    1116/* functions (public methods) */
    1217
    13 extern void _mr_msg(int debug, const char *file, const char *function, int line, const char *fmt, ...);
    14 
    15 #define mr_msg(level, format, args...) _mr_msg(level, __FILE__, __FUNCTION__, __LINE__, format, ## args)
     18extern inline void mr_msg(int debug, const char *fmt, ...);
     19extern void mr_msg_init(const char *configfile, int loglevel);
     20extern void mr_msg_close(void);
    1621
    1722#endif                          /* MR_MSG_H */
  • trunk/mondo/src/include/mr_str.h

    r900 r1074  
    1111/* functions (public methods) */
    1212
    13 extern char *mr_strtok(char *instr, const char *delims, int *lastpos);
    14 extern char *mr_stresc(char *instr, char *toesc, const char escchr);
     13extern inline char *mr_strtok(char *instr, const char *delims, int *lastpos);
     14extern inline char *mr_stresc(char *instr, char *toesc, const char escchr);
    1515
    1616#endif                          /* MR_STR_H */
  • trunk/mondo/src/include/my-stuff.h

    r973 r1074  
    88#define _MY_STUFF_H_
    99
    10 /* BERLIOS
    11 #define HAVE_MALLOC 1
    12 */
    13 
    1410// Extra info for ACLs and SELINUX users
    1511#define STAR_ACL_SZ "-xfflags -acl"
    16 //#define STAR_ACL_SZ "-xfflags"
    17 //#define STAR_ACL_SZ ""
    18 // Enable the first line and disable the second if you are a Fedora Core 2 user
     12
     13/*The number of lines of log output to keep at the bottom of the screen.*/
     14#define NOOF_ERR_LINES  6   
     15
     16#define paranoid_free(exp) mr_free(exp)
    1917
    2018/**
     
    5351
    5452#include <stdlib.h>
    55 /* BERLIOS
    56 #ifndef  __USE_FILE_OFFSET64
    57 #define  __USE_FILE_OFFSET64
    58 #endif
    59 #ifndef  __USE_LARGEFILE64
    60 #define  __USE_LARGEFILE64
    61 #endif
    62 */
    6353#include <sys/stat.h>
    6454#include <fcntl.h>
     
    7969#endif
    8070#include <assert.h>
    81 
    82 /*
    83 #if defined(DEBUG) && !__cplusplus
    84 int count;
    85 char trace_log[255];
    86 char *trace_log_ptr;
    87 #endif
    88 */
    8971
    9072#define STD_PREFIX "mondorescue"
     
    210192
    211193/**
    212  * @c mkisofs command to generate a bootable CD using LILO, except for -o option and the directory to image.
    213  */
    214 // -b images/mindi-boot.2880.img
    215 
    216 /**
    217  * @c mkisofs command to generate a bootable CD using ELILO, except for -o option and the directory to image.
    218  */
    219 // -b images/mindi-boot.2880.img
    220 // Should replace 8192 by IA64_BOOT_SIZE
    221 
    222 /**
    223194 * The stub name of the temporary ISO image to create, burn, and remove.
    224195 */
     
    332303#define VANILLA_SCSI_CDROM  "/dev/cd0"
    333304#define VANILLA_SCSI_TAPE   "/dev/sa"
     305#define VANILLA_USB_DEVICE  "/dev/tobegivenbyfreebsdguru"
    334306#define DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE  "/dev/vinum/"
    335307#define RAID_DEVICE_STUB    DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE
     
    341313#define VANILLA_SCSI_CDROM  "/dev/scd0"
    342314#define VANILLA_SCSI_TAPE   "/dev/st"
     315#define VANILLA_USB_DEVICE  "/dev/hda"
    343316#define DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE  "/dev/md"
    344317#define RAID_DEVICE_STUB    DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE
Note: See TracChangeset for help on using the changeset viewer.