X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fcreate.c;h=b712f93b716aa220eea16ed6b52bb4115ef424b7;hb=0008f6123738f466bc95b8b6bd3e82a7bc91876d;hp=b0fa1e88facdf16e8ebe5b9d10bda4e71d6fc580;hpb=aea0a1d970b8125293c8f03c60e74c9f04160379;p=chaz%2Ftar diff --git a/src/create.c b/src/create.c index b0fa1e8..b712f93 100644 --- a/src/create.c +++ b/src/create.c @@ -21,11 +21,6 @@ #include "system.h" -#if !MSDOS -# include -# include -#endif - #if HAVE_UTIME_H # include #else @@ -41,11 +36,6 @@ struct utimbuf #include "common.h" #include -#ifndef MSDOS -extern dev_t ar_dev; -extern ino_t ar_ino; -#endif - struct link { dev_t dev; @@ -1058,16 +1048,13 @@ dump_file (char *p, int top_level, dev_t parent_device) return; } -#if !MSDOS /* See if we are trying to dump the archive. */ - - if (ar_dev && current_stat_info.stat.st_dev == ar_dev && current_stat_info.stat.st_ino == ar_ino) + if (sys_file_is_archive (¤t_stat_info)) { WARN ((0, 0, _("%s: file is the archive; not dumped"), quotearg_colon (p))); return; } -#endif if (S_ISDIR (current_stat_info.stat.st_mode)) { @@ -1497,7 +1484,9 @@ dump_file (char *p, int top_level, dev_t parent_device) char buf[UINTMAX_STRSIZE_BOUND]; memset (start->buffer + count, 0, bufsize - count); WARN ((0, 0, - _("%s: File shrank by %s bytes; padding with zeros"), + ngettext ("%s: File shrank by %s byte; padding with zeros", + "%s: File shrank by %s bytes; padding with zeros", + sizeleft), quotearg_colon (p), STRINGIFY_BIGINT (sizeleft, buf))); if (! ignore_failed_read_option)