Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message consistency #656

Closed
wants to merge 1 commit into from
Closed

Improve error message consistency #656

wants to merge 1 commit into from

Conversation

rlaager
Copy link
Member

@rlaager rlaager commented Apr 9, 2012

No description provided.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
@rlaager
Copy link
Member Author

rlaager commented Apr 10, 2012

Brian Behlendorf wrote:

Rather than remove this argument, it would be better to add the missing '%s' so the error includes the offending device name for debugging purposes. It's probably also better to print path here instead of name.

I've updated the pull request to take that approach. I also improved a couple of other error messages so this set is consistent. By the way, do you have any idea why they're using ("%d", errno) rather than ("%s", strerror(errno))?

@behlendorf
Copy link
Contributor

I'm just guessing, but I suspect the ("%d", errno) syntax was use because it was the personal preference of whomever wrote this code originally. As a developer I personally find it clearer, however as an end user I suspect the ("%s", strerror(errno)) is a little nicer.

Anyway, I've merged this change as commit 109491a

@behlendorf behlendorf closed this Apr 11, 2012
behlendorf added a commit to behlendorf/zfs that referenced this pull request May 21, 2018
The kernel_read & kernel_write functions have always wrapped the
vfs_read & vfs_write functions respectively.  However, they could
not be used by vn_rdwr() since the offset wasn't passed as a
pointer.  This prevented us from being able to properly update
the file offset.

Linux 4.14 unexported vfs_read & vfs_write but also changed the
signature of kernel_read & kernel_write to provide the needed
functionality.  Use these updated functions when available.

Reviewed-by: Pritam Baral <pritam@pritambaral.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#656 
Closes openzfs#667
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants