Separate and make XA information public.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# $Id: Makefile.am,v 1.7 2003/08/17 05:31:19 rocky Exp $
|
# $Id: Makefile.am,v 1.8 2003/08/31 07:39:45 rocky Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
# Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||||
#
|
#
|
||||||
@@ -30,7 +30,8 @@ libcdioinclude_HEADERS = \
|
|||||||
sector.h \
|
sector.h \
|
||||||
types.h \
|
types.h \
|
||||||
util.h \
|
util.h \
|
||||||
version.h
|
version.h \
|
||||||
|
xa.h
|
||||||
|
|
||||||
EXTRA_DIST = version.h.in
|
EXTRA_DIST = version.h.in
|
||||||
BUILT_SOURCES = version.h
|
BUILT_SOURCES = version.h
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: iso9660.h,v 1.8 2003/08/31 06:59:23 rocky Exp $
|
$Id: iso9660.h,v 1.9 2003/08/31 07:39:45 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <cdio/types.h>
|
#include <cdio/types.h>
|
||||||
|
|
||||||
#include <cdio/cdio.h>
|
#include <cdio/cdio.h>
|
||||||
|
#include <cdio/xa.h>
|
||||||
|
|
||||||
#define MIN_TRACK_SIZE 4*75
|
#define MIN_TRACK_SIZE 4*75
|
||||||
|
|
||||||
@@ -55,6 +56,10 @@ enum strncpy_pad_check {
|
|||||||
ISO9660_DCHARS
|
ISO9660_DCHARS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct iso9660_pvd iso9660_pvd_t;
|
||||||
|
typedef struct iso9660_dir iso9660_dir_t;
|
||||||
|
typedef struct iso9660_stat iso9660_stat_t;
|
||||||
|
|
||||||
PRAGMA_BEGIN_PACKED
|
PRAGMA_BEGIN_PACKED
|
||||||
|
|
||||||
struct iso9660_pvd {
|
struct iso9660_pvd {
|
||||||
@@ -93,8 +98,6 @@ struct iso9660_pvd {
|
|||||||
char unused5[653];
|
char unused5[653];
|
||||||
} GNUC_PACKED;
|
} GNUC_PACKED;
|
||||||
|
|
||||||
typedef struct iso9660_pvd iso9660_pvd_t;
|
|
||||||
|
|
||||||
struct iso9660_dir {
|
struct iso9660_dir {
|
||||||
uint8_t length; /* 711 */
|
uint8_t length; /* 711 */
|
||||||
uint8_t ext_attr_length; /* 711 */
|
uint8_t ext_attr_length; /* 711 */
|
||||||
@@ -109,12 +112,16 @@ struct iso9660_dir {
|
|||||||
char name[EMPTY_ARRAY_SIZE];
|
char name[EMPTY_ARRAY_SIZE];
|
||||||
} GNUC_PACKED;
|
} GNUC_PACKED;
|
||||||
|
|
||||||
typedef struct iso9660_dir iso9660_dir_t;
|
struct iso9660_stat { /* big endian!! */
|
||||||
|
enum { _STAT_FILE = 1, _STAT_DIR = 2 } type;
|
||||||
|
lsn_t lsn; /* start logical sector number */
|
||||||
|
uint32_t size; /* total size in bytes */
|
||||||
|
uint32_t secsize; /* number of sectors allocated */
|
||||||
|
iso9660_xa_t xa; /* XA attributes */
|
||||||
|
};
|
||||||
|
|
||||||
PRAGMA_END_PACKED
|
PRAGMA_END_PACKED
|
||||||
|
|
||||||
typedef struct iso9660_stat iso9660_stat_t;
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
iso9660_strncpy_pad(char dst[], const char src[], size_t len,
|
iso9660_strncpy_pad(char dst[], const char src[], size_t len,
|
||||||
enum strncpy_pad_check _check);
|
enum strncpy_pad_check _check);
|
||||||
@@ -218,7 +225,6 @@ uint16_t
|
|||||||
iso9660_pathtable_m_add_entry (void *pt, const char name[], uint32_t extent,
|
iso9660_pathtable_m_add_entry (void *pt, const char name[], uint32_t extent,
|
||||||
uint16_t parent);
|
uint16_t parent);
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns a string which interpreting the extended attribute xa_attr.
|
Returns a string which interpreting the extended attribute xa_attr.
|
||||||
For example:
|
For example:
|
||||||
|
|||||||
57
include/cdio/xa.h
Normal file
57
include/cdio/xa.h
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
$Id: xa.h,v 1.1 2003/08/31 07:39:45 rocky Exp $
|
||||||
|
|
||||||
|
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
|
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* XA attribute definitions */
|
||||||
|
#define XA_ATTR_U_READ (1 << 0)
|
||||||
|
/* reserved */
|
||||||
|
#define XA_ATTR_U_EXEC (1 << 2)
|
||||||
|
/* reserved */
|
||||||
|
#define XA_ATTR_G_READ (1 << 4)
|
||||||
|
/* reserved */
|
||||||
|
#define XA_ATTR_G_EXEC (1 << 6)
|
||||||
|
/* reserved */
|
||||||
|
#define XA_ATTR_O_READ (1 << 8)
|
||||||
|
/* reserved */
|
||||||
|
#define XA_ATTR_O_EXEC (1 << 10)
|
||||||
|
|
||||||
|
#define XA_ATTR_MODE2FORM1 (1 << 11)
|
||||||
|
#define XA_ATTR_MODE2FORM2 (1 << 12)
|
||||||
|
#define XA_ATTR_INTERLEAVED (1 << 13)
|
||||||
|
#define XA_ATTR_CDDA (1 << 14)
|
||||||
|
#define XA_ATTR_DIRECTORY (1 << 15)
|
||||||
|
|
||||||
|
/* some aggregations */
|
||||||
|
#define XA_PERM_ALL_READ (XA_ATTR_U_READ | XA_ATTR_G_READ | XA_ATTR_O_READ)
|
||||||
|
#define XA_PERM_ALL_EXEC (XA_ATTR_U_EXEC | XA_ATTR_G_EXEC | XA_ATTR_O_EXEC)
|
||||||
|
#define XA_PERM_ALL_ALL (XA_PERM_ALL_READ | XA_PERM_ALL_EXEC)
|
||||||
|
|
||||||
|
typedef struct iso9660_xa iso9660_xa_t;
|
||||||
|
|
||||||
|
struct iso9660_xa /* big endian!! */
|
||||||
|
{
|
||||||
|
uint16_t user_id; /* 0 */
|
||||||
|
uint16_t group_id; /* 0 */
|
||||||
|
uint16_t attributes; /* XA_ATTR_ */
|
||||||
|
uint8_t signature[2]; /* { 'X', 'A' } */
|
||||||
|
uint8_t filenum; /* file number, see also XA subheader */
|
||||||
|
uint8_t reserved[5]; /* zero */
|
||||||
|
} GNUC_PACKED;
|
||||||
|
|
||||||
Reference in New Issue
Block a user