Minor namespace cleanup.
* defs.h (string_quote): Remove declaration.
* file.c (openmodessol) [LINUXSPARC]: Make static.
(fileflags): Likewise.
(aclcmds, aclipc) [HAVE_SYS_ACL_H]: Likewise.
(direnttypes) [FREEBSD || LINUX]: Likewise.
(xattrflags): Likewise.
* process.c (unalignctl_string): Make static.
(setarg): Disable.
* syscall.c (subcalls_table): Make static.
(socket_map) [!(LINUX && (ALPHA || MIPS))]: Likewise.
(sparc_socket_decode): Make static, define for [SPARC || SPARC64] only.
(decode_subcall): Make static.
(syscall_fixup): Likewise.
(get_error): Likewise.
(syscall_enter): Likewise.
* util.c (tv_tv): Disable.
(getpc): Likewise.
(string_quote): Make static.
Fixes RH#159688.
extern int upeek P((int, long, long *));
extern void dumpiov P((struct tcb *, int, long));
extern void dumpstr P((struct tcb *, long, int));
-extern void string_quote P((char *str));
extern void printstr P((struct tcb *, long, int));
extern void printnum P((struct tcb *, long, char *));
extern void printpath P((struct tcb *, long));
}
#ifdef LINUXSPARC
-const struct xlat openmodessol[] = {
+static const struct xlat openmodessol[] = {
{ 0, "O_RDWR" },
{ 1, "O_RDONLY" },
{ 2, "O_WRONLY" },
#endif /* SPARC64 */
#endif /* LINUXSPARC */
-const struct xlat fileflags[] = {
+static const struct xlat fileflags[] = {
#ifdef FREEBSD
{ UF_NODUMP, "UF_NODUMP" },
{ UF_IMMUTABLE, "UF_IMMUTABLE" },
#include <sys/acl.h>
-const struct xlat aclcmds[] = {
+static const struct xlat aclcmds[] = {
#ifdef SETACL
{ SETACL, "SETACL" },
#endif
}
-const struct xlat aclipc[] = {
+static const struct xlat aclipc[] = {
#ifdef IPC_SHM
{ IPC_SHM, "IPC_SHM" },
#endif
#endif /* LINUX */
#if defined FREEBSD || defined LINUX
-const struct xlat direnttypes[] = {
+static const struct xlat direnttypes[] = {
{ DT_UNKNOWN, "DT_UNKNOWN" },
{ DT_FIFO, "DT_FIFO" },
{ DT_CHR, "DT_CHR" },
#endif /* HAVE_SYS_ASYNCH_H */
-const struct xlat xattrflags[] = {
+static const struct xlat xattrflags[] = {
#ifdef XATTR_CREATE
{ XATTR_CREATE, "XATTR_CREATE" },
{ XATTR_REPLACE, "XATTR_REPLACE" },
};
-const char *
+static const char *
unalignctl_string (unsigned int ctl)
{
static char buf[16];
return -1;
}
+#if 0
int
setarg(tcp, argnum)
struct tcb *tcp;
#endif
return 0;
}
+#endif
#if defined SYS_clone || defined SYS_clone2
int
int subcalls[5];
};
-const struct subcall subcalls_table[] = {
+static const struct subcall subcalls_table[] = {
{ SYS_shmsys, 5, { SYS_shmat, SYS_shmctl, SYS_shmdt, SYS_shmget, SYS_shmctl } },
#ifdef SYS_semconfig
{ SYS_semsys, 4, { SYS___semctl, SYS_semget, SYS_semop, SYS_semconfig } },
#if !(defined(LINUX) && ( defined(ALPHA) || defined(MIPS) ))
-const int socket_map [] = {
+static const int socket_map [] = {
/* SYS_SOCKET */ 97,
/* SYS_BIND */ 104,
/* SYS_CONNECT */ 98,
/* SYS_RECVMSG */ 113
};
-void
+#if defined (SPARC) || defined (SPARC64)
+static void
sparc_socket_decode (tcp)
struct tcb *tcp;
{
addr += sizeof (arg);
}
}
+#endif
-void
+static void
decode_subcall(tcp, subcall, nsubcalls, style)
struct tcb *tcp;
int subcall;
return scno;
}
-int
+static int
syscall_fixup(tcp)
struct tcb *tcp;
{
return 1;
}
-int
+static int
get_error(tcp)
struct tcb *tcp;
{
return 0;
}
-int syscall_enter(tcp)
+static int
+syscall_enter(tcp)
struct tcb *tcp;
{
#ifndef USE_PROCFS
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
+#if 0
void
tv_tv(tv, a, b)
struct timeval *tv;
tv->tv_sec = a;
tv->tv_usec = b;
}
+#endif
int
tv_nz(a)
static char path[MAXPATHLEN + 1];
-void
+static void
string_quote(str)
-char *str;
+const char *str;
{
char buf[2 * MAXPATHLEN + 1];
char *s;
#endif /* !USE_PROCFS */
+#if 0
long
getpc(tcp)
struct tcb *tcp;
return regs.r_eip;
#endif /* FREEBSD */
}
+#endif
void
printcall(tcp)