comparison src/unexhp9k3.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 c42ec1d1cded
comparison
equal deleted inserted replaced
202:61eefc8fc970 203:850242ba4a81
69 69
70 #define MASK_DOWN(x,p_of_two) (((unsigned long) (x)) & (~((p_of_two) - 1))) 70 #define MASK_DOWN(x,p_of_two) (((unsigned long) (x)) & (~((p_of_two) - 1)))
71 71
72 /********************** Function Prototypes/Declarations ***********/ 72 /********************** Function Prototypes/Declarations ***********/
73 73
74 static void unexec_error (const char *fmt, int use_errno, ...); 74 static void unexec_error (CONST char *fmt, int use_errno, ...);
75 static int unexec_open (char *filename, int flag, int mode); 75 static int unexec_open (char *filename, int flag, int mode);
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);
79 static void unexec_copy (int new_fd, int old_fd, long old_pos, long new_pos, 79 static void unexec_copy (int new_fd, int old_fd, long old_pos, long new_pos,
94 static unsigned long sbrk_of_0_at_unexec; 94 static unsigned long sbrk_of_0_at_unexec;
95 95
96 /*******************************************************************/ 96 /*******************************************************************/
97 97
98 static void 98 static void
99 unexec_error (const char *fmt, int use_errno, ...) 99 unexec_error (CONST char *fmt, int use_errno, ...)
100 { 100 {
101 const char *err_msg = SYS_ERR; 101 CONST char *err_msg = SYS_ERR;
102 va_list args; 102 va_list args;
103 103
104 fprintf (stderr, "unexec - "); 104 fprintf (stderr, "unexec - ");
105 va_start (args, use_errno); 105 va_start (args, use_errno);
106 vfprintf (stderr, fmt, args); 106 vfprintf (stderr, fmt, args);