OpenZFS restructuring - zpool

Factor Linux specific functions out of the zpool command.
    
Reviewed-by: Allan Jude <allanjude@freebsd.org>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Sean Eric Fagan <sef@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #9333
This commit is contained in:
Matthew Macy
2019-09-30 12:16:06 -07:00
committed by Brian Behlendorf
parent 7bb0c29468
commit 3283f137d7
8 changed files with 445 additions and 352 deletions
-14
View File
@@ -98,20 +98,6 @@ array64_max(uint64_t array[], unsigned int len)
return (max);
}
/*
* Return 1 if "str" is a number string, 0 otherwise. Works for integer and
* floating point numbers.
*/
int
isnumber(char *str)
{
for (; *str; str++)
if (!(isdigit(*str) || (*str == '.')))
return (0);
return (1);
}
/*
* Find highest one bit set.
* Returns bit number + 1 of highest bit that is set, otherwise returns 0.