diff options
author | Saravanan D <saravanand@fb.com> | 2023-02-28 15:45:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 15:45:17 -0800 |
commit | aa30dd7905824bd7c0770cd72999d3b5c669b7db (patch) | |
tree | 8b9d9e2fe696fb76455b406cbd41d6f07b1dfc1c /lib | |
parent | b846145fdce2fbb21b760ad83b1b54a49c43ba8a (diff) | |
download | ohai-aa30dd7905824bd7c0770cd72999d3b5c669b7db.tar.gz |
[block_device] Record firmware revision of nvme block devices (#1787)
Enhancing the plugin to record the firmware of nvme block devices whose sysfs endpoint differs from HDD
Signed-off-by: Saravanan D <saravanand@fb.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ohai/plugins/linux/block_device.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/linux/block_device.rb b/lib/ohai/plugins/linux/block_device.rb index 36905fc4..9434e6d5 100644 --- a/lib/ohai/plugins/linux/block_device.rb +++ b/lib/ohai/plugins/linux/block_device.rb @@ -31,7 +31,7 @@ Ohai.plugin(:BlockDevice) do file_open("/sys/block/#{dir}/#{check}") { |f| block[dir][check] = f.read_nonblock(1024).strip } end end - %w{model rev state timeout vendor queue_depth}.each do |check| + %w{model rev state timeout vendor queue_depth firmware_rev}.each do |check| if file_exist?("/sys/block/#{dir}/device/#{check}") file_open("/sys/block/#{dir}/device/#{check}") { |f| block[dir][check] = f.read_nonblock(1024).strip } end |