Made code branch of Libisofs_with_aaiP unconditional

and removed change marks by (co-)copyright claims.
This commit is contained in:
Thomas Schmitt 2009-02-18 23:01:14 +01:00
parent c1ba7d93d9
commit 0e0ecc1d00
13 changed files with 54 additions and 461 deletions

View File

@ -16,9 +16,8 @@
* *
*/ */
/* ts A90218 : libburn.h is not necessarily available */
/* /*
# include "libburn/libburn.h" Use the copy of the struct burn_source definition in libisofs.h
*/ */
#define LIBISOFS_WITHOUT_LIBBURN yes #define LIBISOFS_WITHOUT_LIBBURN yes
#include "libisofs.h" #include "libisofs.h"

View File

@ -1,29 +1,25 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. See COPYING file for details. * published by the Free Software Foundation. See COPYING file for details.
*/ */
/* ts A90116 : libisofs.h eventually defines aaip_xinfo_func */ /* libisofs.h defines aaip_xinfo_func */
#include "libisofs.h" #include "libisofs.h"
#include "builder.h" #include "builder.h"
#include "node.h" #include "node.h"
#include "fsource.h" #include "fsource.h"
/* ts A90121 : needed for image->builder_ignore_acl */
#include "image.h" #include "image.h"
#include "aaip_0_2.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
/* ts A90207 */
#ifdef Libisofs_with_aaiP
#include "aaip_0_2.h"
#endif
void iso_node_builder_ref(IsoNodeBuilder *builder) void iso_node_builder_ref(IsoNodeBuilder *builder)
@ -97,11 +93,8 @@ int default_create_node(IsoNodeBuilder *builder, IsoImage *image,
struct stat info; struct stat info;
IsoNode *new; IsoNode *new;
char *name; char *name;
#ifdef Libisofs_with_aaiP
unsigned char *aa_string; unsigned char *aa_string;
char *a_text = NULL, *d_text = NULL; char *a_text = NULL, *d_text = NULL;
#endif /* Libisofs_with_aaiP */
if (builder == NULL || src == NULL || node == NULL) { if (builder == NULL || src == NULL || node == NULL) {
return ISO_NULL_POINTER; return ISO_NULL_POINTER;
@ -191,9 +184,6 @@ int default_create_node(IsoNodeBuilder *builder, IsoImage *image,
iso_node_set_ctime(new, info.st_ctime); iso_node_set_ctime(new, info.st_ctime);
iso_node_set_uid(new, info.st_uid); iso_node_set_uid(new, info.st_uid);
#ifdef Libisofs_with_aaiP
/* ts A90207 */
/* Eventually set S_IRWXG from ACL */ /* Eventually set S_IRWXG from ACL */
if (image->builder_ignore_acl) { if (image->builder_ignore_acl) {
ret = iso_file_source_get_aa_string(src, &aa_string, 4); ret = iso_file_source_get_aa_string(src, &aa_string, 4);
@ -207,8 +197,7 @@ int default_create_node(IsoNodeBuilder *builder, IsoImage *image,
1 << 15); /* free ACL texts */ 1 << 15); /* free ACL texts */
} }
/* ts A90115 */ /* Obtain ownership of eventual AA string */
/* obtain ownership of eventual AA string */
ret = iso_file_source_get_aa_string(src, &aa_string, ret = iso_file_source_get_aa_string(src, &aa_string,
1 | (image->builder_ignore_acl << 1) | 1 | (image->builder_ignore_acl << 1) |
(image->builder_ignore_ea << 2 )); (image->builder_ignore_ea << 2 ));
@ -218,8 +207,6 @@ int default_create_node(IsoNodeBuilder *builder, IsoImage *image,
return ret; return ret;
} }
#endif /* Libisofs_with_aaiP */
*node = new; *node = new;
return ISO_SUCCESS; return ISO_SUCCESS;

View File

@ -1,15 +1,15 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2007 Mario Danic * Copyright (c) 2007 Mario Danic
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. See COPYING file for details. * published by the Free Software Foundation. See COPYING file for details.
*/ */
/* ts A90218 : libburn.h is not necessarily available */
/* /*
# include "libburn/libburn.h" Use the copy of the struct burn_source definition in libisofs.h
*/ */
#define LIBISOFS_WITHOUT_LIBBURN yes #define LIBISOFS_WITHOUT_LIBBURN yes
#include "libisofs.h" #include "libisofs.h"
@ -887,10 +887,7 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
target->rockridge = opts->rockridge; target->rockridge = opts->rockridge;
target->joliet = opts->joliet; target->joliet = opts->joliet;
target->iso1999 = opts->iso1999; target->iso1999 = opts->iso1999;
/* ts A90122 */
target->aaip = opts->aaip; target->aaip = opts->aaip;
target->always_gmt = opts->always_gmt; target->always_gmt = opts->always_gmt;
target->ino = 0; target->ino = 0;
target->omit_version_numbers = opts->omit_version_numbers target->omit_version_numbers = opts->omit_version_numbers
@ -1520,7 +1517,6 @@ int iso_write_opts_set_rrip_version_1_10(IsoWriteOpts *opts, int oldvers)
return ISO_SUCCESS; return ISO_SUCCESS;
} }
/* ts A90125 */
int iso_write_opts_set_aaip_susp_1_10(IsoWriteOpts *opts, int oldvers) int iso_write_opts_set_aaip_susp_1_10(IsoWriteOpts *opts, int oldvers)
{ {
if (opts == NULL) { if (opts == NULL) {

View File

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
@ -42,7 +43,6 @@ struct iso_write_opts {
unsigned int joliet :1; unsigned int joliet :1;
unsigned int iso1999 :1; unsigned int iso1999 :1;
/* ts A90122 */
unsigned int aaip :1; /* whether to write eventual ACL and EAs */ unsigned int aaip :1; /* whether to write eventual ACL and EAs */
/* allways write timestamps in GMT */ /* allways write timestamps in GMT */
@ -115,7 +115,6 @@ struct iso_write_opts {
*/ */
unsigned int rrip_version_1_10 :1; unsigned int rrip_version_1_10 :1;
/* ts A90125 */
/** /**
* Write AAIP as extension according to SUSP 1.10 rather than SUSP 1.12. * Write AAIP as extension according to SUSP 1.10 rather than SUSP 1.12.
* I.e. without announcing it by an ER field and thus without the need * I.e. without announcing it by an ER field and thus without the need
@ -262,7 +261,6 @@ struct ecma119_image
unsigned int eltorito :1; unsigned int eltorito :1;
unsigned int iso1999 :1; unsigned int iso1999 :1;
/* ts A90122 */
unsigned int aaip :1; /* whether to write eventual ACLs and EAs */ unsigned int aaip :1; /* whether to write eventual ACLs and EAs */
/* allways write timestamps in GMT */ /* allways write timestamps in GMT */
@ -285,7 +283,6 @@ struct ecma119_image
/** Write old fashioned RRIP-1.10 rather than RRIP-1.12 */ /** Write old fashioned RRIP-1.10 rather than RRIP-1.12 */
unsigned int rrip_version_1_10 :1; unsigned int rrip_version_1_10 :1;
/* ts A90125 */
/* Write AAIP as extension according to SUSP 1.10 rather than SUSP 1.12. */ /* Write AAIP as extension according to SUSP 1.10 rather than SUSP 1.12. */
unsigned int aaip_susp_1_10 :1; unsigned int aaip_susp_1_10 :1;

View File

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
@ -18,10 +19,7 @@
#include "image.h" #include "image.h"
#include "tree.h" #include "tree.h"
#include "eltorito.h" #include "eltorito.h"
#ifdef Libisofs_with_aaiP
#include "aaip_0_2.h" #include "aaip_0_2.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -61,11 +59,7 @@ struct iso_read_opts
unsigned int norock : 1; /*< Do not read Rock Ridge extensions */ unsigned int norock : 1; /*< Do not read Rock Ridge extensions */
unsigned int nojoliet : 1; /*< Do not read Joliet extensions */ unsigned int nojoliet : 1; /*< Do not read Joliet extensions */
unsigned int noiso1999 : 1; /*< Do not read ISO 9660:1999 enhanced tree */ unsigned int noiso1999 : 1; /*< Do not read ISO 9660:1999 enhanced tree */
unsigned int noaaip : 1; /* Do not read AAIP extension for xattr and ACL */
#ifdef Libisofs_with_aaiP
/* ts A90121 */
unsigned int noaaip : 1; /* Do not read AAIP extension for EA and ACL */
#endif /* Libisofs_with_aaiP */
/** /**
* When both Joliet and RR extensions are present, the RR tree is used. * When both Joliet and RR extensions are present, the RR tree is used.
@ -222,9 +216,6 @@ typedef struct
/** If ISO 9660:1999 is available on image */ /** If ISO 9660:1999 is available on image */
unsigned int iso1999 : 1; unsigned int iso1999 : 1;
#ifdef Libisofs_with_aaiP
/* ts A90121 */
/** Whether AAIP info shall be loaded if it is present. /** Whether AAIP info shall be loaded if it is present.
* 1 = yes , 0 = no * 1 = yes , 0 = no
*/ */
@ -235,8 +226,6 @@ typedef struct
*/ */
int aaip_version; int aaip_version;
#endif /* ! Libisofs_with_aaiP */
/** /**
* Number of blocks of the volume, as reported in the PVM. * Number of blocks of the volume, as reported in the PVM.
*/ */
@ -290,9 +279,6 @@ struct image_fs_data
off_t offset; off_t offset;
} data; } data;
#ifdef Libisofs_with_aaiP
/* ts A90114 */
/** /**
* malloc() storage for the string of AA fields which represent * malloc() storage for the string of AA fields which represent
* ACLs and XFS-style Extended Attributes. (Not to be confused with * ACLs and XFS-style Extended Attributes. (Not to be confused with
@ -300,9 +286,6 @@ struct image_fs_data
*/ */
unsigned char *aa_string; unsigned char *aa_string;
#endif /* Libisofs_with_aaiP */
}; };
struct child_list struct child_list
@ -945,21 +928,12 @@ void ifs_free(IsoFileSource *src)
free(data->sections); free(data->sections);
free(data->name); free(data->name);
#ifdef Libisofs_with_aaiP
/* ts A90115 */
if (data->aa_string != NULL) if (data->aa_string != NULL)
free(data->aa_string); free(data->aa_string);
#endif /* Libisofs_with_aaiP */
free(data); free(data);
} }
#ifdef Libisofs_with_aaiP
static static
int ifs_get_aa_string(IsoFileSource *src, unsigned char **aa_string, int flag) int ifs_get_aa_string(IsoFileSource *src, unsigned char **aa_string, int flag)
{ {
@ -981,17 +955,10 @@ int ifs_get_aa_string(IsoFileSource *src, unsigned char **aa_string, int flag)
return 1; return 1;
} }
#endif /* Libisofs_with_aaiP */
IsoFileSourceIface ifs_class = { IsoFileSourceIface ifs_class = {
#ifdef Libisofs_with_aaiP
1, /* version */ 1, /* version */
#else
0, /* version */
#endif
ifs_get_path, ifs_get_path,
ifs_get_name, ifs_get_name,
ifs_lstat, ifs_lstat,
@ -1004,12 +971,8 @@ IsoFileSourceIface ifs_class = {
ifs_readlink, ifs_readlink,
ifs_get_filesystem, ifs_get_filesystem,
ifs_free, ifs_free,
ifs_lseek ifs_lseek,
#ifdef Libisofs_with_aaiP
,
ifs_get_aa_string ifs_get_aa_string
#endif
}; };
@ -1082,16 +1045,10 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent,
uint32_t relocated_dir = 0; uint32_t relocated_dir = 0;
#ifdef Libisofs_with_aaiP
/* ts A90115 */
unsigned char *aa_string = NULL; unsigned char *aa_string = NULL;
size_t aa_size = 0, aa_len = 0, prev_field = 0; size_t aa_size = 0, aa_len = 0, prev_field = 0;
int aa_done = 0; int aa_done = 0;
#endif /* Libisofs_with_aaiP */
if (fs == NULL || fs->data == NULL || record == NULL || src == NULL) { if (fs == NULL || fs->data == NULL || record == NULL || src == NULL) {
return ISO_NULL_POINTER; return ISO_NULL_POINTER;
} }
@ -1332,10 +1289,6 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent,
} }
continue; continue;
#ifdef Libisofs_with_aaiP
/* ts A90115 */
/* Need to read AA in any case so it is available for S_IRWXG /* Need to read AA in any case so it is available for S_IRWXG
mapping in case that fsdata->aaip_load != 1 mapping in case that fsdata->aaip_load != 1
*/ */
@ -1350,10 +1303,7 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent,
continue; continue;
} }
#endif /* Libisofs_with_aaiP */ /* This message is inflationary */
/* ts A90112 : this message is inflationary */
/* /*
} else { } else {
ret = iso_msg_submit(fsdata->msgid, ISO_SUSP_UNHANDLED, 0, ret = iso_msg_submit(fsdata->msgid, ISO_SUSP_UNHANDLED, 0,
@ -1609,14 +1559,8 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent,
} }
ifsdata->info = atts; ifsdata->info = atts;
ifsdata->name = name; ifsdata->name = name;
#ifdef Libisofs_with_aaiP
ifsdata->aa_string = aa_string; ifsdata->aa_string = aa_string;
#endif /* Libisofs_with_aaiP */
/* save extents */ /* save extents */
ifsdata->sections = realloc(ifsdata->sections, ifsdata->sections = realloc(ifsdata->sections,
(1 + ifsdata->nsections) * sizeof(struct iso_file_section)); (1 + ifsdata->nsections) * sizeof(struct iso_file_section));
@ -1983,12 +1927,10 @@ int read_root_susp_entries(_ImageFsData *data, uint32_t block)
(strncmp((char*)sue->data.ER.ext_id, "AAIP_0002", 9) == 0 || (strncmp((char*)sue->data.ER.ext_id, "AAIP_0002", 9) == 0 ||
strncmp((char*)sue->data.ER.ext_id, "AAIP_0100", 9) == 0)) { strncmp((char*)sue->data.ER.ext_id, "AAIP_0100", 9) == 0)) {
/* ts A90113 : tolerate AAIP ER even if not supported */ /* Tolerate AAIP ER even if not supported */
iso_msg_debug(data->msgid, iso_msg_debug(data->msgid,
"Suitable AAIP ER found."); "Suitable AAIP ER found.");
#ifdef Libisofs_with_aaiP
if (((char*)sue->data.ER.ext_id)[6] == '1') if (((char*)sue->data.ER.ext_id)[6] == '1')
data->aaip_version = 100; data->aaip_version = 100;
else else
@ -1997,13 +1939,6 @@ int read_root_susp_entries(_ImageFsData *data, uint32_t block)
iso_msg_submit(data->msgid, ISO_AAIP_IGNORED, 0, iso_msg_submit(data->msgid, ISO_AAIP_IGNORED, 0,
"Identifier for extension AAIP found, but loading is not enabled."); "Identifier for extension AAIP found, but loading is not enabled.");
#else /* Libisofs_with_aaiP */
iso_msg_submit(data->msgid, ISO_AAIP_IGNORED, 0,
"Identifier for future extension AAIP found and ignored.");
#endif /* ! Libisofs_with_aaiP */
} else { } else {
ret = iso_msg_submit(data->msgid, ISO_SUSP_MULTIPLE_ER, 0, ret = iso_msg_submit(data->msgid, ISO_SUSP_MULTIPLE_ER, 0,
"Unknown Extension Signature found in ER.\n" "Unknown Extension Signature found in ER.\n"
@ -2170,16 +2105,9 @@ int iso_image_filesystem_new(IsoDataSource *src, struct iso_read_opts *opts,
data->file_mode = opts->file_mode & ~S_IFMT; data->file_mode = opts->file_mode & ~S_IFMT;
data->dir_mode = opts->dir_mode & ~S_IFMT; data->dir_mode = opts->dir_mode & ~S_IFMT;
data->msgid = msgid; data->msgid = msgid;
#ifdef Libisofs_with_aaiP
/* ts A90121 */
data->aaip_load = !opts->noaaip; data->aaip_load = !opts->noaaip;
data->aaip_version = -1; data->aaip_version = -1;
#endif /* Libisofs_with_aaiP */
/* ??? ts Nov 25 2008 : /* ??? ts Nov 25 2008 :
Shouldn't this go to library initialization or even to app ? Shouldn't this go to library initialization or even to app ?
*/ */
@ -2385,10 +2313,7 @@ int image_builder_create_node(IsoNodeBuilder *builder, IsoImage *image,
IsoNode *new; IsoNode *new;
char *name; char *name;
ImageFileSourceData *data; ImageFileSourceData *data;
#ifdef Libisofs_with_aaiP
unsigned char *aa_string; unsigned char *aa_string;
#endif /* Libisofs_with_aaiP */
if (builder == NULL || src == NULL || node == NULL || src->data == NULL) { if (builder == NULL || src == NULL || node == NULL || src->data == NULL) {
return ISO_NULL_POINTER; return ISO_NULL_POINTER;
@ -2560,10 +2485,7 @@ int image_builder_create_node(IsoNodeBuilder *builder, IsoImage *image,
new->next = NULL; new->next = NULL;
*node = new; *node = new;
#ifdef Libisofs_with_aaiP /* Obtain ownership of eventual AA string */
/* ts A90115 */
/* obtain ownership of eventual AA string */
ret = iso_file_source_get_aa_string(src, &aa_string, 1); ret = iso_file_source_get_aa_string(src, &aa_string, 1);
if (ret == 1 && aa_string != NULL) { if (ret == 1 && aa_string != NULL) {
_ImageFsData *fsdata = data->fs->data; _ImageFsData *fsdata = data->fs->data;
@ -2575,7 +2497,6 @@ int image_builder_create_node(IsoNodeBuilder *builder, IsoImage *image,
return ret; return ret;
} else { } else {
/* ts A90208 */
/* Look for ACL and perform S_IRWXG mapping */ /* Look for ACL and perform S_IRWXG mapping */
if (aa_string != NULL) if (aa_string != NULL)
iso_aa_get_acl_text(aa_string, info.st_mode, &a_text, &d_text, iso_aa_get_acl_text(aa_string, info.st_mode, &a_text, &d_text,
@ -2589,9 +2510,6 @@ int image_builder_create_node(IsoNodeBuilder *builder, IsoImage *image,
aaip_xinfo_func(aa_string, 1); aaip_xinfo_func(aa_string, 1);
} }
} }
#endif /* Libisofs_with_aaiP */
return ISO_SUCCESS; return ISO_SUCCESS;
} }
@ -2966,14 +2884,8 @@ int iso_read_opts_new(IsoReadOpts **opts, int profile)
ropts->file_mode = 0444; ropts->file_mode = 0444;
ropts->dir_mode = 0555; ropts->dir_mode = 0555;
#ifdef Libisofs_with_aaiP
/* ts A90121 */
ropts->noaaip= 1; ropts->noaaip= 1;
#endif /* Libisofs_with_aaiP */
*opts = ropts; *opts = ropts;
return ISO_SUCCESS; return ISO_SUCCESS;
} }
@ -3024,22 +2936,15 @@ int iso_read_opts_set_no_iso1999(IsoReadOpts *opts, int noiso1999)
return ISO_SUCCESS; return ISO_SUCCESS;
} }
/* ts A90121 */
int iso_read_opts_set_no_aaip(IsoReadOpts *opts, int noaaip) int iso_read_opts_set_no_aaip(IsoReadOpts *opts, int noaaip)
{ {
if (opts == NULL) { if (opts == NULL) {
return ISO_NULL_POINTER; return ISO_NULL_POINTER;
} }
#ifdef Libisofs_with_aaiP
opts->noaaip = noaaip ? 1 : 0; opts->noaaip = noaaip ? 1 : 0;
#endif /* Libisofs_with_aaiP */
return ISO_SUCCESS; return ISO_SUCCESS;
} }
int iso_read_opts_set_preferjoliet(IsoReadOpts *opts, int preferjoliet) int iso_read_opts_set_preferjoliet(IsoReadOpts *opts, int preferjoliet)
{ {
if (opts == NULL) { if (opts == NULL) {

View File

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
@ -10,15 +11,9 @@
* Filesystem/FileSource implementation to access the local filesystem. * Filesystem/FileSource implementation to access the local filesystem.
*/ */
/* ts A90116 : libisofs.h eventually defines Libisofs_with_aaiP */
#include "libisofs.h"
#include "fsource.h" #include "fsource.h"
#include "util.h" #include "util.h"
#ifdef Libisofs_with_aaiP
#include "aaip_0_2.h" #include "aaip_0_2.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
@ -475,10 +470,6 @@ void lfs_free(IsoFileSource *src)
} }
#ifdef Libisofs_with_aaiP
/* ts A90116 */
static static
int lfs_get_aa_string(IsoFileSource *src, unsigned char **aa_string, int flag) int lfs_get_aa_string(IsoFileSource *src, unsigned char **aa_string, int flag)
{ {
@ -528,17 +519,10 @@ ex:;
return ret; return ret;
} }
#endif /* Libisofs_with_aaiP */
IsoFileSourceIface lfs_class = { IsoFileSourceIface lfs_class = {
#ifdef Libisofs_with_aaiP
1, /* version */ 1, /* version */
#else
0, /* version */
#endif
lfs_get_path, lfs_get_path,
lfs_get_name, lfs_get_name,
lfs_lstat, lfs_lstat,
@ -551,12 +535,8 @@ IsoFileSourceIface lfs_class = {
lfs_readlink, lfs_readlink,
lfs_get_filesystem, lfs_get_filesystem,
lfs_free, lfs_free,
lfs_lseek lfs_lseek,
#ifdef Libisofs_with_aaiP
,
lfs_get_aa_string lfs_get_aa_string
#endif
}; };
@ -770,55 +750,29 @@ int iso_local_filesystem_new(IsoFilesystem **fs)
} }
/* ts A90127 */
int iso_local_get_acl_text(char *disk_path, char **text, int flag) int iso_local_get_acl_text(char *disk_path, char **text, int flag)
{ {
#ifdef Libisofs_with_aaiP
int ret; int ret;
ret = aaip_get_acl_text(disk_path, text, flag & (1 | 16 | 32 | (1 << 15))); ret = aaip_get_acl_text(disk_path, text, flag & (1 | 16 | 32 | (1 << 15)));
return ret; return ret;
#else /* Libisofs_with_aaiP */
return 0;
#endif /* ! Libisofs_with_aaiP */
} }
/* ts A90118 */
int iso_local_set_acl_text(char *disk_path, char *text, int flag) int iso_local_set_acl_text(char *disk_path, char *text, int flag)
{ {
#ifdef Libisofs_with_aaiP
int ret; int ret;
ret = aaip_set_acl_text(disk_path, text, flag & (1 | 32)); ret = aaip_set_acl_text(disk_path, text, flag & (1 | 32));
if (ret < 0) if (ret < 0)
return ISO_AAIP_NO_SET_LOCAL; return ISO_AAIP_NO_SET_LOCAL;
return ret; return ret;
#else /* Libisofs_with_aaiP */
return 0;
#endif /* ! Libisofs_with_aaiP */
} }
/* ts A90131 */
int iso_local_get_attrs(char *disk_path, size_t *num_attrs, char ***names, int iso_local_get_attrs(char *disk_path, size_t *num_attrs, char ***names,
size_t **value_lengths, char ***values, int flag) size_t **value_lengths, char ***values, int flag)
{ {
#ifdef Libisofs_with_aaiP
int ret; int ret;
ret = aaip_get_attr_list(disk_path, ret = aaip_get_attr_list(disk_path,
@ -827,26 +781,12 @@ int iso_local_get_attrs(char *disk_path, size_t *num_attrs, char ***names,
if (ret <= 0) if (ret <= 0)
return ISO_AAIP_NO_GET_LOCAL; return ISO_AAIP_NO_GET_LOCAL;
return 1; return 1;
#else /* Libisofs_with_aaiP */
*num_attrs = 0;
*names = NULL;
*value_lengths = NULL;
*values = NULL;
return 1;
#endif /* ! Libisofs_with_aaiP */
} }
/* ts A90131 */
int iso_local_set_attrs(char *disk_path, size_t num_attrs, char **names, int iso_local_set_attrs(char *disk_path, size_t num_attrs, char **names,
size_t *value_lengths, char **values, int flag) size_t *value_lengths, char **values, int flag)
{ {
#ifdef Libisofs_with_aaiP
int ret; int ret;
ret = aaip_set_attr_list(disk_path, num_attrs, names, value_lengths, ret = aaip_set_attr_list(disk_path, num_attrs, names, value_lengths,
@ -859,27 +799,14 @@ int iso_local_set_attrs(char *disk_path, size_t num_attrs, char **names,
return ISO_AAIP_NO_SET_LOCAL; return ISO_AAIP_NO_SET_LOCAL;
} }
return 1; return 1;
#else /* Libisofs_with_aaiP */
if (num_attrs > 0)
return ISO_AAIP_NOT_ENABLED;
return 1;
#endif /* ! Libisofs_with_aaiP */
} }
/* ts A90207 */
int iso_local_get_perms_wo_acl(char *disk_path, mode_t *st_mode, int flag) int iso_local_get_perms_wo_acl(char *disk_path, mode_t *st_mode, int flag)
{ {
struct stat stbuf; struct stat stbuf;
int ret; int ret;
#ifdef Libisofs_with_aaiP
char *a_text = NULL; char *a_text = NULL;
#endif
if (flag & 32) if (flag & 32)
ret = stat(disk_path, &stbuf); ret = stat(disk_path, &stbuf);
@ -888,17 +815,11 @@ int iso_local_get_perms_wo_acl(char *disk_path, mode_t *st_mode, int flag)
if (ret == -1) if (ret == -1)
return -1; return -1;
*st_mode = stbuf.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); *st_mode = stbuf.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
#ifdef Libisofs_with_aaiP
ret = iso_local_get_acl_text(disk_path, &a_text, 16 | (flag & 32)); ret = iso_local_get_acl_text(disk_path, &a_text, 16 | (flag & 32));
if (a_text != NULL) { if (a_text != NULL) {
aaip_cleanout_st_mode(a_text, st_mode, 4 | 16); aaip_cleanout_st_mode(a_text, st_mode, 4 | 16);
iso_local_get_acl_text(disk_path, &a_text, 1 << 15); /* free a_text */ iso_local_get_acl_text(disk_path, &a_text, 1 << 15); /* free a_text */
} }
#endif /* Libisofs_with_aaiP */
return 1; return 1;
} }

View File

@ -117,7 +117,6 @@ IsoFilesystem* iso_file_source_get_filesystem(IsoFileSource *src)
} }
/* ts A90115 */
inline inline
int iso_file_source_get_aa_string(IsoFileSource *src, int iso_file_source_get_aa_string(IsoFileSource *src,
unsigned char **aa_string, int flag) unsigned char **aa_string, int flag)

View File

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2007-2008 Vreixo Formoso, Mario Danic * Copyright (c) 2007-2008 Vreixo Formoso, Mario Danic
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
@ -472,7 +473,6 @@ struct iso_filesystem
*/ */
struct IsoFileSource_Iface struct IsoFileSource_Iface
{ {
/* ts A90114 */
/** /**
* Tells the version of the interface: * Tells the version of the interface:
* Version 0 provides functions up to (*lseek)(). * Version 0 provides functions up to (*lseek)().
@ -683,11 +683,10 @@ struct IsoFileSource_Iface
/* Add-ons of .version 1 begin here */ /* Add-ons of .version 1 begin here */
/* ts A90114 */
/** /**
* Valid only if .version is > 0. See above. * Valid only if .version is > 0. See above.
* Get the AA string with encoded ACL and XFS-style Extended Attributes * Get the AA string with encoded ACL and xattr.
* xattr. (Not to be confused with ECMA-119 Extended Attributes). * (Not to be confused with ECMA-119 Extended Attributes).
* *
* bit1 and bit2 of flag should be implemented so that freshly fetched * bit1 and bit2 of flag should be implemented so that freshly fetched
* info does not include the undesired ACL or xattr. Nevertheless if the * info does not include the undesired ACL or xattr. Nevertheless if the
@ -935,12 +934,11 @@ char *iso_get_local_charset(int flag);
int iso_image_new(const char *name, IsoImage **image); int iso_image_new(const char *name, IsoImage **image);
/* ts A90121 */
/** /**
* Control whether ACL and XFS-style Extended Attributes xattr will be * Control whether ACL and xattr will be imported from external filesystems
* imported from external filesystems (typically the local POSIX filesystem) * (typically the local POSIX filesystem) when new nodes get inserted. If
* when new nodes get inserted. If enabled by iso_write_opts_set_aaip() they * enabled by iso_write_opts_set_aaip() they will later be written into the
* will later be written into the image as AAIP extension fields. * image as AAIP extension fields.
* *
* A change of this setting does neither affect existing IsoNode objects * A change of this setting does neither affect existing IsoNode objects
* nor the way how ACL and xattr are handled when loading an ISO image. * nor the way how ACL and xattr are handled when loading an ISO image.
@ -1061,7 +1059,7 @@ int iso_lib_is_compatible(int major, int minor, int micro);
* ---> 1 [BACKUP] * ---> 1 [BACKUP]
* POSIX compatibility for backup. Simple settings, ISO level is set to * POSIX compatibility for backup. Simple settings, ISO level is set to
* 3 and RR extensions are enabled. Useful for backup purposes. * 3 and RR extensions are enabled. Useful for backup purposes.
* Note that ACL and XFS-style xattr are not enabled by default. * Note that ACL and xattr are not enabled by default.
* If you enable them, expect them not to show up in the mounted image. * If you enable them, expect them not to show up in the mounted image.
* They will have to be retrieved by libisofs applications like xorriso. * They will have to be retrieved by libisofs applications like xorriso.
* ---> 2 [DISTRIBUTION] * ---> 2 [DISTRIBUTION]
@ -1145,10 +1143,8 @@ int iso_write_opts_set_joliet(IsoWriteOpts *opts, int enable);
*/ */
int iso_write_opts_set_iso1999(IsoWriteOpts *opts, int enable); int iso_write_opts_set_iso1999(IsoWriteOpts *opts, int enable);
/* ts A90122 */
/** /**
* Control writing of AAIP informations for ACL and XFS-style Extended * Control writing of AAIP informations for ACL and xattr.
* Attributes xattr.
* For importing ACL and xattr when inserting nodes from external filesystems * For importing ACL and xattr when inserting nodes from external filesystems
* (e.g. the local POSIX filesystem) see iso_image_set_ignore_aclea(). * (e.g. the local POSIX filesystem) see iso_image_set_ignore_aclea().
* For loading of this information from images see iso_read_opts_set_no_aaip(). * For loading of this information from images see iso_read_opts_set_no_aaip().
@ -1251,7 +1247,6 @@ int iso_write_opts_set_joliet_longer_paths(IsoWriteOpts *opts, int allow);
*/ */
int iso_write_opts_set_rrip_version_1_10(IsoWriteOpts *opts, int oldvers); int iso_write_opts_set_rrip_version_1_10(IsoWriteOpts *opts, int oldvers);
/* ts A90125 */
/** /**
* Write AAIP as extension according to SUSP 1.10 rather than SUSP 1.12. * Write AAIP as extension according to SUSP 1.10 rather than SUSP 1.12.
* I.e. without announcing it by an ER field and thus without the need * I.e. without announcing it by an ER field and thus without the need
@ -1586,8 +1581,8 @@ int iso_read_opts_set_no_joliet(IsoReadOpts *opts, int nojoliet);
int iso_read_opts_set_no_iso1999(IsoReadOpts *opts, int noiso1999); int iso_read_opts_set_no_iso1999(IsoReadOpts *opts, int noiso1999);
/** /**
* Control reading of AAIP informations about ACL and XFS-style Extended * Control reading of AAIP informations about ACL and xattr when loading
* Attributes xattr when loading existing images. * existing images.
* For importing ACL and xattr when inserting nodes from external filesystems * For importing ACL and xattr when inserting nodes from external filesystems
* (e.g. the local POSIX filesystem) see iso_image_set_ignore_aclea(). * (e.g. the local POSIX filesystem) see iso_image_set_ignore_aclea().
* For eventual writing of this information see iso_write_opts_set_aaip(). * For eventual writing of this information see iso_write_opts_set_aaip().
@ -3752,7 +3747,7 @@ int iso_file_source_readlink(IsoFileSource *src, char *buf, size_t bufsiz);
/** /**
* Get the AA string with encoded ACL and XFS-style Extended Attributes xattr. * Get the AA string with encoded ACL and xattr.
* (Not to be confused with ECMA-119 Extended Attributes). * (Not to be confused with ECMA-119 Extended Attributes).
* @param src The file source object to be inquired. * @param src The file source object to be inquired.
* @param aa_string Returns a pointer to the AA string data. If no AA * @param aa_string Returns a pointer to the AA string data. If no AA
@ -4204,37 +4199,29 @@ void iso_stream_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id,
#define ISO_DATA_SOURCE_FATAL 0xF030FCFF #define ISO_DATA_SOURCE_FATAL 0xF030FCFF
/* ts A90121 */
/** AAIP info with ACL or xattr in ISO image will be ignored /** AAIP info with ACL or xattr in ISO image will be ignored
(NOTE, HIGH, -336) */ (NOTE, HIGH, -336) */
#define ISO_AAIP_IGNORED 0xB030FEB0 #define ISO_AAIP_IGNORED 0xB030FEB0
/* ts A90130 */
/** Error with decoding ACL from AAIP info (FAILURE, HIGH, -337) */ /** Error with decoding ACL from AAIP info (FAILURE, HIGH, -337) */
#define ISO_AAIP_BAD_ACL 0xE830FEAF #define ISO_AAIP_BAD_ACL 0xE830FEAF
/* ts A90130 */
/** Error with encoding ACL for AAIP (FAILURE, HIGH, -338) */ /** Error with encoding ACL for AAIP (FAILURE, HIGH, -338) */
#define ISO_AAIP_BAD_ACL_TEXT 0xE830FEAE #define ISO_AAIP_BAD_ACL_TEXT 0xE830FEAE
/* ts A90130 */
/** AAIP processing for ACL or xattr not enabled at compile time /** AAIP processing for ACL or xattr not enabled at compile time
(FAILURE, HIGH, -339) */ (FAILURE, HIGH, -339) */
#define ISO_AAIP_NOT_ENABLED 0xE830FEAD #define ISO_AAIP_NOT_ENABLED 0xE830FEAD
/* ts A90130 */
/** Error with decoding AAIP info for ACL or xattr (FAILURE, HIGH, -340) */ /** Error with decoding AAIP info for ACL or xattr (FAILURE, HIGH, -340) */
#define ISO_AAIP_BAD_AASTRING 0xE830FEAC #define ISO_AAIP_BAD_AASTRING 0xE830FEAC
/* ts A90131 */
/** Error with reading ACL or xattr from local file (FAILURE, HIGH, -341) */ /** Error with reading ACL or xattr from local file (FAILURE, HIGH, -341) */
#define ISO_AAIP_NO_GET_LOCAL 0xE830FEAB #define ISO_AAIP_NO_GET_LOCAL 0xE830FEAB
/* ts A90131 */
/** Error with attaching ACL or xattr to local file (FAILURE, HIGH, -342) */ /** Error with attaching ACL or xattr to local file (FAILURE, HIGH, -342) */
#define ISO_AAIP_NO_SET_LOCAL 0xE830FEAA #define ISO_AAIP_NO_SET_LOCAL 0xE830FEAA
/* ts A90206 */
/** Unallowed attempt to set an xattr with non-userspace name /** Unallowed attempt to set an xattr with non-userspace name
(FAILURE, HIGH, -343) */ (FAILURE, HIGH, -343) */
#define ISO_AAIP_NON_USER_NAME 0xE830FEA9 #define ISO_AAIP_NON_USER_NAME 0xE830FEA9
@ -4242,18 +4229,12 @@ void iso_stream_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id,
/* --------------------------------- AAIP --------------------------------- */ /* --------------------------------- AAIP --------------------------------- */
/* ts A90112 : Enable experiments about xattr and ACL
*/
#define Libisofs_with_aaiP yes
/* ts A90114 */
/** /**
* Function to identify and manage AA strings as xinfo of IsoNode. * Function to identify and manage AA strings as xinfo of IsoNode.
* *
* An AA string contains the Attribute List with the xattr and ACL of a node * An AA string contains the Attribute List with the xattr and ACL of a node
* in the image tree. It is formatted according to libisofs specification * in the image tree. It is formatted according to libisofs specification
* AAIP-0.2 and ready to be written into the System Use Area resp. Continuation * AAIP-1.0 and ready to be written into the System Use Area resp. Continuation
* Area of a directory entry in an ISO image. * Area of a directory entry in an ISO image.
* *
* Applications are not supposed to manipulate AA strings directly. They should * Applications are not supposed to manipulate AA strings directly. They should
@ -4272,7 +4253,6 @@ void iso_stream_get_id(IsoStream *stream, unsigned int *fs_id, dev_t *dev_id,
int aaip_xinfo_func(void *data, int flag); int aaip_xinfo_func(void *data, int flag);
/* ts A90130 */
/** /**
* Get the eventual ACLs which are associated with the node. * Get the eventual ACLs which are associated with the node.
* The result will be in "long" text form as of man acl resp. acl_to_text(). * The result will be in "long" text form as of man acl resp. acl_to_text().
@ -4306,7 +4286,6 @@ int iso_node_get_acl_text(IsoNode *node,
char **access_text, char **default_text, int flag); char **access_text, char **default_text, int flag);
/* ts A90130 */
/** /**
* Set the ACLs of the given node to the lists in parameters access_text and * Set the ACLs of the given node to the lists in parameters access_text and
* default_text or delete them. * default_text or delete them.
@ -4341,7 +4320,6 @@ int iso_node_get_acl_text(IsoNode *node,
int iso_node_set_acl_text(IsoNode *node, int iso_node_set_acl_text(IsoNode *node,
char *access_text, char *default_text, int flag); char *access_text, char *default_text, int flag);
/* ts A90206 */
/** /**
* Like iso_node_get_permissions but reflecting ACL entry "group::" in S_IRWXG * Like iso_node_get_permissions but reflecting ACL entry "group::" in S_IRWXG
* rather than ACL entry "mask::". This is necessary if the permissions of a * rather than ACL entry "mask::". This is necessary if the permissions of a
@ -4358,10 +4336,8 @@ int iso_node_set_acl_text(IsoNode *node,
mode_t iso_node_get_perms_wo_acl(const IsoNode *node); mode_t iso_node_get_perms_wo_acl(const IsoNode *node);
/* ts A90131 */
/** /**
* Get the list of XFS-style Extended Attributes xattr which is associated * Get the list of xattr which is associated with the node.
* with the node.
* The resulting data may finally be disposed by a call to this function * The resulting data may finally be disposed by a call to this function
* with flag bit15 set, or its components may be freed one-by-one. * with flag bit15 set, or its components may be freed one-by-one.
* The following values are either NULL or malloc() memory: * The following values are either NULL or malloc() memory:
@ -4401,10 +4377,8 @@ mode_t iso_node_get_perms_wo_acl(const IsoNode *node);
int iso_node_get_attrs(IsoNode *node, size_t *num_attrs, int iso_node_get_attrs(IsoNode *node, size_t *num_attrs,
char ***names, size_t **value_lengths, char ***values, int flag); char ***names, size_t **value_lengths, char ***values, int flag);
/* ts A90131 */
/** /**
* Set the list of XFS-style Extended Attributes xattr which is associated * Set the list of xattr which is associated with the node.
* with the node.
* The data get copied so that you may dispose your input data afterwards. * The data get copied so that you may dispose your input data afterwards.
* *
* If enabled by flag bit0 then the submitted list of attributes will not only * If enabled by flag bit0 then the submitted list of attributes will not only
@ -4442,16 +4416,17 @@ int iso_node_set_attrs(IsoNode *node, size_t num_attrs, char **names,
size_t *value_lengths, char **values, int flag); size_t *value_lengths, char **values, int flag);
/* -------- This is an interface to the ACL of the local filesystem -------- */ /* ----- This is an interface to ACL and xattr of the local filesystem ----- */
/** /**
* libisofs has an internal system dependent adapter to ACL operations. For * libisofs has an internal system dependent adapter to ACL and xattr
* the sake of completeness and simplicity it exposes this functionality to * operations. For the sake of completeness and simplicity it exposes this
* its applications which might want to get and set ACLs from local files. * functionality to its applications which might want to get and set ACLs
* from local files.
*/ */
/* ts A90127 */
/** /**
* Get the ACL of the given file in the local filesystem in long text form. * Get an ACL of the given file in the local filesystem in long text form.
* *
* @param disk_path * @param disk_path
* Path to the file * Path to the file
@ -4461,7 +4436,7 @@ int iso_node_set_attrs(IsoNode *node, size_t num_attrs, char **names,
* with bit15 set. * with bit15 set.
* @param flag * @param flag
* Bitfield for control purposes * Bitfield for control purposes
* bit0= get default ACL rather than access ACL * bit0= get "default" ACL rather than "access" ACL
* bit4= set *text = NULL and return 2 * bit4= set *text = NULL and return 2
* if the ACL matches st_mode permissions. * if the ACL matches st_mode permissions.
* bit5= in case of symbolic link: inquire link target * bit5= in case of symbolic link: inquire link target
@ -4479,7 +4454,6 @@ int iso_node_set_attrs(IsoNode *node, size_t num_attrs, char **names,
int iso_local_get_acl_text(char *disk_path, char **text, int flag); int iso_local_get_acl_text(char *disk_path, char **text, int flag);
/* ts A90118 */
/** /**
* Set the ACL of the given file in the local filesystem to a given list * Set the ACL of the given file in the local filesystem to a given list
* in long text form. * in long text form.
@ -4490,7 +4464,7 @@ int iso_local_get_acl_text(char *disk_path, char **text, int flag);
* The input text (0 terminated, ACL long text form) * The input text (0 terminated, ACL long text form)
* @param flag * @param flag
* Bitfield for control purposes * Bitfield for control purposes
* bit0= set default ACL rather than access ACL * bit0= set "default" ACL rather than "access" ACL
* bit5= in case of symbolic link: manipulate link target * bit5= in case of symbolic link: manipulate link target
* @return * @return
* > 0 ok * > 0 ok
@ -4504,7 +4478,6 @@ int iso_local_get_acl_text(char *disk_path, char **text, int flag);
int iso_local_set_acl_text(char *disk_path, char *text, int flag); int iso_local_set_acl_text(char *disk_path, char *text, int flag);
/* ts A90207 */
/** /**
* Obtain permissions of a file in the local filesystem which shall reflect * Obtain permissions of a file in the local filesystem which shall reflect
* ACL entry "group::" in S_IRWXG rather than ACL entry "mask::". This is * ACL entry "group::" in S_IRWXG rather than ACL entry "mask::". This is
@ -4526,7 +4499,6 @@ int iso_local_set_acl_text(char *disk_path, char *text, int flag);
int iso_local_get_perms_wo_acl(char *disk_path, mode_t *st_mode, int flag); int iso_local_get_perms_wo_acl(char *disk_path, mode_t *st_mode, int flag);
/* ts A90131 */
/** /**
* Get xattr and non-trivial ACLs of the given file in the local filesystem. * Get xattr and non-trivial ACLs of the given file in the local filesystem.
* The resulting data has finally to be disposed by a call to this function * The resulting data has finally to be disposed by a call to this function
@ -4564,7 +4536,6 @@ int iso_local_get_attrs(char *disk_path, size_t *num_attrs, char ***names,
size_t **value_lengths, char ***values, int flag); size_t **value_lengths, char ***values, int flag);
/* ts A90131 */
/** /**
* Attach a list of xattr and ACLs to the given file in the local filesystem. * Attach a list of xattr and ACLs to the given file in the local filesystem.
* *
@ -4600,7 +4571,6 @@ int iso_local_set_attrs(char *disk_path, size_t num_attrs, char **names,
#ifdef LIBISOFS_WITHOUT_LIBBURN #ifdef LIBISOFS_WITHOUT_LIBBURN
/* ts A90218 */
/** /**
This is a copy from the API of libburn-0.6.0 (under GPL). This is a copy from the API of libburn-0.6.0 (under GPL).
It is supposed to be as stable as any overall include of libburn.h. It is supposed to be as stable as any overall include of libburn.h.
@ -4609,6 +4579,10 @@ int iso_local_set_attrs(char *disk_path, size_t num_attrs, char **names,
Libisofs does not need to be linked with libburn at all. But if it is Libisofs does not need to be linked with libburn at all. But if it is
linked with libburn then it must be libburn-0.4.2 or later. linked with libburn then it must be libburn-0.4.2 or later.
An application that provides own struct burn_source objects and does not
include libburn/libburn.h has to define LIBISOFS_WITHOUT_LIBBURN before
including libisofs/libisofs.h in order to make this copy available.
*/ */
@ -4702,7 +4676,6 @@ struct burn_source {
off_t (*get_size)(struct burn_source *); off_t (*get_size)(struct burn_source *);
/* ts A70125 : BROKE BINARY BACKWARD COMPATIBILITY AT libburn-0.3.1. */
/* @since 0.3.2 */ /* @since 0.3.2 */
/** Program the reply of (*get_size) to a fixed value. It is advised /** Program the reply of (*get_size) to a fixed value. It is advised
to implement this by a attribute off_t fixed_size; in *data . to implement this by a attribute off_t fixed_size; in *data .
@ -4750,7 +4723,6 @@ struct burn_source {
void *data; void *data;
/* ts A71222 : Supposed to be binary backwards compatible extension. */
/* @since 0.4.2 */ /* @since 0.4.2 */
/** Valid only if above member .(*read)() is NULL. This indicates a /** Valid only if above member .(*read)() is NULL. This indicates a
version of struct burn_source younger than 0. version of struct burn_source younger than 0.

View File

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
@ -9,11 +10,7 @@
#include "libisofs.h" #include "libisofs.h"
#include "node.h" #include "node.h"
#include "stream.h" #include "stream.h"
#ifdef Libisofs_with_aaiP
#include "aaip_0_2.h" #include "aaip_0_2.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -277,7 +274,6 @@ const char *iso_node_get_name(const IsoNode *node)
return node->name; return node->name;
} }
/* ts A90128 */
/** /**
* See API function iso_node_set_permissions() * See API function iso_node_set_permissions()
* *
@ -290,17 +286,12 @@ int iso_node_set_perms_internal(IsoNode *node, mode_t mode, int flag)
node->mode = (node->mode & S_IFMT) | (mode & ~S_IFMT); node->mode = (node->mode & S_IFMT) | (mode & ~S_IFMT);
#ifdef Libisofs_with_aaiP
/* ts A90119 */
/* If the node has ACL info : update ACL */ /* If the node has ACL info : update ACL */
ret = 1; ret = 1;
if (!(flag & 1)) if (!(flag & 1))
ret = iso_node_set_acl_text(node, "", "", 2); ret = iso_node_set_acl_text(node, "", "", 2);
return ret; return ret;
#endif
} }
/** /**
@ -1352,7 +1343,6 @@ int iso_node_new_special(char *name, mode_t mode, dev_t dev,
} }
/* ts A90202 */
/* @param flag bit0= inverse: cleanout everything but del_name /* @param flag bit0= inverse: cleanout everything but del_name
*/ */
static static
@ -1380,9 +1370,6 @@ int attrs_cleanout_name(char *del_name, size_t *num_attrs, char **names,
} }
#ifdef Libisofs_with_aaiP
/* ts A90207 */
/** /**
* Backend of iso_node_get_attrs() with parameter node replaced by the * Backend of iso_node_get_attrs() with parameter node replaced by the
* AA string from where to get the attribute list. * AA string from where to get the attribute list.
@ -1459,16 +1446,10 @@ ex:;
return ret; return ret;
} }
#endif /* ! Libisofs_with_aaiP */
/* ts A90116 */
int iso_node_get_attrs(IsoNode *node, size_t *num_attrs, int iso_node_get_attrs(IsoNode *node, size_t *num_attrs,
char ***names, size_t **value_lengths, char ***values, int flag) char ***names, size_t **value_lengths, char ***values, int flag)
{ {
#ifdef Libisofs_with_aaiP
void *xipt; void *xipt;
unsigned char *aa_string = NULL; unsigned char *aa_string = NULL;
int ret; int ret;
@ -1489,21 +1470,9 @@ int iso_node_get_attrs(IsoNode *node, size_t *num_attrs,
ret = iso_aa_get_attrs(aa_string, num_attrs, names, value_lengths, values, ret = iso_aa_get_attrs(aa_string, num_attrs, names, value_lengths, values,
flag); flag);
return ret; return ret;
#else /* Libisofs_with_aaiP */
*num_attrs = 0;
*names = NULL;
*value_lengths = NULL;
*values = NULL;
#endif /* ! Libisofs_with_aaiP */
return 1;
} }
/* ts A90205 */
/* Enlarge attribute list */ /* Enlarge attribute list */
static static
int attr_enlarge_list(char ***names, size_t **value_lengths, char ***values, int attr_enlarge_list(char ***names, size_t **value_lengths, char ***values,
@ -1527,7 +1496,6 @@ int attr_enlarge_list(char ***names, size_t **value_lengths, char ***values,
} }
/* ts A90205 */
/* Merge attribute list of node and given new attribute list into /* Merge attribute list of node and given new attribute list into
attribute list returned by m_* parameters. attribute list returned by m_* parameters.
The m_* paramters have finally to be freed by a call with bit15 set. The m_* paramters have finally to be freed by a call with bit15 set.
@ -1668,13 +1636,9 @@ int iso_node_merge_xattr(IsoNode *node, size_t num_attrs, char **names,
} }
/* ts A90121 */
int iso_node_set_attrs(IsoNode *node, size_t num_attrs, char **names, int iso_node_set_attrs(IsoNode *node, size_t num_attrs, char **names,
size_t *value_lengths, char **values, int flag) size_t *value_lengths, char **values, int flag)
{ {
#ifdef Libisofs_with_aaiP
int ret, acl_saved = 0; int ret, acl_saved = 0;
size_t sret, result_len, m_num = 0, *m_value_lengths = NULL, i; size_t sret, result_len, m_num = 0, *m_value_lengths = NULL, i;
unsigned char *result; unsigned char *result;
@ -1745,18 +1709,9 @@ ex:;
iso_node_merge_xattr(node, num_attrs, names, value_lengths, values, iso_node_merge_xattr(node, num_attrs, names, value_lengths, values,
&m_num, &m_names, &m_value_lengths, &m_values, 1 << 15); &m_num, &m_names, &m_value_lengths, &m_values, 1 << 15);
return ret; return ret;
#else /* Libisofs_with_aaiP */
return ISO_AAIP_NOT_ENABLED;
#endif /* ! Libisofs_with_aaiP */
} }
#ifdef Libisofs_with_aaiP
static static
int iso_decode_acl(unsigned char *v_data, size_t v_len, size_t *consumed, int iso_decode_acl(unsigned char *v_data, size_t v_len, size_t *consumed,
char **text, size_t *text_fill, int flag) char **text, size_t *text_fill, int flag)
@ -1784,7 +1739,6 @@ int iso_decode_acl(unsigned char *v_data, size_t v_len, size_t *consumed,
} }
/* ts A90207 */
/** /**
* Backend of iso_node_get_acl_text() with parameter node replaced by the * Backend of iso_node_get_acl_text() with parameter node replaced by the
* attribute list from where to get the ACL and by the associated st_mode * attribute list from where to get the ACL and by the associated st_mode
@ -1856,16 +1810,9 @@ bad_decode:;
} }
#endif /* ! Libisofs_with_aaiP */
/* ts A90130 */
int iso_node_get_acl_text(IsoNode *node, int iso_node_get_acl_text(IsoNode *node,
char **access_text, char **default_text, int flag) char **access_text, char **default_text, int flag)
{ {
#ifdef Libisofs_with_aaiP
size_t num_attrs = 0, *value_lengths = NULL; size_t num_attrs = 0, *value_lengths = NULL;
char **names = NULL, **values = NULL; char **names = NULL, **values = NULL;
mode_t st_mode = 0; mode_t st_mode = 0;
@ -1886,20 +1833,9 @@ int iso_node_get_acl_text(IsoNode *node,
iso_node_get_attrs(node, &num_attrs, &names, iso_node_get_attrs(node, &num_attrs, &names,
&value_lengths, &values, 1 << 15); /* free memory */ &value_lengths, &values, 1 << 15); /* free memory */
return ret; return ret;
#else /* Libisofs_with_aaiP */
*access_text = *default_text = NULL;
return ISO_AAIP_NOT_ENABLED;
#endif /* ! Libisofs_with_aaiP */
} }
#ifdef Libisofs_with_aaiP
/* ts A90207 */
int iso_aa_get_acl_text(unsigned char *aa_string, mode_t st_mode, int iso_aa_get_acl_text(unsigned char *aa_string, mode_t st_mode,
char **access_text, char **default_text, int flag) char **access_text, char **default_text, int flag)
{ {
@ -1924,17 +1860,10 @@ ex:;
return ret; return ret;
} }
#endif /* Libisofs_with_aaiP */
/* ts A90130 */
int iso_node_set_acl_text(IsoNode *node, char *access_text, char *default_text, int iso_node_set_acl_text(IsoNode *node, char *access_text, char *default_text,
int flag) int flag)
{ {
#ifdef Libisofs_with_aaiP
size_t num_attrs = 0, *value_lengths = NULL, i, j, consumed; size_t num_attrs = 0, *value_lengths = NULL, i, j, consumed;
size_t a_text_fill = 0, d_text_fill = 0; size_t a_text_fill = 0, d_text_fill = 0;
size_t v_len, acl_len= 0; size_t v_len, acl_len= 0;
@ -2109,24 +2038,11 @@ ex:;
bad_decode:; bad_decode:;
ret = ISO_AAIP_BAD_ACL; ret = ISO_AAIP_BAD_ACL;
goto ex; goto ex;
#else /* Libisofs_with_aaiP */
if (access_text != NULL || default_text != NULL)
return ISO_AAIP_NOT_ENABLED;
return 1;
#endif /* ! Libisofs_with_aaiP */
} }
/* ts A90206 */
mode_t iso_node_get_perms_wo_acl(const IsoNode *node) mode_t iso_node_get_perms_wo_acl(const IsoNode *node)
{ {
#ifdef Libisofs_with_aaiP
mode_t st_mode; mode_t st_mode;
int ret; int ret;
char *a_text = NULL, *d_text = NULL; char *a_text = NULL, *d_text = NULL;
@ -2140,12 +2056,5 @@ mode_t iso_node_get_perms_wo_acl(const IsoNode *node)
ex:; ex:;
iso_node_get_acl_text((IsoNode *) node, &a_text, &d_text, 1 << 15); iso_node_get_acl_text((IsoNode *) node, &a_text, &d_text, 1 << 15);
return st_mode; return st_mode;
#else /* Libisofs_with_aaiP */
return iso_node_get_permissions(node);
#endif /* ! Libisofs_with_aaiP */
} }

View File

@ -332,7 +332,6 @@ void iso_dir_iter_unregister(IsoDirIter *iter);
void iso_notify_dir_iters(IsoNode *node, int flag); void iso_notify_dir_iters(IsoNode *node, int flag);
/* ts A90128 */
/** /**
* See API function iso_node_set_permissions() * See API function iso_node_set_permissions()
* *
@ -342,7 +341,6 @@ void iso_notify_dir_iters(IsoNode *node, int flag);
int iso_node_set_perms_internal(IsoNode *node, mode_t mode, int flag); int iso_node_set_perms_internal(IsoNode *node, mode_t mode, int flag);
/* ts A90207 */
/** /**
* Like iso_node_get_acl_text() with param node replaced by aa_string and * Like iso_node_get_acl_text() with param node replaced by aa_string and
* st_mode from where to obtain the ACLs. All other parameter specs apply. * st_mode from where to obtain the ACLs. All other parameter specs apply.

View File

@ -1,38 +1,27 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2007 Mario Danic * Copyright (c) 2007 Mario Danic
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. See COPYING file for details. * published by the Free Software Foundation. See COPYING file for details.
*/ */
/* ts A90116 : libisofs.h eventually defines Libisofs_with_aaiP */
#include "libisofs.h"
#include "rockridge.h" #include "rockridge.h"
#include "node.h" #include "node.h"
#include "ecma119_tree.h" #include "ecma119_tree.h"
#include "writer.h" #include "writer.h"
#include "messages.h" #include "messages.h"
#include "image.h" #include "image.h"
#ifdef Libisofs_with_aaiP
#include "aaip_0_2.h" #include "aaip_0_2.h"
#endif
#include <string.h> #include <string.h>
#ifdef Libisofs_with_aaiP
/* ts A90125 */
static static
int susp_add_ES(Ecma119Image *t, struct susp_info *susp, int to_ce, int seqno); int susp_add_ES(Ecma119Image *t, struct susp_info *susp, int to_ce, int seqno);
#endif /* Libisofs_with_aaiP */
static static
int susp_append(Ecma119Image *t, struct susp_info *susp, uint8_t *data) int susp_append(Ecma119Image *t, struct susp_info *susp, uint8_t *data)
@ -479,9 +468,6 @@ int rrip_add_SL(Ecma119Image *t, struct susp_info *susp, uint8_t **comp,
} }
#ifdef Libisofs_with_aaiP
/* ts A90112 */
/* /*
@param flag bit0= only account sizes in sua_free resp. ce_len @param flag bit0= only account sizes in sua_free resp. ce_len
parameters susp and data may be NULL in this case parameters susp and data may be NULL in this case
@ -544,8 +530,6 @@ int aaip_add_AA(Ecma119Image *t, struct susp_info *susp,
return ISO_SUCCESS; return ISO_SUCCESS;
} }
#endif /* Libisofs_with_aaiP */
/** /**
* Add a SUSP "ER" System Use Entry to identify the Rock Ridge specification. * Add a SUSP "ER" System Use Entry to identify the Rock Ridge specification.
@ -721,7 +705,6 @@ int susp_add_SP(Ecma119Image *t, struct susp_info *susp)
} }
/* ts A90125 */
/** /**
* SUSP 1.12: [...] shall specify as an 8-bit number the Extension * SUSP 1.12: [...] shall specify as an 8-bit number the Extension
* Sequence Number of the extension specification utilized in the entries * Sequence Number of the extension specification utilized in the entries
@ -750,8 +733,6 @@ int susp_add_ES(Ecma119Image *t, struct susp_info *susp, int to_ce, int seqno)
} }
/* ts A90114 */
int aaip_xinfo_func(void *data, int flag) int aaip_xinfo_func(void *data, int flag)
{ {
if (flag & 1) { if (flag & 1) {
@ -761,7 +742,6 @@ int aaip_xinfo_func(void *data, int flag)
} }
/* ts A90117 */
/** /**
* Compute SUA lentgth and eventual Continuation Area length of field NM and * Compute SUA lentgth and eventual Continuation Area length of field NM and
* eventually fields SL and AA. Because CA usage makes necessary the use of * eventually fields SL and AA. Because CA usage makes necessary the use of
@ -782,13 +762,9 @@ int susp_calc_nm_sl_aa(Ecma119Image *t, Ecma119Node *n, size_t space,
{ {
char *name; char *name;
size_t namelen, su_mem, ce_mem; size_t namelen, su_mem, ce_mem;
#ifdef Libisofs_with_aaiP
/* ts A90112 */
void *xipt; void *xipt;
size_t num_aapt = 0, sua_free = 0; size_t num_aapt = 0, sua_free = 0;
int ret; int ret;
#endif
su_mem = *su_size; su_mem = *su_size;
ce_mem = *ce; ce_mem = *ce;
@ -922,11 +898,8 @@ int susp_calc_nm_sl_aa(Ecma119Image *t, Ecma119Node *n, size_t space,
} }
#ifdef Libisofs_with_aaiP
/* ts A90112 */
xipt = NULL;
/* obtain num_aapt from node */ /* obtain num_aapt from node */
xipt = NULL;
num_aapt = 0; num_aapt = 0;
if (t->aaip) { if (t->aaip) {
ret = iso_node_get_xinfo(n->node, aaip_xinfo_func, &xipt); ret = iso_node_get_xinfo(n->node, aaip_xinfo_func, &xipt);
@ -942,9 +915,6 @@ int susp_calc_nm_sl_aa(Ecma119Image *t, Ecma119Node *n, size_t space,
if (*ce > 0 && !(flag & 1)) if (*ce > 0 && !(flag & 1))
goto unannounced_ca; goto unannounced_ca;
} }
#endif /* Libisofs_with_aaiP */
return 1; return 1;
unannounced_ca:; unannounced_ca:;
@ -972,13 +942,7 @@ size_t rrip_calc_len(Ecma119Image *t, Ecma119Node *n, int type, size_t space,
size_t *ce) size_t *ce)
{ {
size_t su_size; size_t su_size;
#ifdef Libisofs_with_aaiP
/* ts A90112 */
int ret; int ret;
#else /* Libisofs_with_aaiP */
int ret;
#endif /* ! Libisofs_with_aaiP */
/* space min is 255 - 33 - 37 = 185 /* space min is 255 - 33 - 37 = 185
* At the same time, it is always an odd number, but we need to pad it * At the same time, it is always an odd number, but we need to pad it
@ -990,15 +954,10 @@ size_t rrip_calc_len(Ecma119Image *t, Ecma119Node *n, int type, size_t space,
su_size = 0; su_size = 0;
#ifdef Libisofs_with_aaiP
/* ts A90125 */
/* If AAIP enabled and announced by ER : account for 5 bytes of ES */; /* If AAIP enabled and announced by ER : account for 5 bytes of ES */;
if (t->aaip && !t->aaip_susp_1_10) if (t->aaip && !t->aaip_susp_1_10)
su_size += 5; su_size += 5;
#endif /* Libisofs_with_aaiP */
/* PX and TF, we are sure they always fit in SUA */ /* PX and TF, we are sure they always fit in SUA */
if (!t->rrip_version_1_10) { if (!t->rrip_version_1_10) {
su_size += 44 + 26; su_size += 44 + 26;
@ -1046,16 +1005,9 @@ size_t rrip_calc_len(Ecma119Image *t, Ecma119Node *n, int type, size_t space,
*/ */
su_size += 7 + 28; /* SP + CE */ su_size += 7 + 28; /* SP + CE */
*ce = 182; /* ER of RRIP */ *ce = 182; /* ER of RRIP */
#ifdef Libisofs_with_aaiP
/* ts A90113 */
if (t->aaip) { if (t->aaip) {
*ce += 160; /* ER of AAIP */ *ce += 160; /* ER of AAIP */
} }
#endif /* Libisofs_with_aaiP */
} }
} }
@ -1111,13 +1063,9 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
Ecma119Node *node; Ecma119Node *node;
char *name = NULL; char *name = NULL;
char *dest = NULL; char *dest = NULL;
#ifdef Libisofs_with_aaiP
/* ts A90112 */
uint8_t *aapt; uint8_t *aapt;
void *xipt; void *xipt;
size_t num_aapt= 0; size_t num_aapt= 0;
#endif
size_t aaip_er_len= 0; size_t aaip_er_len= 0;
size_t su_size_pd, ce_len_pd; /* predicted sizes of SUA and CA */ size_t su_size_pd, ce_len_pd; /* predicted sizes of SUA and CA */
int ce_is_predicted = 0; int ce_is_predicted = 0;
@ -1154,9 +1102,6 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
} }
} }
#ifdef Libisofs_with_aaiP
/* ts A90125 */
/* If AAIP enabled and announced by ER : Announce RRIP by ES */ /* If AAIP enabled and announced by ER : Announce RRIP by ES */
if (t->aaip && !t->aaip_susp_1_10) { if (t->aaip && !t->aaip_susp_1_10) {
ret = susp_add_ES(t, info, 0, 0); ret = susp_add_ES(t, info, 0, 0);
@ -1164,8 +1109,6 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
goto add_susp_cleanup; goto add_susp_cleanup;
} }
#endif /* Libisofs_with_aaiP */
/* PX and TF, we are sure they always fit in SUA */ /* PX and TF, we are sure they always fit in SUA */
ret = rrip_add_PX(t, node, info); ret = rrip_add_PX(t, node, info);
if (ret < 0) { if (ret < 0) {
@ -1227,7 +1170,6 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
sua_free = space - info->suf_len; sua_free = space - info->suf_len;
/* ts A90117 */
/* Try whether NM, SL, AA will fit into SUA */ /* Try whether NM, SL, AA will fit into SUA */
su_size_pd = info->suf_len; su_size_pd = info->suf_len;
ce_len_pd = ce_len; ce_len_pd = ce_len;
@ -1295,7 +1237,6 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
* will be completelly moved into the CA * will be completelly moved into the CA
*/ */
/* ts A90117 */
/* sua_free, ce_len, nm_type already account for CE */ /* sua_free, ce_len, nm_type already account for CE */
cew = 1; cew = 1;
@ -1458,9 +1399,6 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
} }
} }
#ifdef Libisofs_with_aaiP
/* ts A90114 */
/* Obtain AA field string from node /* Obtain AA field string from node
and write it to directory entry or CE area. and write it to directory entry or CE area.
*/ */
@ -1488,8 +1426,6 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
} }
} }
#endif /* Libisofs_with_aaiP */
} else { } else {
/* "." or ".." entry */ /* "." or ".." entry */
@ -1507,15 +1443,10 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
* Note that SP entry was already added above * Note that SP entry was already added above
*/ */
#ifdef Libisofs_with_aaiP
/* ts A90113 */
if (t->aaip && !t->aaip_susp_1_10) { if (t->aaip && !t->aaip_susp_1_10) {
aaip_er_len = 160; aaip_er_len = 160;
} }
#endif /* Libisofs_with_aaiP */
ret = susp_add_CE(t, 182 + aaip_er_len, info); ret = susp_add_CE(t, 182 + aaip_er_len, info);
/* 182 is RRIP-ER length */ /* 182 is RRIP-ER length */
if (ret < 0) { if (ret < 0) {
@ -1526,18 +1457,12 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
goto add_susp_cleanup; goto add_susp_cleanup;
} }
#ifdef Libisofs_with_aaiP
/* ts A90113 */
if (t->aaip && !t->aaip_susp_1_10) { if (t->aaip && !t->aaip_susp_1_10) {
ret = aaip_add_ER(t, info, 0); ret = aaip_add_ER(t, info, 0);
if (ret < 0) { if (ret < 0) {
goto add_susp_cleanup; goto add_susp_cleanup;
} }
} }
#endif /* Libisofs_with_aaiP */
} }
} }

