2004-09-03 Roland McGrath <roland@redhat.com>
* syscall.c (sysent0, sysent1, sysent2, sysent): Add const to defn. (nsyscalls0, nsyscalls1, nsyscalls2): Likewise. (errnoent0, errnoent1, errnoent2, errnoent): Likewise. (nerrnos0, nerrnos1, nerrnos2): Likewise. * signal.c (signalent0, signalent1, signalent2): Likewise. (nsignals0, nsignals1, nsignals2): Likewise. (signame): LIkewise. * ioctl.c (ioctlent0, ioctlent1, ioctlent2): Likewise. (nioctlents0, nioctlents1, nioctlents2): Likewise. (ioctl_lookup, ioctl_next_match): Likewise. * defs.h: Update decls. * io.c (sys_ioctl): Update users.
This commit is contained in:
parent
4ee6e6970d
commit
ee36ce19e0
51
defs.h
51
defs.h
@ -451,7 +451,7 @@ extern int clearbpt P((struct tcb *));
|
||||
extern int setbpt P((struct tcb *));
|
||||
extern int sigishandled P((struct tcb *, int));
|
||||
extern void printcall P((struct tcb *));
|
||||
extern char *signame P((int));
|
||||
extern const char *signame P((int));
|
||||
extern void printsignal P((int));
|
||||
extern void printleader P((struct tcb *));
|
||||
extern void printtrailer P((struct tcb *));
|
||||
@ -469,8 +469,8 @@ extern int internal_exec P((struct tcb *));
|
||||
extern int internal_wait P((struct tcb *, int));
|
||||
extern int internal_exit P((struct tcb *));
|
||||
|
||||
extern struct ioctlent *ioctl_lookup P((long));
|
||||
extern struct ioctlent *ioctl_next_match P((struct ioctlent *));
|
||||
extern const struct ioctlent *ioctl_lookup P((long));
|
||||
extern const struct ioctlent *ioctl_next_match P((const struct ioctlent *));
|
||||
extern int ioctl_decode P((struct tcb *, long, long));
|
||||
extern int term_ioctl P((struct tcb *, long, long));
|
||||
extern int sock_ioctl P((struct tcb *, long, long));
|
||||
@ -523,49 +523,44 @@ struct sysent {
|
||||
int nargs;
|
||||
int sys_flags;
|
||||
int (*sys_func)();
|
||||
char *sys_name;
|
||||
const char *sys_name;
|
||||
};
|
||||
|
||||
extern struct sysent *sysent;
|
||||
extern const struct sysent *sysent;
|
||||
extern int nsyscalls;
|
||||
|
||||
extern char **errnoent;
|
||||
extern const char *const *errnoent;
|
||||
extern int nerrnos;
|
||||
|
||||
struct ioctlent {
|
||||
char *doth;
|
||||
char *symbol;
|
||||
const char *doth;
|
||||
const char *symbol;
|
||||
unsigned long code;
|
||||
};
|
||||
|
||||
extern struct ioctlent *ioctlent;
|
||||
extern int nioctlent;
|
||||
|
||||
extern char **signalent;
|
||||
extern int nsignals;
|
||||
|
||||
extern struct ioctlent *ioctlent;
|
||||
extern const struct ioctlent *ioctlent;
|
||||
extern int nioctlents;
|
||||
extern char **signalent;
|
||||
|
||||
extern const char *const *signalent;
|
||||
extern int nsignals;
|
||||
|
||||
extern struct ioctlent ioctlent0[];
|
||||
extern int nioctlents0;
|
||||
extern char *signalent0[];
|
||||
extern int nsignals0;
|
||||
extern const struct ioctlent ioctlent0[];
|
||||
extern const int nioctlents0;
|
||||
extern const char *const signalent0[];
|
||||
extern const int nsignals0;
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 2
|
||||
extern struct ioctlent ioctlent1[];
|
||||
extern int nioctlents1;
|
||||
extern char *signalent1[];
|
||||
extern int nsignals1;
|
||||
extern const struct ioctlent ioctlent1[];
|
||||
extern constint nioctlents1;
|
||||
extern const char *const signalent1[];
|
||||
extern const int nsignals1;
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 2 */
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 3
|
||||
extern struct ioctlent ioctlent2[];
|
||||
extern int nioctlents2;
|
||||
extern char *signalent2[];
|
||||
extern int nsignals2;
|
||||
extern const struct ioctlent ioctlent2[];
|
||||
extern const int nioctlents2;
|
||||
extern const char *const signalent2[];
|
||||
extern constint nsignals2;
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 3 */
|
||||
|
||||
#if defined(FREEBSD) || (defined(LINUX) \
|
||||
|
2
io.c
2
io.c
@ -353,7 +353,7 @@ int
|
||||
sys_ioctl(tcp)
|
||||
struct tcb *tcp;
|
||||
{
|
||||
struct ioctlent *iop;
|
||||
const struct ioctlent *iop;
|
||||
|
||||
if (entering(tcp)) {
|
||||
tprintf("%ld, ", tcp->u_arg[0]);
|
||||
|
25
ioctl.c
25
ioctl.c
@ -32,7 +32,7 @@
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
struct ioctlent ioctlent0[] = {
|
||||
const struct ioctlent ioctlent0[] = {
|
||||
/*
|
||||
* `ioctlent.h' may be generated from `ioctlent.raw' by the auxiliary
|
||||
* program `ioctlsort', such that the list is sorted by the `code' field.
|
||||
@ -47,25 +47,25 @@ struct ioctlent ioctlent0[] = {
|
||||
#include <asm/ioctl.h>
|
||||
#endif
|
||||
|
||||
int nioctlents0 = sizeof ioctlent0 / sizeof ioctlent0[0];
|
||||
const int nioctlents0 = sizeof ioctlent0 / sizeof ioctlent0[0];
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 2
|
||||
struct ioctlent ioctlent1[] = {
|
||||
const struct ioctlent ioctlent1[] = {
|
||||
#include "ioctlent1.h"
|
||||
};
|
||||
|
||||
int nioctlents1 = sizeof ioctlent1 / sizeof ioctlent1[0];
|
||||
const int nioctlents1 = sizeof ioctlent1 / sizeof ioctlent1[0];
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 2 */
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 3
|
||||
struct ioctlent ioctlent2[] = {
|
||||
const struct ioctlent ioctlent2[] = {
|
||||
#include "ioctlent2.h"
|
||||
};
|
||||
|
||||
int nioctlents2 = sizeof ioctlent2 / sizeof ioctlent2[0];
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 3 */
|
||||
|
||||
struct ioctlent *ioctlent;
|
||||
const struct ioctlent *ioctlent;
|
||||
int nioctlents;
|
||||
|
||||
static int
|
||||
@ -78,7 +78,7 @@ const void *b;
|
||||
return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0;
|
||||
}
|
||||
|
||||
struct ioctlent *
|
||||
const struct ioctlent *
|
||||
ioctl_lookup(code)
|
||||
long code;
|
||||
{
|
||||
@ -98,9 +98,9 @@ long code;
|
||||
return iop;
|
||||
}
|
||||
|
||||
struct ioctlent *
|
||||
const struct ioctlent *
|
||||
ioctl_next_match(iop)
|
||||
struct ioctlent *iop;
|
||||
const struct ioctlent *iop;
|
||||
{
|
||||
long code;
|
||||
|
||||
@ -130,9 +130,9 @@ long code, arg;
|
||||
case 0x89:
|
||||
#else /* !LINUX */
|
||||
case 'r': case 's': case 'i':
|
||||
#ifndef FREEBSD
|
||||
#ifndef FREEBSD
|
||||
case 'p':
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !LINUX */
|
||||
return sock_ioctl(tcp, code, arg);
|
||||
#ifdef USE_PROCFS
|
||||
@ -141,7 +141,7 @@ long code, arg;
|
||||
case 'q':
|
||||
#else
|
||||
case 'p':
|
||||
#endif
|
||||
#endif
|
||||
return proc_ioctl(tcp, code, arg);
|
||||
#endif
|
||||
#endif /* USE_PROCFS */
|
||||
@ -202,4 +202,3 @@ long code, arg;
|
||||
*
|
||||
* End of Registry
|
||||
*/
|
||||
|
||||
|
16
signal.c
16
signal.c
@ -153,26 +153,26 @@ struct sigcontext
|
||||
#endif
|
||||
#endif /* LINUX */
|
||||
|
||||
char *signalent0[] = {
|
||||
const char *const signalent0[] = {
|
||||
#include "signalent.h"
|
||||
};
|
||||
int nsignals0 = sizeof signalent0 / sizeof signalent0[0];
|
||||
const int nsignals0 = sizeof signalent0 / sizeof signalent0[0];
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 2
|
||||
char *signalent1[] = {
|
||||
const char *const signalent1[] = {
|
||||
#include "signalent1.h"
|
||||
};
|
||||
int nsignals1 = sizeof signalent1 / sizeof signalent1[0];
|
||||
const int nsignals1 = sizeof signalent1 / sizeof signalent1[0];
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 2 */
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 3
|
||||
char *signalent2[] = {
|
||||
const char *const signalent2[] = {
|
||||
#include "signalent2.h"
|
||||
};
|
||||
int nsignals2 = sizeof signalent2 / sizeof signalent2[0];
|
||||
const int nsignals2 = sizeof signalent2 / sizeof signalent2[0];
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 3 */
|
||||
|
||||
char **signalent;
|
||||
const char *const *signalent;
|
||||
int nsignals;
|
||||
|
||||
#if defined(SUNOS4) || defined(FREEBSD)
|
||||
@ -262,7 +262,7 @@ static const struct xlat sigprocmaskcmds[] = {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
char *
|
||||
const char *
|
||||
signame(sig)
|
||||
int sig;
|
||||
{
|
||||
|
28
syscall.c
28
syscall.c
@ -124,26 +124,26 @@
|
||||
#define TP TRACE_PROCESS
|
||||
#define TS TRACE_SIGNAL
|
||||
|
||||
struct sysent sysent0[] = {
|
||||
static const struct sysent sysent0[] = {
|
||||
#include "syscallent.h"
|
||||
};
|
||||
int nsyscalls0 = sizeof sysent0 / sizeof sysent0[0];
|
||||
static const int nsyscalls0 = sizeof sysent0 / sizeof sysent0[0];
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 2
|
||||
struct sysent sysent1[] = {
|
||||
static const struct sysent sysent1[] = {
|
||||
#include "syscallent1.h"
|
||||
};
|
||||
int nsyscalls1 = sizeof sysent1 / sizeof sysent1[0];
|
||||
static const int nsyscalls1 = sizeof sysent1 / sizeof sysent1[0];
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 2 */
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 3
|
||||
struct sysent sysent2[] = {
|
||||
static const struct sysent sysent2[] = {
|
||||
#include "syscallent2.h"
|
||||
};
|
||||
int nsyscalls2 = sizeof sysent2 / sizeof sysent2[0];
|
||||
static const int nsyscalls2 = sizeof sysent2 / sizeof sysent2[0];
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 3 */
|
||||
|
||||
struct sysent *sysent;
|
||||
const struct sysent *sysent;
|
||||
int nsyscalls;
|
||||
|
||||
/* Now undef them since short defines cause wicked namespace pollution. */
|
||||
@ -153,26 +153,26 @@ int nsyscalls;
|
||||
#undef TP
|
||||
#undef TS
|
||||
|
||||
char *errnoent0[] = {
|
||||
static const char *const errnoent0[] = {
|
||||
#include "errnoent.h"
|
||||
};
|
||||
int nerrnos0 = sizeof errnoent0 / sizeof errnoent0[0];
|
||||
static const int nerrnos0 = sizeof errnoent0 / sizeof errnoent0[0];
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 2
|
||||
char *errnoent1[] = {
|
||||
static const char *const errnoent1[] = {
|
||||
#include "errnoent1.h"
|
||||
};
|
||||
int nerrnos1 = sizeof errnoent1 / sizeof errnoent1[0];
|
||||
static const int nerrnos1 = sizeof errnoent1 / sizeof errnoent1[0];
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 2 */
|
||||
|
||||
#if SUPPORTED_PERSONALITIES >= 3
|
||||
char *errnoent2[] = {
|
||||
static const char *const errnoent2[] = {
|
||||
#include "errnoent2.h"
|
||||
};
|
||||
int nerrnos2 = sizeof errnoent2 / sizeof errnoent2[0];
|
||||
static const int nerrnos2 = sizeof errnoent2 / sizeof errnoent2[0];
|
||||
#endif /* SUPPORTED_PERSONALITIES >= 3 */
|
||||
|
||||
char **errnoent;
|
||||
const char *const *errnoent;
|
||||
int nerrnos;
|
||||
|
||||
int current_personality;
|
||||
|
Loading…
Reference in New Issue
Block a user