+ tab, s->slink, cp);
+ }
+ if ((s->flags & F_BTIME) &&
+ ((s->st_birthtimespec.tv_sec != p->fts_statp->st_birthtimespec.tv_sec) ||
+ (s->st_birthtimespec.tv_nsec != p->fts_statp->st_birthtimespec.tv_nsec))) {
+ if (!mflag) {
+ LABEL;
+ (void)printf("%sbirth time expected %.24s.%09ld ",
+ tab, ctime(&s->st_birthtimespec.tv_sec), s->st_birthtimespec.tv_nsec);
+ (void)printf("found %.24s.%09ld\n",
+ ctime(&p->fts_statp->st_birthtimespec.tv_sec), p->fts_statp->st_birthtimespec.tv_nsec);
+ tab = "\t";
+ }
+ if (!insert_birth && mflag) {
+ uint64_t s_create_time = timespec_to_apfs_timestamp(&s->st_birthtimespec);
+ char *birth_string = "BIRTH";
+ set_key_value_pair(birth_string, &s_create_time, true);
+ insert_birth = 1;
+ }
+ }
+ if ((s->flags & F_ATIME) &&
+ ((s->st_atimespec.tv_sec != p->fts_statp->st_atimespec.tv_sec) ||
+ (s->st_atimespec.tv_nsec != p->fts_statp->st_atimespec.tv_nsec))) {
+ if (!mflag) {
+ LABEL;
+ (void)printf("%saccess time expected %.24s.%09ld ",
+ tab, ctime(&s->st_atimespec.tv_sec), s->st_atimespec.tv_nsec);
+ (void)printf("found %.24s.%09ld\n",
+ ctime(&p->fts_statp->st_atimespec.tv_sec), p->fts_statp->st_atimespec.tv_nsec);
+ tab = "\t";
+ }
+ if (!insert_access && mflag) {
+ uint64_t s_access_time = timespec_to_apfs_timestamp(&s->st_atimespec);
+ char *access_string = "ACCESS";
+ set_key_value_pair(access_string, &s_access_time, true);
+ insert_access = 1;
+
+ }
+ }
+ if ((s->flags & F_CTIME) &&
+ ((s->st_ctimespec.tv_sec != p->fts_statp->st_ctimespec.tv_sec) ||
+ (s->st_ctimespec.tv_nsec != p->fts_statp->st_ctimespec.tv_nsec))) {
+ if (!mflag) {
+ LABEL;
+ (void)printf("%smetadata modification time expected %.24s.%09ld ",
+ tab, ctime(&s->st_ctimespec.tv_sec), s->st_ctimespec.tv_nsec);
+ (void)printf("found %.24s.%09ld\n",
+ ctime(&p->fts_statp->st_ctimespec.tv_sec), p->fts_statp->st_ctimespec.tv_nsec);
+ tab = "\t";
+ }
+ if (!insert_change && mflag) {
+ uint64_t s_mod_time = timespec_to_apfs_timestamp(&s->st_ctimespec);
+ char *change_string = "CHANGE";
+ set_key_value_pair(change_string, &s_mod_time, true);
+ insert_change = 1;
+ }
+ }
+ if (s->flags & F_PTIME) {
+ int supported;
+ struct timespec ptimespec = ptime(p->fts_accpath, &supported);
+ if (!supported) {
+ if (mflag) {
+ ptimespec.tv_sec = 0;
+ ptimespec.tv_nsec = 0;
+ supported = 1;
+ } else {
+ LABEL;
+ (void)printf("%stime added to parent folder expected %.24s.%09ld found that it is not supported\n",
+ tab, ctime(&s->st_ptimespec.tv_sec), s->st_ptimespec.tv_nsec);
+ tab = "\t";
+ }
+ }
+ if (supported && ((s->st_ptimespec.tv_sec != ptimespec.tv_sec) ||
+ (s->st_ptimespec.tv_nsec != ptimespec.tv_nsec))) {
+ if (!mflag) {
+ LABEL;
+ (void)printf("%stime added to parent folder expected %.24s.%09ld ",
+ tab, ctime(&s->st_ptimespec.tv_sec), s->st_ptimespec.tv_nsec);
+ (void)printf("found %.24s.%09ld\n",
+ ctime(&ptimespec.tv_sec), ptimespec.tv_nsec);
+ tab = "\t";
+ } else if (!insert_parent && mflag) {
+ uint64_t s_added_time = timespec_to_apfs_timestamp(&s->st_ptimespec);
+ char *added_string = "DATEADDED";
+ set_key_value_pair(added_string, &s_added_time, true);
+ insert_parent = 1;
+ }
+ }
+ }
+ if (s->flags & F_XATTRS) {
+ char buf[kSHA256NullTerminatedBuffLen];
+ xattr_info *ai;
+ ai = SHA256_Path_XATTRs(p->fts_accpath, buf);
+ if (!mflag) {
+ if (ai && !ai->digest) {
+ LABEL;
+ printf("%sxattrsdigest missing, expected: %s\n", tab, s->xattrsdigest);
+ tab = "\t";
+ } else if (ai && strcmp(ai->digest, s->xattrsdigest)) {
+ LABEL;
+ printf("%sxattrsdigest expected %s found %s\n",
+ tab, s->xattrsdigest, ai->digest);
+ tab = "\t";
+ }
+ }
+ if (mflag) {
+ if (ai && ai->xdstream_priv_id != s->xdstream_priv_id) {
+ set_key_value_pair((void*)&ai->xdstream_priv_id, &s->xdstream_priv_id, false);
+ }
+ }
+ free(ai);
+ }
+ if ((s->flags & F_INODE) &&
+ (p->fts_statp->st_ino != s->st_ino)) {
+ if (!mflag) {
+ LABEL;
+ (void)printf("%sinode expected %llu found %llu\n",
+ tab, s->st_ino, p->fts_statp->st_ino);
+ tab = "\t";
+ }
+ if (mflag) {
+ set_key_value_pair((void*)&p->fts_statp->st_ino, &s->st_ino, false);
+ }