Bug 218626 - [PATCH] cuse: new error code CUSE_ERR_NO_DEVICE (ENODEV)
Summary: [PATCH] cuse: new error code CUSE_ERR_NO_DEVICE (ENODEV)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-04-13 11:02 UTC by Jan Kokemüller
Modified: 2017-10-12 08:28 UTC (History)
2 users (show)

See Also:


Attachments
patch adding a CUSE_ERR_NO_DEVICE error code (674 bytes, patch)
2017-04-13 11:02 UTC, Jan Kokemüller
no flags Details | Diff
patch adding a CUSE_ERR_NO_DEVICE error code - v2 (1.14 KB, patch)
2017-09-17 21:02 UTC, Jan Kokemüller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kokemüller 2017-04-13 11:02:50 UTC
Created attachment 181753 [details]
patch adding a CUSE_ERR_NO_DEVICE error code

It would be great to have a cuse error code that resolves to ENODEV. This is needed to properly implement the Evdev EVIOCREVOKE ioctl.

After EVIOCREVOKE is called all further calls to read/write should return ENODEV (https://github.com/jiixyj/evdevfbsd/blob/master/evdevfbsd.c#L120).
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2017-08-30 07:23:49 UTC
Hi,

Please also describe the new error code in:

lib/libcuse/cuse.3

Patch looks good!

--HPS
Comment 2 Hans Petter Selasky freebsd_committer freebsd_triage 2017-08-30 07:25:53 UTC
And also please bump the CUSE_VERSION macro.

--HPS
Comment 3 Hans Petter Selasky freebsd_committer freebsd_triage 2017-09-15 18:40:05 UTC
Ping.
Comment 4 Jan Kokemüller 2017-09-17 21:02:52 UTC
Created attachment 186488 [details]
patch adding a CUSE_ERR_NO_DEVICE error code - v2

I have bumped the CUSE_VERSION macro and added CUSE_ERR_NO_DEVICE to the man page.
Comment 5 Hans Petter Selasky freebsd_committer freebsd_triage 2017-09-18 06:52:43 UTC
Looks good. Give me a few days and I'll get it in. --HPS
Comment 6 Hans Petter Selasky freebsd_committer freebsd_triage 2017-10-05 16:34:14 UTC
I have been a bit busy. Will try to get this patch committed.
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-10-05 16:42:15 UTC
A commit references this bug:

Author: hselasky
Date: Thu Oct  5 16:42:02 UTC 2017
New revision: 324320
URL: https://svnweb.freebsd.org/changeset/base/324320

Log:
  Add support for new cuse(3) error code, CUSE_ERR_NO_DEVICE.
  This error code is useful when emulating Linux input event
  devices from userspace.

  PR:			218626
  Submitted by:		jan.kokemueller@gmail.com
  MFC after:		1 week
  Sponsored by:		Mellanox Technologies

Changes:
  head/lib/libcuse/cuse.3
  head/sys/fs/cuse/cuse.c
  head/sys/fs/cuse/cuse_defs.h
Comment 8 Hans Petter Selasky freebsd_committer freebsd_triage 2017-10-05 16:43:03 UTC
Thank you for being patient.
Comment 9 commit-hook freebsd_committer freebsd_triage 2017-10-12 08:28:07 UTC
A commit references this bug:

Author: hselasky
Date: Thu Oct 12 08:27:58 UTC 2017
New revision: 324546
URL: https://svnweb.freebsd.org/changeset/base/324546

Log:
  MFC r324320:
  Add support for new cuse(3) error code, CUSE_ERR_NO_DEVICE.
  This error code is useful when emulating Linux input event
  devices from userspace.

  PR:			218626
  Submitted by:		jan.kokemueller@gmail.com
  Sponsored by:		Mellanox Technologies

Changes:
_U  stable/11/
  stable/11/lib/libcuse/cuse.3
  stable/11/sys/fs/cuse/cuse.c
  stable/11/sys/fs/cuse/cuse_defs.h