Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159197051
D22950.id66080.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
787 B
Referenced Files
None
Subscribers
None
D22950.id66080.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
Fri, Jun 12, 5:19 AM (11 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33900287
Default Alt Text
D22950.id66080.diff (787 B)
Attached To
Mode
D22950: Report block devices as such to Linux binaries
Attached
Detach File
Event Timeline
Log In to Comment