ctld: parse config file independently of getting kernel info
Separate the parsing of the config file from the reading of kernel port information. This has three benefits:
- Separation of concerns makes future changes easier.
- Allows the config file to be read earlier, which is necessary for fixing PR 271460.
- Reduces total line count, by eliminating duplication between parse.y (for traditional config file) and uclparse.c (for UCL config file).
MFC after: 2 weeks Sponsored by: Axcient
No, errors like this wouldn't get line numbers. A syntax error in the config file would and still will report its line number. But an error like "unknown port" never did. That sort of error message is unchanged by this PR:
ctld: unknown port "isp0" for target "iqn.2018-10.myhost:testvol3"
ping @amotin do you have any more concerns, given that the error messages for unknown ports won't change?
ping @amotin is there anything else you'd like to see here?
Thanks mav