]> git.proxmox.com Git - mirror_zfs.git/commit
Fill in mountpoint buffer before using it in errors
authorilovezfs <ilovezfs@icloud.com>
Wed, 30 Apr 2014 05:47:14 +0000 (22:47 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 30 Apr 2014 22:52:01 +0000 (15:52 -0700)
commit78597769b488633c9b61ded8ede0c8790b849b75
tree7ac0b36d56b8bcc5ee422f67ae660db4ae22f4a8
parent17584980b9ca6fc1aecb520ffc520cd306624854
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
lib/libzfs/libzfs_mount.c