]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/env-file.h
2465eeddf4d6e3d7de6ac629783a9967d1f88b48
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
10 int parse_env_filev(FILE *f
, const char *fname
, va_list ap
);
11 int parse_env_file_fdv(int fd
, const char *fname
, va_list ap
);
12 int parse_env_file_sentinel(FILE *f
, const char *fname
, ...) _sentinel_
;
13 #define parse_env_file(f, fname, ...) parse_env_file_sentinel(f, fname, __VA_ARGS__, NULL)
14 int parse_env_file_fd_sentinel(int fd
, const char *fname
, ...) _sentinel_
;
15 #define parse_env_file_fd(fd, fname, ...) parse_env_file_fd_sentinel(fd, fname, __VA_ARGS__, NULL)
16 int load_env_file(FILE *f
, const char *fname
, char ***ret
);
17 int load_env_file_pairs(FILE *f
, const char *fname
, char ***ret
);
18 int load_env_file_pairs_fd(int fd
, const char *fname
, char ***ret
);
20 int merge_env_file(char ***env
, FILE *f
, const char *fname
);
22 int write_env_file_at(int dir_fd
, const char *fname
, char **l
);
23 static inline int write_env_file(const char *fname
, char **l
) {
24 return write_env_file_at(AT_FDCWD
, fname
, l
);