Add linux_to_bsd_errtbl[], mapping Linux errnos to their BSD counterparts. This will be used by fuse(4).
Details
- Reviewers
emaste asomers - Group Reviewers
Linux Emulation - Commits
- rS367339: Add linux_to_bsd_errtbl[], mapping Linux errnos to their BSD counterparts.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 34472 Build 31574: arc lint + arc unit
Event Timeline
sys/compat/linux/linux_errno.c | ||
---|---|---|
28 | You shouldn't assert here. If so, you'll give a buggy (or even malicious) FUSE daemon the power to crash the kernel. | |
sys/compat/linux/linux_errno.h | ||
183 ↗ | (On Diff #78959) | You should wrap this line with #ifdef KERNEL. Otherwise, userspace programs may end up depending on this symbol, even though it's not guaranteed to be stable across different kernel versions. |
sys/compat/linux/linux_errno.c | ||
---|---|---|
28 | Perhaps EDOOFUS |
sys/compat/linux/linux_errno.c | ||
---|---|---|
28 | Just pass errors that are outside the range AS-IS. |
sys/compat/linux/linux_errno.c | ||
---|---|---|
28 | This function has no consumers at this point, so I'll just remove it - it's kind of pointless to guess what the semantics should be. The table is necessary for fuse(4), but it includes linux_errno.inc directly, to avoid dependency on linux KLD. | |
40 | D'oh! Thanks for reporting it. |
sys/compat/linux/linux_errno.c | ||
---|---|---|
18 | Should this code bet written like this? if (error >= 0 && error <= ELAST) return (linux_errtbl[error]); else return (XXX); |
sys/compat/linux/linux_errno.c | ||
---|---|---|
18 | Not really; this is for errors generated by the kernel, so we trust the error is correct. |