freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

ctld: parse config file independently of getting kernel info

Open asomers opened this issue 1 year ago • 2 comments

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

asomers avatar Jun 12 '24 21:06 asomers

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"

asomers avatar Jun 14 '24 17:06 asomers

ping @amotin do you have any more concerns, given that the error messages for unknown ports won't change?

asomers avatar Jun 24 '24 16:06 asomers

ping @amotin is there anything else you'd like to see here?

asomers avatar Jul 31 '24 16:07 asomers

Thanks mav

asomers avatar Aug 07 '24 14:08 asomers