Put definition of struct svr4_sockcache_entry in a .h file rather than

having two independent definitions in two .c files.
Fiddle surrounding details to match.

Found by:       FlexeLint
This commit is contained in:
Poul-Henning Kamp 2003-05-31 20:33:18 +00:00
parent 670966596b
commit 66f7a83274
5 changed files with 15 additions and 23 deletions

View File

@ -62,18 +62,6 @@
#include <compat/svr4/svr4_sockmod.h>
#include <compat/svr4/svr4_proto.h>
struct svr4_sockcache_entry {
struct proc *p; /* Process for the socket */
void *cookie; /* Internal cookie used for matching */
struct sockaddr_un sock;/* Pathname for the socket */
udev_t dev; /* Device where the socket lives on */
ino_t ino; /* Inode where the socket lives on */
TAILQ_ENTRY(svr4_sockcache_entry) entries;
};
extern TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry) svr4_head;
extern int svr4_str_initialized;
struct sockaddr_un *
svr4_find_socket(td, fp, dev, ino)
struct thread *td;

View File

@ -53,4 +53,17 @@ struct sockaddr_un *svr4_find_socket(struct thread *, struct file *,
void svr4_delete_socket(struct proc *, struct file *);
int svr4_add_socket(struct thread *, const char *, struct stat *);
struct svr4_sockcache_entry {
struct proc *p; /* Process for the socket */
void *cookie; /* Internal cookie used for matching */
struct sockaddr_un sock;/* Pathname for the socket */
udev_t dev; /* Device where the socket lives on */
ino_t ino; /* Inode where the socket lives on */
TAILQ_ENTRY(svr4_sockcache_entry) entries;
};
TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry);
extern struct svr4_sockcache_head svr4_head;
extern int svr4_str_initialized;
#endif /* _SVR4_SOCKET_H_ */

View File

@ -39,6 +39,7 @@
#include <sys/time.h>
#include <sys/sysctl.h>
#include <sys/sysproto.h>
#include <sys/un.h>
#include <vm/vm.h>

View File

@ -61,7 +61,6 @@
#include <compat/svr4/svr4_syscall.h>
#include <compat/svr4/svr4_signal.h>
#include <compat/svr4/svr4_sockio.h>
#include <compat/svr4/svr4_socket.h>
#include <compat/svr4/svr4_errno.h>
#include <compat/svr4/svr4_proto.h>
#include <compat/svr4/svr4_siginfo.h>

View File

@ -65,16 +65,7 @@ static int svr4_soo_close(struct file *, struct thread *);
static int svr4_ptm_alloc(struct thread *);
static d_open_t streamsopen;
struct svr4_sockcache_entry {
struct proc *p; /* Process for the socket */
void *cookie; /* Internal cookie used for matching */
struct sockaddr_un sock;/* Pathname for the socket */
dev_t dev; /* Device where the socket lives on */
ino_t ino; /* Inode where the socket lives on */
TAILQ_ENTRY(svr4_sockcache_entry) entries;
};
TAILQ_HEAD(svr4_sockcache_head, svr4_sockcache_entry) svr4_head;
struct svr4_sockcache_head svr4_head;
/* Initialization flag (set/queried by svr4_mod LKM) */
int svr4_str_initialized = 0;