Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151902187
D30517.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30517.id.diff
View Options
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -45,6 +45,8 @@
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/namei.h>
+#include <sys/selinfo.h>
+#include <sys/pipe.h>
#include <sys/proc.h>
#include <sys/stat.h>
#include <sys/sx.h>
@@ -1524,6 +1526,7 @@
{
struct l_flock linux_flock;
struct flock bsd_flock;
+ struct pipe *fpipe;
struct file *fp;
long arg;
int error, result;
@@ -1655,6 +1658,21 @@
case LINUX_F_ADD_SEALS:
return (kern_fcntl(td, args->fd, F_ADD_SEALS,
linux_to_bsd_bits(args->arg, seal_bitmap, 0)));
+
+ case LINUX_F_GETPIPE_SZ:
+ error = fget(td, args->fd,
+ &cap_fcntl_rights, &fp);
+ if (error != 0)
+ return (error);
+ if (fp->f_type != DTYPE_PIPE) {
+ fdrop(fp, td);
+ return (EINVAL);
+ }
+ fpipe = fp->f_data;
+ td->td_retval[0] = fpipe->pipe_buffer.size;
+ fdrop(fp, td);
+ return (0);
+
default:
linux_msg(td, "unsupported fcntl cmd %d", args->cmd);
return (EINVAL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 12, 11:02 AM (12 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31344038
Default Alt Text
D30517.id.diff (1 KB)
Attached To
Mode
D30517: linux(4): Implement F_GETPIPE_SZ.
Attached
Detach File
Event Timeline
Log In to Comment