Skip to content

Commit 066e436

Browse files
committed
fix: only mark non-rotational HDDs as SSD
Fixes sr0 incorrectly showing as SSD on RHCOS 4.19. Signed-off-by: David Asulin <[email protected]>
1 parent d0f46e2 commit 066e436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/block/block_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ func disks(ctx *context.Context, paths *linuxpath.Paths) []*Disk {
331331
driveType, storageController := diskTypes(dname)
332332
// TODO(jaypipes): Move this into diskTypes() once abstracting
333333
// diskIsRotational for ease of unit testing
334-
if !diskIsRotational(ctx, paths, dname) {
334+
if !diskIsRotational(ctx, paths, dname) && driveType == DRIVE_TYPE_HDD {
335335
driveType = DRIVE_TYPE_SSD
336336
}
337337
size := diskSizeBytes(paths, dname)

0 commit comments

Comments
 (0)