|
|
Subscribe / Log in / New account

Poettering: systemd for Administrators, Part VIII

Poettering: systemd for Administrators, Part VIII

Posted Apr 28, 2011 1:48 UTC (Thu) by elanthis (guest, #6227)
In reply to: Poettering: systemd for Administrators, Part VIII by dskoll
Parent article: Poettering: systemd for Administrators, Part VIII

That's just far too application specific.

Once you get into dealing with line numbers you're really dealing with the innards of your parser.

And while I'd _love_ for there to be a standard UNIX configuration file format instead of the current nightmare where every damn app uses its own format (and often a different format for different individual config files used by the same app!), that just ain't going to happen.

What you can do though is look into something like libconfig or libini or one of the dozen similar libraries and get foo.d support added there. It may not be a "standard" but it's at least a reliably available library you can depend on and use.


to post comments

Poettering: systemd for Administrators, Part VIII

Posted Apr 28, 2011 15:59 UTC (Thu) by dskoll (subscriber, #1630) [Link]

Once you get into dealing with line numbers you're really dealing with the innards of your parser.

Not at all. You really just need a way to know which file you're currently reading from. (You can keep track of line numbers on your own.) An API that didn't expose the file name would be horrible for producing diagnostics.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds