Opened 7 years ago
Closed 7 years ago
#854 closed defect (invalid)
drivedb.h parser ignores lines with // comments
Reported by: | Ivan | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | drivedb | Version: | 6.5 |
Keywords: | Cc: |
Description
Subj, even those where the comment is after non-commented-out data.
See attached e-mail for an example (I'll send it to smartmontools-database shortly after I get this ticket's number to reference).
Attachments (1)
Change History (5)
by , 7 years ago
Attachment: | SAMSUNG MZ7LN512HCHP-000L1 & incorrect DB parsing.eml added |
---|
comment:1 by , 7 years ago
Milestone: | → undecided |
---|
e-mail with example in attachment
PLEASE don't attach base64 encoded .eml files. Use plain comments or attach plain files instead.
249 is the number of gigabytes written to NAND.
OK (but unrelated).
Last but not the least, drivedb.h parser in Smartctl 6.5 turns out to ignore the lines that have the comment, even if it's not the first token in the line.
That's why there are so many unknown attributes in the output.
Could not reproduce this. The command smartctl -P showall
produces same output with or without drivedb.diff
from your email applied, except for attribute 249.
More than 800 lines of drivedb.h
use trailing // comments
. If all these lines would be fully ignored, the file would fail to parse.
Please provide a simple testcase which demonstrates your bug report.
follow-up: 3 comment:2 by , 7 years ago
Confirmed it to work after deleting drivedb.h and re-downloading it with `update-smart-drivedb' .
I must've tried without drivedb.h .
The parameters 170-174 are indeed not present internally in smartctl rev. 4318 that I have.
(Have two machines here standing side by side, must've downloaded & edited the file on one and expected the changes to magically propagate to the other).
comment:3 by , 7 years ago
comment:4 by , 7 years ago
Milestone: | undecided |
---|---|
Resolution: | → invalid |
Status: | new → closed |
The parser handles //
comments as expected.
e-mail with example in attachment