Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157999522
D26816.id78504.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
D26816.id78504.diff
View Options
Index: sys/compat/linprocfs/linprocfs.c
===================================================================
--- sys/compat/linprocfs/linprocfs.c
+++ sys/compat/linprocfs/linprocfs.c
@@ -1276,6 +1276,27 @@
}
/*
+ * Filler function for proc/pid/mem
+ */
+static int
+linprocfs_doprocmem(PFS_FILL_ARGS)
+{
+ ssize_t resid;
+ int error;
+
+ resid = uio->uio_resid;
+ error = procfs_doprocmem(PFS_FILL_ARGNAMES);
+
+ if (uio->uio_rw == UIO_READ && resid != uio->uio_resid)
+ return (0);
+
+ if (error == EFAULT)
+ error = EIO;
+
+ return (error);
+}
+
+/*
* Criteria for interface name translation
*/
#define IFP_IS_ETH(ifp) (ifp->if_type == IFT_ETHER)
@@ -1853,7 +1874,7 @@
NULL, &procfs_notsystem, NULL, 0);
pfs_create_file(dir, "maps", &linprocfs_doprocmaps,
NULL, NULL, NULL, PFS_RD);
- pfs_create_file(dir, "mem", &procfs_doprocmem,
+ pfs_create_file(dir, "mem", &linprocfs_doprocmem,
procfs_attr_rw, &procfs_candebug, NULL, PFS_RDWR | PFS_RAW);
pfs_create_file(dir, "mounts", &linprocfs_domtab,
NULL, NULL, NULL, PFS_RD);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 28, 8:29 AM (27 m, 18 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33581417
Default Alt Text
D26816.id78504.diff (1 KB)
Attached To
Mode
D26816: Fix linprocfs(4) /proc/self/mem semantics
Attached
Detach File
Event Timeline
Log In to Comment