From 6f0783f05f1ec037bea1619306aff367b7f50d47 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 29 May 2002 08:34:38 +0000 Subject: 2002-05-29 Roland McGrath * linux-src/include/linux/net.h (struct socket) [_HURD_]: New member `st_ino'. * io-ops.c (S_io_stat, S_io_identity): Use that. * socket.c (sock_alloc): Initialize it with a monotonic counter. --- pfinet/socket.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pfinet/socket.c') diff --git a/pfinet/socket.c b/pfinet/socket.c index 82935a57..d56c1794 100644 --- a/pfinet/socket.c +++ b/pfinet/socket.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995,2000 Free Software Foundation, Inc. + Copyright (C) 1995,2000,02 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -41,6 +41,7 @@ sock_register (struct net_proto_family *fam) struct socket * sock_alloc (void) { + static ino_t nextino; /* locked by global_lock */ struct socket *sock; struct condition *c; @@ -55,6 +56,10 @@ sock_alloc (void) sock->refcnt = 1; sock->wait = (void *) c; + if (nextino == 0) + nextino = 2; + sock->st_ino = nextino++; + return sock; } -- cgit v1.2.3