env-util: make write_env_file() optionally take headers

This also makes write_env_file() and write_env_file_label() optionally
take dir_fd, and drop write_env_file_at().

Preparation for later commits.
This commit is contained in:
Yu Watanabe
2023-10-31 17:15:21 +09:00
parent 78101ca9cc
commit f155cb6d75
10 changed files with 19 additions and 16 deletions
+1 -4
View File
@@ -19,7 +19,4 @@ int load_env_file_pairs_fd(int fd, const char *fname, char ***ret);
int merge_env_file(char ***env, FILE *f, const char *fname);
int write_env_file_at(int dir_fd, const char *fname, char **l);
static inline int write_env_file(const char *fname, char **l) {
return write_env_file_at(AT_FDCWD, fname, l);
}
int write_env_file(int dir_fd, const char *fname, char **headers, char **l);