comparison src/unexfreebsd.c @ 203:850242ba4a81 r20-3b28

Import from CVS: tag r20-3b28
author cvs
date Mon, 13 Aug 2007 10:02:21 +0200
parents ac2d302a0011
children 084402c475ba
comparison
equal deleted inserted replaced
202:61eefc8fc970 203:850242ba4a81
68 long endaddr; 68 long endaddr;
69 }; 69 };
70 70
71 /********************** Function Prototypes/Declarations ***********/ 71 /********************** Function Prototypes/Declarations ***********/
72 72
73 static void unexec_error (const char *m, int use_errno, ...); 73 static void unexec_error (CONST char *m, int use_errno, ...);
74 static int unexec_open (char *filename, int flag, int mode); 74 static int unexec_open (char *filename, int flag, int mode);
75 static caddr_t unexec_mmap (int fd, size_t len, int prot, int flags); 75 static caddr_t unexec_mmap (int fd, size_t len, int prot, int flags);
76 static long unexec_seek (int fd, long position); 76 static long unexec_seek (int fd, long position);
77 static void unexec_read (int fd, long position, char *buf, int bytes); 77 static void unexec_read (int fd, long position, char *buf, int bytes);
78 static void unexec_write (int fd, long position, char *buf, int bytes); 78 static void unexec_write (int fd, long position, char *buf, int bytes);
102 static unsigned long sbrk_of_0_at_unexec; 102 static unsigned long sbrk_of_0_at_unexec;
103 103
104 /*******************************************************************/ 104 /*******************************************************************/
105 105
106 static void 106 static void
107 unexec_error (const char *fmt, int use_errno, ...) 107 unexec_error (CONST char *fmt, int use_errno, ...)
108 { 108 {
109 const char *err_msg = SYS_ERR; 109 CONST char *err_msg = SYS_ERR;
110 va_list args; 110 va_list args;
111 111
112 fprintf (stderr, "unexec - "); 112 fprintf (stderr, "unexec - ");
113 va_start (args, use_errno); 113 va_start (args, use_errno);
114 vfprintf (stderr, fmt, args); 114 vfprintf (stderr, fmt, args);