View File

@ -1,6 +1,7 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2007 Mario Danic * Copyright (c) 2007 Mario Danic
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
@ -117,16 +118,12 @@ struct rr_SL {
}; };
#ifdef Libisofs_with_aaiP /** Arbitrary Attribute (AAIP, see doc/susp_aaip_1_0.txt) */
/** Arbitrary Attribute (AAIP, see doc/susp_aaip_0_2.txt) */
struct rr_AA { struct rr_AA {
uint8_t flags[1]; uint8_t flags[1];
uint8_t comps[1]; uint8_t comps[1];
}; };
#endif /* Libisofs_with_aaiP */
/** /**
* Struct for a SUSP System User Entry (SUSP, 4.1) * Struct for a SUSP System User Entry (SUSP, 4.1)
@ -146,10 +143,7 @@ struct susp_sys_user_entry
struct rr_NM NM; struct rr_NM NM;
struct rr_CL CL; struct rr_CL CL;
struct rr_SL SL; struct rr_SL SL;
#ifdef Libisofs_with_aaiP
struct rr_AA AA; struct rr_AA AA;
#endif /* Libisofs_with_aaiP */
} data; /* 5 to 4+len_sue */ } data; /* 5 to 4+len_sue */
}; };
@ -283,8 +277,6 @@ int read_rr_SL(struct susp_sys_user_entry *sl, char **dest, int *cont);
int read_rr_PN(struct susp_sys_user_entry *pn, struct stat *st); int read_rr_PN(struct susp_sys_user_entry *pn, struct stat *st);
#ifdef Libisofs_with_aaiP
/** /**
* Collects the AA field string from single AA fields. * Collects the AA field string from single AA fields.
* (see doc/susp_aaip_0_2.txt) * (see doc/susp_aaip_0_2.txt)
@ -305,7 +297,5 @@ int read_aaip_AA(struct susp_sys_user_entry *sue,
unsigned char **aa_string, size_t *aa_size, size_t *aa_len, unsigned char **aa_string, size_t *aa_size, size_t *aa_len,
size_t *prev_field, int *is_done, int flag); size_t *prev_field, int *is_done, int flag);
#endif /* Libisofs_with_aaiP */
#endif /* LIBISO_ROCKRIDGE_H */ #endif /* LIBISO_ROCKRIDGE_H */

