From: Daniel P. Berrangé Date: Wed, 5 May 2021 10:37:01 +0000 (+0100) Subject: linux-user: use GDateTime for formatting timestamp for core file X-Git-Tag: v6.1.0-rc0~116^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68af19ad72630f00d1b92635334050826e4b6f08;p=thirdparty%2Fqemu.git linux-user: use GDateTime for formatting timestamp for core file The GDateTime APIs provided by GLib avoid portability pitfalls, such as some platforms where 'struct timeval.tv_sec' field is still 'long' instead of 'time_t'. When combined with automatic cleanup, GDateTime often results in simpler code too. Signed-off-by: Daniel P. Berrangé Reviewed-by: Laurent Vivier Message-Id: <20210505103702.521457-7-berrange@redhat.com> Signed-off-by: Laurent Vivier --- diff --git a/linux-user/elfload.c b/linux-user/elfload.c index ffc03d72f93..015eed1a27b 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -3376,7 +3376,6 @@ static size_t note_size(const struct memelfnote *); static void free_note_info(struct elf_note_info *); static int fill_note_info(struct elf_note_info *, long, const CPUArchState *); static void fill_thread_info(struct elf_note_info *, const CPUArchState *); -static int core_dump_filename(const TaskState *, char *, size_t); static int dump_write(int, const void *, size_t); static int write_note(struct memelfnote *, int); @@ -3675,32 +3674,16 @@ static void fill_auxv_note(struct memelfnote *note, const TaskState *ts) * for the name: * qemu__-