Also had mount_config_init() call xlog_open() so
the program name is set on xlog() calls.
Signed-off-by: Steve Dickson <steved@redhat.com>
if (section)
free(section);
if (i == sz) {
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;
"non-matched ']', ignoring until next section", ln);
section = 0;
return;
while (*ptr && *ptr != '"')
ptr++;
if (*ptr == '\0') {
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';
"non-matched '\"', ignoring until next section", ln);
} else {
*ptr = '\0';
if (line[i] == '=') {
/* If no section, we are ignoring the lines. */
if (!section) {
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';
return;
}
line[strcspn (line, " \t=")] = '\0';
/* Other non-empty lines are weird. */
i = strspn(line, " \t");
if (line[i])
/* 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);
spec = argv[1];
mount_point = argv[2];
spec = argv[1];
mount_point = argv[2];
+ 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",
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 *);
#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)
/*
* Read the the default mount options
*/
/*
* Read the the default mount options
*/
}
#else /* MOUNT_CONFIG */
}
#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)
inline char *mount_config_opts(char *spec,
char *mount_point, char *mount_opts)