X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Flist.c;h=f2605ad0c258d68ab6214ed5af1eeb8e68707951;hb=3c4e51fad6dbd595a2fb1e34f11e5a804b9b33ab;hp=cf2de096d00b9d3ea29fe3ef7a1c88e22ce02462;hpb=280751384120a61d8858bea0217061a98434f073;p=chaz%2Ftar diff --git a/src/list.c b/src/list.c index cf2de09..f2605ad 100644 --- a/src/list.c +++ b/src/list.c @@ -1,7 +1,8 @@ /* List a tar archive, with support routines for reading a tar archive. Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, - 2001, 2003, 2004, 2005, 2006, 2007, 2010 Free Software Foundation, Inc. + 2001, 2003, 2004, 2005, 2006, 2007, 2010, 2012 + Free Software Foundation, Inc. Written by John Gilmore, on 1985-08-26. @@ -604,6 +605,8 @@ decode_header (union block *header, struct tar_stat_info *stat_info, assign_string (&stat_info->gname, header->header.gname[0] ? header->header.gname : NULL); + xheader_xattr_init (stat_info); + if (format == OLDGNU_FORMAT && incremental_option) { stat_info->atime.tv_sec = TIME_FROM_HEADER (header->oldgnu_header.atime); @@ -1064,7 +1067,7 @@ static void simple_print_header (struct tar_stat_info *st, union block *blk, off_t block_ordinal) { - char modes[11]; + char modes[12]; char const *time_stamp; int time_stamp_len; char *temp_name; @@ -1156,6 +1159,9 @@ simple_print_header (struct tar_stat_info *st, union block *blk, pax_decode_mode (st->stat.st_mode, modes + 1); + /* extended attributes: GNU `ls -l'-like preview */ + xattrs_print_char (st, modes + 10); + /* Time stamp. */ time_stamp = tartime (st->mtime, full_time_option); @@ -1301,6 +1307,7 @@ simple_print_header (struct tar_stat_info *st, union block *blk, } } fflush (stdlis); + xattrs_print (st); } @@ -1357,8 +1364,8 @@ print_for_mkdir (char *dirname, int length, mode_t mode) STRINGIFY_BIGINT (current_block_ordinal (), buf)); } - fprintf (stdlis, "%s %*s %.*s\n", modes, ugswidth + 1 + datewidth, - _("Creating directory:"), length, quotearg (dirname)); + fprintf (stdlis, "%s %*s %s\n", modes, ugswidth + 1 + datewidth, + _("Creating directory:"), quotearg (dirname)); } } @@ -1415,7 +1422,7 @@ skip_member (void) } void -test_archive_label () +test_archive_label (void) { base64_init (); name_gather ();