sys_pipe.c (197134) | sys_pipe.c (205792) |
---|---|
1/*- 2 * Copyright (c) 1996 John S. Dyson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 75 unchanged lines hidden (view full) --- 84 * both directions of a pipe. 85 * 86 * As pipelock() may have to sleep before it can acquire the flag, it 87 * is important to reread all data after a call to pipelock(); everything 88 * in the structure may have changed. 89 */ 90 91#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1996 John S. Dyson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 75 unchanged lines hidden (view full) --- 84 * both directions of a pipe. 85 * 86 * As pipelock() may have to sleep before it can acquire the flag, it 87 * is important to reread all data after a call to pipelock(); everything 88 * in the structure may have changed. 89 */ 90 91#include <sys/cdefs.h> |
92__FBSDID("$FreeBSD: head/sys/kern/sys_pipe.c 197134 2009-09-12 20:03:45Z rwatson $"); | 92__FBSDID("$FreeBSD: head/sys/kern/sys_pipe.c 205792 2010-03-28 13:13:22Z ed $"); |
93 94#include <sys/param.h> 95#include <sys/systm.h> 96#include <sys/fcntl.h> 97#include <sys/file.h> 98#include <sys/filedesc.h> 99#include <sys/filio.h> 100#include <sys/kernel.h> --- 1322 unchanged lines hidden (view full) --- 1423 bzero(ub, sizeof(*ub)); 1424 ub->st_mode = S_IFIFO; 1425 ub->st_blksize = PAGE_SIZE; 1426 if (pipe->pipe_state & PIPE_DIRECTW) 1427 ub->st_size = pipe->pipe_map.cnt; 1428 else 1429 ub->st_size = pipe->pipe_buffer.cnt; 1430 ub->st_blocks = (ub->st_size + ub->st_blksize - 1) / ub->st_blksize; | 93 94#include <sys/param.h> 95#include <sys/systm.h> 96#include <sys/fcntl.h> 97#include <sys/file.h> 98#include <sys/filedesc.h> 99#include <sys/filio.h> 100#include <sys/kernel.h> --- 1322 unchanged lines hidden (view full) --- 1423 bzero(ub, sizeof(*ub)); 1424 ub->st_mode = S_IFIFO; 1425 ub->st_blksize = PAGE_SIZE; 1426 if (pipe->pipe_state & PIPE_DIRECTW) 1427 ub->st_size = pipe->pipe_map.cnt; 1428 else 1429 ub->st_size = pipe->pipe_buffer.cnt; 1430 ub->st_blocks = (ub->st_size + ub->st_blksize - 1) / ub->st_blksize; |
1431 ub->st_atimespec = pipe->pipe_atime; 1432 ub->st_mtimespec = pipe->pipe_mtime; 1433 ub->st_ctimespec = pipe->pipe_ctime; | 1431 ub->st_atim = pipe->pipe_atime; 1432 ub->st_mtim = pipe->pipe_mtime; 1433 ub->st_ctim = pipe->pipe_ctime; |
1434 ub->st_uid = fp->f_cred->cr_uid; 1435 ub->st_gid = fp->f_cred->cr_gid; 1436 /* 1437 * Left as 0: st_dev, st_ino, st_nlink, st_rdev, st_flags, st_gen. 1438 * XXX (st_dev, st_ino) should be unique. 1439 */ 1440 return (0); 1441} --- 209 unchanged lines hidden --- | 1434 ub->st_uid = fp->f_cred->cr_uid; 1435 ub->st_gid = fp->f_cred->cr_gid; 1436 /* 1437 * Left as 0: st_dev, st_ino, st_nlink, st_rdev, st_flags, st_gen. 1438 * XXX (st_dev, st_ino) should be unique. 1439 */ 1440 return (0); 1441} --- 209 unchanged lines hidden --- |