SIGN IN SIGN UP

Fix fibrechannel_linux for ppc64le (#3769)

Seen on a master node:

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x106cefa4]
goroutine 81 [running]:
github.com/prometheus/node_exporter/collector.(*fibrechannelCollector).Update(0x7e28c1ae20f0, 0x7e28c1826770)
  /go/src/github.com/prometheus/node_exporter/collector/fibrechannel_linux.go:133 +0x604

sh-5.1# ls -l /host/sys/class/fc_host/
total 0
lrwxrwxrwx. 1 root root 0 Jul 30 20:42 host1 -> ../../devices/vio/30000003/host1/fc_host/host1
lrwxrwxrwx. 1 root root 0 Jul 30 20:42 host2 -> ../../devices/vio/30000005/host2/fc_host/host2
sh-5.1# ls -l /host/sys/class/fc_host/host1/
total 0
-rw-r--r--. 1 root root 65536 Jul 30 20:09 dev_loss_tmo
lrwxrwxrwx. 1 root root     0 Jul 30 20:42 device -> ../../../host1
-r--r--r--. 1 root root 65536 Jul 30 20:09 fabric_name
--w-------. 1 root root 65536 Jul 30 20:42 issue_lip
-r--r--r--. 1 root root 65536 Jul 30 20:42 maxframe_size
-r--r--r--. 1 root root 65536 Jul 30 20:09 node_name
-r--r--r--. 1 root root 65536 Jul 30 20:09 port_id
-r--r--r--. 1 root root 65536 Jul 30 20:42 port_name
-r--r--r--. 1 root root 65536 Jul 30 20:09 port_state
-r--r--r--. 1 root root 65536 Jul 30 20:09 port_type
drwxr-xr-x. 2 root root     0 Jul 30 20:42 power
-r--r--r--. 1 root root 65536 Jul 30 20:09 speed
lrwxrwxrwx. 1 root root     0 Jul 30 20:42 subsystem -> ../../../../../../class/fc_host
-r--r--r--. 1 root root 65536 Jul 30 20:09 supported_classes
-rw-r--r--. 1 root root 65536 Jul 30 20:42 tgtid_bind_type
-rw-r--r--. 1 root root 65536 Jul 30 20:42 uevent
```

Since many filenames for counters are not guaranteed to exist in VMs,
allocate if not present.

Signed-off-by: Mark Hamzy <hamzy@us.ibm.com>
M
Mark Hamzy committed
24c6dce279c418bcb911824e8c8be1c81a1e832b
Parent: a7dcc3a
Committed by GitHub <noreply@github.com> on 8/19/2026, 8:25:20 AM