View File

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Vreixo Formoso
* Copyright (c) 2009 Thomas Schmitt
* *
* This file is part of the libisofs project; you can redistribute it and/or * This file is part of the libisofs project; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2 as * modify it under the terms of the GNU General Public License version 2 as
@ -7,8 +8,8 @@
*/ */
/* /*
* This file contains functions related to the reading of SUSP and * This file contains functions related to the reading of SUSP,
* Rock Ridge extensions on an ECMA-119 image. * Rock Ridge and AAIP extensions on an ECMA-119 image.
*/ */
#include "libisofs.h" #include "libisofs.h"
@ -415,7 +416,6 @@ int read_rr_PN(struct susp_sys_user_entry *pn, struct stat *st)
return ISO_WRONG_RR; return ISO_WRONG_RR;
} }
/* ts A90129 */
/* (dev_t << 32) causes compiler warnings on FreeBSD /* (dev_t << 32) causes compiler warnings on FreeBSD
because sizeof(dev_t) is 4. because sizeof(dev_t) is 4.
*/ */
@ -426,7 +426,7 @@ int read_rr_PN(struct susp_sys_user_entry *pn, struct stat *st)
high_shift); high_shift);
} }
/* <<< was originally: /* was originally:
st->st_rdev = (dev_t)((dev_t)iso_read_bb(pn->data.PN.high, 4, NULL) << 32) st->st_rdev = (dev_t)((dev_t)iso_read_bb(pn->data.PN.high, 4, NULL) << 32)
| (dev_t)iso_read_bb(pn->data.PN.low, 4, NULL); | (dev_t)iso_read_bb(pn->data.PN.low, 4, NULL);
*/ */
@ -435,9 +435,6 @@ int read_rr_PN(struct susp_sys_user_entry *pn, struct stat *st)
} }
#ifdef Libisofs_with_aaiP
int read_aaip_AA(struct susp_sys_user_entry *sue, int read_aaip_AA(struct susp_sys_user_entry *sue,
unsigned char **aa_string, size_t *aa_size, size_t *aa_len, unsigned char **aa_string, size_t *aa_size, size_t *aa_len,
size_t *prev_field, int *is_done, int flag) size_t *prev_field, int *is_done, int flag)
@ -483,5 +480,3 @@ int read_aaip_AA(struct susp_sys_user_entry *sue,
return ISO_SUCCESS; return ISO_SUCCESS;
} }
#endif /* Libisofs_with_aaiP */