Allow to create pool even if mount point directory is not empty if -f is given.
Obtained from: WHEEL Systems
This commit is contained in:
parent
5b47b1e61c
commit
1bba6bdf13
@ -906,10 +906,11 @@ zpool_do_create(int argc, char **argv)
|
||||
/*
|
||||
* Check the validity of the mountpoint and direct the user to use the
|
||||
* '-m' mountpoint option if it looks like its in use.
|
||||
* Ignore the checks if the '-f' option is given.
|
||||
*/
|
||||
if (mountpoint == NULL ||
|
||||
if (!force && (mountpoint == NULL ||
|
||||
(strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) != 0 &&
|
||||
strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) != 0)) {
|
||||
strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) != 0))) {
|
||||
char buf[MAXPATHLEN];
|
||||
DIR *dirp;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user