all: Add iso9660_get_rock_attr_str to get an ls-like mode string for rock
ridge.
{cd,iso}-info.c util.{c,h}: put common printing routine in util.c
rock.h: add enum for NM flags
iso9660.h: move mode_t typedef so it can be used in rock.h
xa.{c,h}: small typos.
test/*: in most cases better output. On VCD's however there there is a
slight regression on displaying the filename someitmes. Will be
addressed later.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso-info.c,v 1.24 2005/02/19 11:43:05 rocky Exp $
|
||||
$Id: iso-info.c,v 1.25 2005/02/20 10:21:01 rocky Exp $
|
||||
|
||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -202,8 +202,6 @@ print_iso9660_recurse (iso9660_t *p_iso, const char pathname[])
|
||||
char *iso_name = p_statbuf->filename;
|
||||
char _fullname[4096] = { 0, };
|
||||
char translated_name[MAX_ISONAME+1];
|
||||
#define DATESTR_SIZE 30
|
||||
char date_str[DATESTR_SIZE];
|
||||
|
||||
if (yep != p_statbuf->b_rock) {
|
||||
iso9660_name_translate_ext(iso_name, translated_name, i_joliet_level);
|
||||
@@ -214,7 +212,6 @@ print_iso9660_recurse (iso9660_t *p_iso, const char pathname[])
|
||||
iso_name);
|
||||
}
|
||||
|
||||
|
||||
strncat (_fullname, "/", sizeof (_fullname));
|
||||
|
||||
if (p_statbuf->type == _STAT_DIR
|
||||
@@ -223,26 +220,10 @@ print_iso9660_recurse (iso9660_t *p_iso, const char pathname[])
|
||||
_cdio_list_append (dirlist, strdup (_fullname));
|
||||
|
||||
if (opts.print_iso9660) {
|
||||
if (iso9660_ifs_is_xa(p_iso) && 0 == opts.no_xa) {
|
||||
printf ( " %c %s %d %d [fn %.2d] [LSN %6lu] ",
|
||||
(p_statbuf->type == _STAT_DIR) ? 'd' : '-',
|
||||
iso9660_get_xa_attr_str (p_statbuf->xa.attributes),
|
||||
uint16_from_be (p_statbuf->xa.user_id),
|
||||
uint16_from_be (p_statbuf->xa.group_id),
|
||||
p_statbuf->xa.filenum,
|
||||
(long unsigned int) p_statbuf->lsn);
|
||||
|
||||
if (uint16_from_be(p_statbuf->xa.attributes) & XA_ATTR_MODE2FORM2) {
|
||||
printf ("%9u (%9u)",
|
||||
(unsigned int) p_statbuf->secsize * M2F2_SECTOR_SIZE,
|
||||
(unsigned int) p_statbuf->size);
|
||||
}
|
||||
} else {
|
||||
printf ("%9u", (unsigned int) p_statbuf->size);
|
||||
}
|
||||
strftime(date_str, DATESTR_SIZE, "%b %d %Y %H:%M ", &p_statbuf->tm);
|
||||
printf (" %s %s\n", date_str,
|
||||
yep == p_statbuf->b_rock ? iso_name : translated_name);
|
||||
print_fs_attrs(p_statbuf,
|
||||
0 == opts.no_rock_ridge,
|
||||
iso9660_ifs_is_xa(p_iso) && 0 == opts.no_xa,
|
||||
iso_name, translated_name);
|
||||
} else
|
||||
if ( strcmp (iso_name, ".") && strcmp (iso_name, ".."))
|
||||
printf("%9u %s%s\n", p_statbuf->size, pathname,
|
||||
|
||||
Reference in New Issue
Block a user