if (section)
free(section);
if (i == sz) {
- xlog_warn("conf_parse_line: %d:"
+ xlog_warn("config file error: line %d: "
"non-matched ']', ignoring until next section", ln);
section = 0;
return;
while (*ptr && *ptr != '"')
ptr++;
if (*ptr == '\0') {
- xlog_warn("conf_parse_line: line %d:"
+ xlog_warn("config file error: line %d: "
"non-matched '\"', ignoring until next section", ln);
} else {
*ptr = '\0';
if (line[i] == '=') {
/* If no section, we are ignoring the lines. */
if (!section) {
- xlog_warn("conf_parse_line: %d: ignoring line due to no section",
- ln);
+ xlog_warn("config file error: line %d: "
+ "ignoring line due to no section", ln);
return;
}
line[strcspn (line, " \t=")] = '\0';
/* Other non-empty lines are weird. */
i = strspn(line, " \t");
if (line[i])
- xlog_warn("conf_parse_line: %d: syntax error", ln);
+ xlog_warn("config file error: line %d:", ln);
return;
}
spec = argv[1];
mount_point = argv[2];
- mount_config_init();
+ mount_config_init(progname);
argv[2] = argv[0]; /* so that getopt error messages are correct */
while ((c = getopt_long(argc - 2, argv + 2, "rvVwfno:hs",
*
*/
-inline void mount_config_init(void);
+inline void mount_config_init(char *);
#ifdef MOUNT_CONFIG
#include "conffile.h"
extern char *conf_get_mntopts(char *, char *, char *);
-inline void mount_config_init()
+inline void mount_config_init(char *program)
{
+ xlog_open(program);
/*
* Read the the default mount options
*/
}
#else /* MOUNT_CONFIG */
-inline void mount_config_init() { }
+inline void mount_config_init(char *program) { }
inline char *mount_config_opts(char *spec,
char *mount_point, char *mount_opts)