HomeFreeBSD

Fill in mountpoint buffer before using it in errors

Description

Fill in mountpoint buffer before using it in errors

zfs_is_mountable() fills in the mountpoint buffer, so, as in
upstream, it needs to have been called before the mountpoint
buffer can be used in error messages.

In particular,

return (zfs_error_fmt(hdl, EZFS_MOUNTFAILED,

	    dgettext(TEXT_DOMAIN, "cannot mount '%s'"),
	    mountpoint));

should not come before the call to zfs_is_mountable().

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
Closes #2284

Details

Provenance
ilovezfs <ilovezfs@icloud.com>Authored on Apr 30 2014, 5:47 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Apr 30 2014, 10:52 PM
Parents
rG17584980b9ca: Add assertion to catch 0-count page
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG78597769b488: Fill in mountpoint buffer before using it in errors (authored by ilovezfs <ilovezfs@icloud.com>).Apr 30 2014, 10:52 PM