mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
zed: Control NVMe fault LEDs
The ZED code currently can only turn on the fault LED for a faulted disk in a JBOD enclosure. This extends support for faulted NVMe disks as well. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #12648 Closes #12695
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <libzutil.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* Return B_TRUE if "str" is a number string, B_FALSE otherwise.
|
||||
@@ -42,6 +43,14 @@ zfs_isnumber(const char *str)
|
||||
if (!(isdigit(*str) || (*str == '.')))
|
||||
return (B_FALSE);
|
||||
|
||||
/*
|
||||
* Numbers should not end with a period ("." ".." or "5." are
|
||||
* not valid)
|
||||
*/
|
||||
if (str[strlen(str) - 1] == '.') {
|
||||
return (B_FALSE);
|
||||
}
|
||||
|
||||
return (B_TRUE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user