+ switch (status) {
+ case WIMLIB_SCAN_DENTRY_OK:
+ if (!(params->add_flags & WIMLIB_ADD_FLAG_VERBOSE))
+ return 0;
+ break;
+ case WIMLIB_SCAN_DENTRY_UNSUPPORTED:
+ case WIMLIB_SCAN_DENTRY_EXCLUDED:
+ case WIMLIB_SCAN_DENTRY_FIXED_SYMLINK:
+ case WIMLIB_SCAN_DENTRY_NOT_FIXED_SYMLINK:
+ if (!(params->add_flags & WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE))
+ return 0;
+ break;
+ }
+ params->progress.scan.status = status;
+ if (status == WIMLIB_SCAN_DENTRY_OK && inode->i_nlink == 1) {
+
+ /* Successful scan, and visiting inode for the first time */
+
+ /* Tally size of all data streams. */
+ const struct wim_lookup_table_entry *lte;
+ for (unsigned i = 0; i <= inode->i_num_ads; i++) {
+ lte = inode_stream_lte_resolved(inode, i);
+ if (lte)
+ params->progress.scan.num_bytes_scanned += lte->size;
+ }
+
+ /* Tally the file itself. */
+ if (inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY)
+ params->progress.scan.num_dirs_scanned++;
+ else
+ params->progress.scan.num_nondirs_scanned++;
+ }
+
+ /* Call the user-provided progress function. */
+ return call_progress(params->progfunc, WIMLIB_PROGRESS_MSG_SCAN_DENTRY,
+ ¶ms->progress, params->progctx);
+}