Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177540753
D22950.1794669180.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
787 B
Referenced Files
None
Subscribers
None
D22950.1794669180.diff
View Options
Index: sys/compat/linux/linux_stats.c
===================================================================
--- sys/compat/linux/linux_stats.c
+++ sys/compat/linux/linux_stats.c
@@ -65,6 +65,11 @@
{
int major, minor;
+ if (vp->v_type == VCHR && vn_isdisk(vp, NULL)) {
+ sb->st_mode &= ~S_IFMT;
+ sb->st_mode |= S_IFBLK;
+ }
+
if (vp->v_type == VCHR && vp->v_rdev != NULL &&
linux_driver_get_major_minor(devtoname(vp->v_rdev),
&major, &minor) == 0) {
@@ -114,6 +119,10 @@
fget(td, fd, &cap_no_rights, &fp) != 0)
return;
vp = fp->f_vnode;
+ if (vn_isdisk(vp, NULL)) {
+ buf->st_mode &= ~S_IFMT;
+ buf->st_mode |= S_IFBLK;
+ }
if (vp != NULL && vp->v_rdev != NULL &&
linux_driver_get_major_minor(devtoname(vp->v_rdev),
&major, &minor) == 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 3:13 PM (7 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41725843
Default Alt Text
D22950.1794669180.diff (787 B)
Attached To
Mode
D22950: Report block devices as such to Linux binaries
Attached
Detach File
Event Timeline