mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
ZTS: Eliminate functions named 'random'
The name overlaps with a command needed by FreeBSD. There is also no sense having two 'random' functions that do nearly the same thing, so consolidate to just the more general one and name it 'random_int_between'. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes #9820
This commit is contained in:
committed by
Brian Behlendorf
parent
028e3b3b1a
commit
f8d55b95a5
@@ -3349,15 +3349,6 @@ function get_min
|
||||
echo $min
|
||||
}
|
||||
|
||||
#
|
||||
# Generate a random number between 1 and the argument.
|
||||
#
|
||||
function random
|
||||
{
|
||||
typeset max=$1
|
||||
echo $(( ($RANDOM % $max) + 1 ))
|
||||
}
|
||||
|
||||
# Write data that can be compressed into a directory
|
||||
function write_compressible
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user