summaryrefslogtreecommitdiffstats
path: root/src/shared/edit-util.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /src/shared/edit-util.h
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/edit-util.h')
-rw-r--r--src/shared/edit-util.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/shared/edit-util.h b/src/shared/edit-util.h
index 83b3df8..9d9c890 100644
--- a/src/shared/edit-util.h
+++ b/src/shared/edit-util.h
@@ -7,25 +7,16 @@
#define DROPIN_MARKER_END "### Edits below this comment will be discarded"
typedef struct EditFile EditFile;
-typedef struct EditFileContext EditFileContext;
-
-struct EditFile {
- EditFileContext *context;
- char *path;
- char *original_path;
- char **comment_paths;
- char *temp;
- unsigned line;
-};
-
-struct EditFileContext {
+
+typedef struct EditFileContext {
EditFile *files;
size_t n_files;
const char *marker_start;
const char *marker_end;
bool remove_parent;
- bool overwrite_with_origin; /* whether to always overwrite target with original file */
-};
+ bool overwrite_with_origin; /* Always overwrite target with original file. */
+ bool stdin; /* Read contents from stdin instead of launching an editor. */
+} EditFileContext;
void edit_file_context_done(EditFileContext *context);