env-file: port write_env_file() to label_ops_pre()
Let's make more use of label_ops_pre()/label_ops_post(), and replace write_env_file_label() by a flag to write_env_file(). This simplifies and normalizes the code. This also makes one relevant change: it sets the new WRITE_ENV_FILE_LABEL flag in firstboot.c when we write locale.conf, where we previously did not (but should have). This should address one detail of #37857.
This commit is contained in:
@@ -15,7 +15,11 @@ 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(int dir_fd, const char *fname, char **headers, char **l);
|
||||
typedef enum WriteEnvFileFlags {
|
||||
WRITE_ENV_FILE_LABEL = 1 << 0,
|
||||
} WriteEnvFileFlags;
|
||||
|
||||
int write_env_file(int dir_fd, const char *fname, char **headers, char **l, WriteEnvFileFlags flags);
|
||||
|
||||
int write_vconsole_conf(int dir_fd, const char *fname, char **l);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user