Call pipe_stat() when presented with a DTYPE_PIPE file in the linux

fstat() syscall, rather than panic("linux newfstat").

(Note: I've extracted this from a larger set of diffs, I'm confident I've
 not missed any dependencies but can't modload it to test it on my system)
This commit is contained in:
Peter Wemm 1996-01-30 12:23:17 +00:00
parent 685a5a0b51
commit 8cbf6e5894
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13739
2 changed files with 10 additions and 2 deletions

View file

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_stats.c,v 1.2 1995/08/28 09:18:38 julian Exp $
* $Id: linux_stats.c,v 1.3 1995/11/22 07:43:51 bde Exp $
*/
#include <sys/param.h>
@ -39,6 +39,7 @@
#include <sys/socketvar.h>
#include <sys/stat.h>
#include <sys/vnode.h>
#include <sys/pipe.h>
#include <i386/linux/linux.h>
#include <i386/linux/sysproto.h>
@ -163,6 +164,9 @@ linux_newfstat(struct proc *p, struct linux_newfstat_args *args, int *retval)
case DTYPE_SOCKET:
error = soo_stat((struct socket *)fp->f_data, &buf);
break;
case DTYPE_PIPE:
error = pipe_stat((struct pipe *)fp->f_data, &buf);
break;
default:
panic("LINUX newfstat");
}

View file

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_stats.c,v 1.2 1995/08/28 09:18:38 julian Exp $
* $Id: linux_stats.c,v 1.3 1995/11/22 07:43:51 bde Exp $
*/
#include <sys/param.h>
@ -39,6 +39,7 @@
#include <sys/socketvar.h>
#include <sys/stat.h>
#include <sys/vnode.h>
#include <sys/pipe.h>
#include <i386/linux/linux.h>
#include <i386/linux/sysproto.h>
@ -163,6 +164,9 @@ linux_newfstat(struct proc *p, struct linux_newfstat_args *args, int *retval)
case DTYPE_SOCKET:
error = soo_stat((struct socket *)fp->f_data, &buf);
break;
case DTYPE_PIPE:
error = pipe_stat((struct pipe *)fp->f_data, &buf);
break;
default:
panic("LINUX newfstat");
}