fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
1/*****************************************************************************
2 * pce *
3 *****************************************************************************/
4
5/*****************************************************************************
6 * File name: src/lib/cfg.c *
7 * Created: 2019-01-06 by Hampa Hug <hampa@hampa.ch> *
8 * Copyright: (C) 2019 Hampa Hug <hampa@hampa.ch> *
9 *****************************************************************************/
10
11/*****************************************************************************
12 * This program is free software. You can redistribute it and / or modify it *
13 * under the terms of the GNU General Public License version 2 as published *
14 * by the Free Software Foundation. *
15 * *
16 * This program is distributed in the hope that it will be useful, but *
17 * WITHOUT ANY WARRANTY, without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
19 * Public License for more details. *
20 *****************************************************************************/
21
22
23#include "cfg.h"
24
25#include <lib/log.h>
26
27#include <libini/libini.h>
28
29
30int pce_load_config (ini_sct_t *ini, const char *fname)
31{
32 if (fname == NULL) {
33 return (0);
34 }
35
36 pce_log_tag (MSG_INF, "CONFIG:", "file=\"%s\"\n", fname);
37
38 if (ini_read (ini, fname)) {
39 pce_log (MSG_ERR, "*** loading config file failed\n");
40 return (1);
41 }
42
43 return (0);
44}