mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Return finer grain errors in libzfs unmount_one
Added errno mappings to unmount_one() in libzfs. Changed do_unmount() implementation to return errno errors directly like is done for do_mount() and others. Reviewed-by: Mark Maybee <mark.maybee@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Don Brady <don.brady@delphix.com> Closes #11681
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
/*
|
||||
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2014, 2021 by Delphix. All rights reserved.
|
||||
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
|
||||
* Copyright 2017 RackTop Systems.
|
||||
* Copyright (c) 2018 Datto Inc.
|
||||
@@ -377,7 +377,9 @@ int
|
||||
do_unmount(const char *mntpt, int flags)
|
||||
{
|
||||
if (!libzfs_envvar_is_set("ZFS_MOUNT_HELPER")) {
|
||||
return (umount2(mntpt, flags));
|
||||
int rv = umount2(mntpt, flags);
|
||||
|
||||
return (rv < 0 ? errno : 0);
|
||||
}
|
||||
|
||||
char force_opt[] = "-f";
|
||||
|
||||
Reference in New Issue
Block a user