2005-06-08 Dmitry V. Levin <ldv@altlinux.org>
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.
diff --git a/defs.h b/defs.h
index 24cf19c..89eaddb 100644
--- a/defs.h
+++ b/defs.h
@@ -435,7 +435,6 @@
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));
diff --git a/file.c b/file.c
index db6b60a..dd825b0 100644
--- a/file.c
+++ b/file.c
@@ -325,7 +325,7 @@
}
#ifdef LINUXSPARC
-const struct xlat openmodessol[] = {
+static const struct xlat openmodessol[] = {
{ 0, "O_RDWR" },
{ 1, "O_RDONLY" },
{ 2, "O_WRONLY" },
@@ -753,7 +753,7 @@
#endif /* SPARC64 */
#endif /* LINUXSPARC */
-const struct xlat fileflags[] = {
+static const struct xlat fileflags[] = {
#ifdef FREEBSD
{ UF_NODUMP, "UF_NODUMP" },
{ UF_IMMUTABLE, "UF_IMMUTABLE" },
@@ -1296,7 +1296,7 @@
#include <sys/acl.h>
-const struct xlat aclcmds[] = {
+static const struct xlat aclcmds[] = {
#ifdef SETACL
{ SETACL, "SETACL" },
#endif
@@ -1361,7 +1361,7 @@
}
-const struct xlat aclipc[] = {
+static const struct xlat aclipc[] = {
#ifdef IPC_SHM
{ IPC_SHM, "IPC_SHM" },
#endif
@@ -1987,7 +1987,7 @@
#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" },
@@ -2323,7 +2323,7 @@
#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" },
diff --git a/process.c b/process.c
index 2d8cb0a..f9cffe4 100644
--- a/process.c
+++ b/process.c
@@ -220,7 +220,7 @@
};
-const char *
+static const char *
unalignctl_string (unsigned int ctl)
{
static char buf[16];
@@ -701,6 +701,7 @@
return -1;
}
+#if 0
int
setarg(tcp, argnum)
struct tcb *tcp;
@@ -778,6 +779,7 @@
#endif
return 0;
}
+#endif
#if defined SYS_clone || defined SYS_clone2
int
diff --git a/syscall.c b/syscall.c
index 34fc072..675b3f4 100644
--- a/syscall.c
+++ b/syscall.c
@@ -513,7 +513,7 @@
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 } },
@@ -526,7 +526,7 @@
#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,
@@ -546,7 +546,8 @@
/* SYS_RECVMSG */ 113
};
-void
+#if defined (SPARC) || defined (SPARC64)
+static void
sparc_socket_decode (tcp)
struct tcb *tcp;
{
@@ -567,8 +568,9 @@
addr += sizeof (arg);
}
}
+#endif
-void
+static void
decode_subcall(tcp, subcall, nsubcalls, style)
struct tcb *tcp;
int subcall;
@@ -1277,7 +1279,7 @@
return scno;
}
-int
+static int
syscall_fixup(tcp)
struct tcb *tcp;
{
@@ -1421,7 +1423,7 @@
return 1;
}
-int
+static int
get_error(tcp)
struct tcb *tcp;
{
@@ -1855,7 +1857,8 @@
return 0;
}
-int syscall_enter(tcp)
+static int
+syscall_enter(tcp)
struct tcb *tcp;
{
#ifndef USE_PROCFS
diff --git a/util.c b/util.c
index a5ade41..d65f42c 100644
--- a/util.c
+++ b/util.c
@@ -148,6 +148,7 @@
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
+#if 0
void
tv_tv(tv, a, b)
struct timeval *tv;
@@ -157,6 +158,7 @@
tv->tv_sec = a;
tv->tv_usec = b;
}
+#endif
int
tv_nz(a)
@@ -358,9 +360,9 @@
static char path[MAXPATHLEN + 1];
-void
+static void
string_quote(str)
-char *str;
+const char *str;
{
char buf[2 * MAXPATHLEN + 1];
char *s;
@@ -976,6 +978,7 @@
#endif /* !USE_PROCFS */
+#if 0
long
getpc(tcp)
struct tcb *tcp;
@@ -1053,6 +1056,7 @@
return regs.r_eip;
#endif /* FREEBSD */
}
+#endif
void
printcall(tcp)