-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow multiple product strings to be matched for flash disk detection #132
allow multiple product strings to be matched for flash disk detection #132
Conversation
@dallasmarlow @Primer42 |
@@ -100,7 +100,7 @@ class LshwParser(txt: String) extends CommonParser[LshwRepresentation](txt) { | |||
case size => ByteStorageUnit(size.toLong) | |||
} | |||
Disk(size, _type, asset.description, asset.product, asset.vendor) | |||
case n if (n \ "@class" text) == "memory" && (n \ "product" text).toLowerCase.contains(LshwConfig.flashProduct) => | |||
case n if (n \ "@class" text) == "memory" && LshwConfig.flashProducts.exists(s => (n \ "product" text).toLowerCase.contains(s)) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should (s)
be (s.toLowerCase)
as well? Cause currently tachION
will cause a case mismatch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah never mind, I see was done above in LshwConfig.scala :)
@byxorna lgtm 🍜 |
@byxorna LGTM 🎂 |
Stupid question, but will this break configs using the old |
@Primer42 Nope, it was designed to support |
allow multiple product strings to be matched for flash disk detection
allow multiple product strings to be matched for flash disk detection
allow multiple product strings to be matched for flash disk detection
Allows better support for environments with multiple models/vendors of PCIe flash disks. I will create a separate PR to update documentation indicating that
lshw.flashProduct
is deprecated, andlshw.flashProducts
is the new feature variable.