Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153819563
D23386.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
D23386.diff
View Options
Index: head/sys/compat/linuxkpi/common/src/linux_compat.c
===================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -1526,7 +1526,9 @@
struct linux_file *filp;
const struct file_operations *fop;
struct linux_cdev *ldev;
- int error;
+ struct fiodgname_arg *fgn;
+ const char *p;
+ int error, i;
error = 0;
filp = (struct linux_file *)fp->f_data;
@@ -1553,6 +1555,23 @@
break;
case FIOGETOWN:
*(int *)data = fgetown(&filp->f_sigio);
+ break;
+ case FIODGNAME:
+#ifdef COMPAT_FREEBSD32
+ case FIODGNAME_32:
+#endif
+ if (filp->f_cdev == NULL || filp->f_cdev->cdev == NULL) {
+ error = ENXIO;
+ break;
+ }
+ fgn = data;
+ p = devtoname(filp->f_cdev->cdev);
+ i = strlen(p) + 1;
+ if (i > fgn->len) {
+ error = EINVAL;
+ break;
+ }
+ error = copyout(p, fiodgname_buf_get_ptr(fgn, cmd), i);
break;
default:
error = linux_file_ioctl_sub(fp, filp, fop, cmd, data, td);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 25, 12:30 AM (7 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32079677
Default Alt Text
D23386.diff (1 KB)
Attached To
Mode
D23386: Provide support for fdevname(3) on linuxkpi-backed devices.
Attached
Detach File
Event Timeline
Log In to Comment