+
+ if (type == FSE_DOCID_CREATED || type == FSE_DOCID_CHANGED) {
+ uint64_t val;
+
+ //
+ // These events are special and not like the other events. They only
+ // have a dev_t, src inode #, dest inode #, and a doc-id. We use the
+ // fields that we can in the kfse but have to overlay the dest inode
+ // number and the doc-id on the other fields.
+ //
+
+ // First the dev_t
+ arg_type = va_arg(ap, int32_t);
+ if (arg_type == FSE_ARG_DEV) {
+ cur->dev = (dev_t)(va_arg(ap, dev_t));
+ } else {
+ cur->dev = (dev_t)0xbadc0de1;
+ }
+
+ // next the source inode #
+ arg_type = va_arg(ap, int32_t);
+ if (arg_type == FSE_ARG_INO) {
+ cur->ino = (ino64_t)(va_arg(ap, ino64_t));
+ } else {
+ cur->ino = 0xbadc0de2;
+ }
+
+ // now the dest inode #
+ arg_type = va_arg(ap, int32_t);
+ if (arg_type == FSE_ARG_INO) {
+ val = (ino64_t)(va_arg(ap, ino64_t));
+ } else {
+ val = 0xbadc0de2;
+ }
+ // overlay the dest inode number on the str/dest pointer fields
+ memcpy(&cur->str, &val, sizeof(ino64_t));
+
+
+ // and last the document-id
+ arg_type = va_arg(ap, int32_t);
+ if (arg_type == FSE_ARG_INT32) {
+ val = (uint64_t)va_arg(ap, uint32_t);
+ } else if (arg_type == FSE_ARG_INT64) {
+ val = (uint64_t)va_arg(ap, uint64_t);
+ } else {
+ val = 0xbadc0de3;
+ }
+
+ // the docid is 64-bit and overlays the uid/gid fields
+ memcpy(&cur->uid, &val, sizeof(uint64_t));
+
+ goto done_with_args;
+ }
+