diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-29 13:18:53 -0500 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-29 13:18:53 -0500 |
commit | f0fd6119cffd22c1bdf5553cc2a729839840d63e (patch) | |
tree | 9c30e11d281adaa634231f91eed98a84860ded1b /include | |
parent | f49ad5977ea390078e8d4d6b633f895bfa0909c4 (diff) | |
download | sway-f0fd6119cffd22c1bdf5553cc2a729839840d63e.tar.xz |
Cleanup config reading failure error logs
This cleans up the log when sway fails to read a config file. The
following changes have been made:
- A missing error message has been added to the log when the config file
is a directory instead of a regular file
- In main, `goto` statements have been added after the `sway_terminate`
calls instead of wrapping every block in `if (!terminate_request)`
- Unnecessary NULL-checks around calls to free in `main` have been
removed
- Deferred command execution has been extracted to a separate function
and the `Running deferred commands` log message will not be shown when
there are no deferred commands.
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 8215ff59..d5467a56 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -516,6 +516,11 @@ bool read_config(FILE *file, struct sway_config *config, struct swaynag_instance *swaynag); /** + * Run the commands that were deferred when reading the config file. + */ +void run_deferred_commands(void); + +/** * Adds a warning entry to the swaynag instance used for errors. */ void config_add_swaynag_warning(char *fmt, ...); |