libctf, create: empty dicts are dirty to start with
authorNick Alcock <nick.alcock@oracle.com>
Tue, 2 Jun 2020 19:39:15 +0000 (20:39 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Wed, 22 Jul 2020 16:57:29 +0000 (17:57 +0100)
Without this, an empty dict that is written out immediately never gets
any content at all: even the header is left empty.

libctf/
* ctf-create.c (ctf_create): Mark dirty.

libctf/ChangeLog
libctf/ctf-create.c

index 671df6854217527a82bef8f675c94c4ecb59aae3..0aee504f3e16fd8e9474584d23088abfcf2fa869 100644 (file)
@@ -1,3 +1,7 @@
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_create): Mark dirty.
+
 2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
 
        * ctf-create.c (membcmp)  Skip nameless members.
index 5cbcfe0a70265da4ae0ee479cd8d1426aff1c422..1416d187fd9fc4c19206a99f4f44e6a71cc23c02 100644 (file)
@@ -126,6 +126,7 @@ ctf_create (int *errp)
   fp->ctf_dtoldid = 0;
   fp->ctf_snapshots = 1;
   fp->ctf_snapshot_lu = 0;
+  fp->ctf_flags |= LCTF_DIRTY;
 
   ctf_set_ctl_hashes (fp);
   ctf_setmodel (fp, CTF_MODEL_NATIVE);