+ WARN ((0, 0, _("%s: Unknown file type; file ignored"),
+ quotearg_colon (p)));
+ if (! ignore_failed_read_option)
+ exit_status = TAREXIT_FAILURE;
+ return;
+
+file_was_dumped:
+ if (1 < current_stat_info.stat.st_nlink)
+ {
+ struct link *dup;
+ struct link *lp = xmalloc (offsetof (struct link, name)
+ + strlen (p) + 1);
+ lp->ino = current_stat_info.stat.st_ino;
+ lp->dev = current_stat_info.stat.st_dev;
+ lp->nlink = current_stat_info.stat.st_nlink;
+ strcpy (lp->name, p);
+
+ if (! ((link_table
+ || (link_table = hash_initialize (0, 0, hash_link,
+ compare_links, 0)))
+ && (dup = hash_insert (link_table, lp))))
+ xalloc_die ();
+
+ if (dup != lp)
+ abort ();
+ lp->nlink--;
+ }
+
+}
+
+/* For each dumped file, check if all its links were dumped. Emit
+ warnings if it is not so. */
+void
+check_links ()
+{
+ struct link *lp;
+
+ if (!link_table)
+ return;
+
+ for (lp = hash_get_first (link_table); lp;
+ lp = hash_get_next (link_table, lp))
+ {
+ if (lp->nlink)
+ {
+ WARN ((0, 0, _("Missing links to '%s'.\n"), lp->name));
+ }
+ }