Blame


1 13b2bc37 2022-10-23 stsp /*
2 13b2bc37 2022-10-23 stsp * Copyright (c) 2022 Stefan Sperling <stsp@openbsd.org>
3 13b2bc37 2022-10-23 stsp *
4 13b2bc37 2022-10-23 stsp * Permission to use, copy, modify, and distribute this software for any
5 13b2bc37 2022-10-23 stsp * purpose with or without fee is hereby granted, provided that the above
6 13b2bc37 2022-10-23 stsp * copyright notice and this permission notice appear in all copies.
7 13b2bc37 2022-10-23 stsp *
8 13b2bc37 2022-10-23 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 13b2bc37 2022-10-23 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 13b2bc37 2022-10-23 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 13b2bc37 2022-10-23 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 13b2bc37 2022-10-23 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 13b2bc37 2022-10-23 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 13b2bc37 2022-10-23 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 13b2bc37 2022-10-23 stsp */
16 13b2bc37 2022-10-23 stsp
17 13b2bc37 2022-10-23 stsp #include <stdio.h>
18 13b2bc37 2022-10-23 stsp #include <stdlib.h>
19 13b2bc37 2022-10-23 stsp
20 13b2bc37 2022-10-23 stsp #include "got_error.h"
21 13b2bc37 2022-10-23 stsp #include "got_repository.h"
22 13b2bc37 2022-10-23 stsp
23 13b2bc37 2022-10-23 stsp #include "got_gotconfig.h"
24 13b2bc37 2022-10-23 stsp
25 13b2bc37 2022-10-23 stsp #include "got_lib_gotconfig.h"
26 13b2bc37 2022-10-23 stsp
27 13b2bc37 2022-10-23 stsp const struct got_error *
28 13b2bc37 2022-10-23 stsp got_gotconfig_read(struct got_gotconfig **conf, const char *gotconfig_path)
29 13b2bc37 2022-10-23 stsp {
30 13b2bc37 2022-10-23 stsp *conf = calloc(1, sizeof(**conf));
31 13b2bc37 2022-10-23 stsp if (*conf == NULL)
32 13b2bc37 2022-10-23 stsp return got_error_from_errno("calloc");
33 13b2bc37 2022-10-23 stsp
34 13b2bc37 2022-10-23 stsp /* TODO So far, this only used by gotd, where got.conf is irrelevant. */
35 13b2bc37 2022-10-23 stsp return NULL;
36 13b2bc37 2022-10-23 stsp }