From 06145dfdc9b3a8a46315c6c69c91968e124858cb Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 31 Jan 2008 15:22:23 +0000 Subject: [PATCH] Adapted to libisofs revision 313 --- libisoburn/trunk/libisoburn/isoburn.c | 29 +++++++++- libisoburn/trunk/libisoburn/isoburn.h | 2 + libisoburn/trunk/libisoburn/isofs_wrap.c | 3 +- libisoburn/trunk/libisoburn/libisoburn.h | 54 +++++++++++++------ .../trunk/xorriso/make_xorriso_standalone.sh | 3 ++ libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 6 files changed, 75 insertions(+), 18 deletions(-) diff --git a/libisoburn/trunk/libisoburn/isoburn.c b/libisoburn/trunk/libisoburn/isoburn.c index f67f4f19..b0b576f8 100644 --- a/libisoburn/trunk/libisoburn/isoburn.c +++ b/libisoburn/trunk/libisoburn/isoburn.c @@ -455,7 +455,8 @@ int isoburn_ropt_new(struct isoburn_read_opts **new_o, int flag) o->preferjoliet= 0; o->uid= geteuid(); o->gid= getegid(); - o->mode= 0444; /* >>> would need 0555 for directories */ + o->mode= 0444; + o->dirmode= 0555; o->input_charset= NULL; o->hasRR= 0; o->hasJoliet= 0; @@ -499,9 +500,19 @@ int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext) int isoburn_ropt_set_default_perms(struct isoburn_read_opts *o, uid_t uid, gid_t gid, mode_t mode) { + mode_t dirmode; + o->uid= uid; o->gid= gid; o->mode= mode; + dirmode= mode; + if(dirmode & S_IRUSR) + dirmode|= S_IXUSR; + if(dirmode & S_IRGRP) + dirmode|= S_IXGRP; + if(dirmode & S_IROTH) + dirmode|= S_IXOTH; + o->dirmode= dirmode; return(1); } @@ -516,6 +527,22 @@ int isoburn_ropt_get_default_perms(struct isoburn_read_opts *o, } +int isoburn_ropt_set_default_dirperms(struct isoburn_read_opts *o, + mode_t mode) +{ + o->dirmode= mode; + return(1); +} + + +int isoburn_ropt_get_default_dirperms(struct isoburn_read_opts *o, + mode_t *mode) +{ + *mode= o->dirmode; + return(1); +} + + int isoburn_ropt_set_input_charset(struct isoburn_read_opts *o, char *input_charset) { diff --git a/libisoburn/trunk/libisoburn/isoburn.h b/libisoburn/trunk/libisoburn/isoburn.h index eb04bf92..3f593bb9 100644 --- a/libisoburn/trunk/libisoburn/isoburn.h +++ b/libisoburn/trunk/libisoburn/isoburn.h @@ -160,6 +160,8 @@ struct isoburn_read_opts { uid_t uid; /**< Default uid when no RR */ gid_t gid; /**< Default uid when no RR */ mode_t mode; /**< Default mode when no RR (only permissions) */ + mode_t dirmode; /**< Default mode for directories + when no RR (only permissions) */ /** * Input charset for RR file names. NULL to use default locale charset. diff --git a/libisoburn/trunk/libisoburn/isofs_wrap.c b/libisoburn/trunk/libisoburn/isofs_wrap.c index 2d1eb92e..329b62aa 100644 --- a/libisoburn/trunk/libisoburn/isofs_wrap.c +++ b/libisoburn/trunk/libisoburn/isofs_wrap.c @@ -181,7 +181,8 @@ int isoburn_read_image(struct burn_drive *d, iso_read_opts_set_no_joliet(ropts, read_opts->nojoliet); iso_read_opts_set_no_iso1999(ropts, read_opts->noiso1999); iso_read_opts_set_preferjoliet(ropts, read_opts->preferjoliet); - iso_read_opts_set_default_permissions(ropts, read_opts->mode); + iso_read_opts_set_default_permissions(ropts, + read_opts->mode, read_opts->dirmode); iso_read_opts_set_default_uid(ropts, read_opts->uid); iso_read_opts_set_default_gid(ropts, read_opts->gid); iso_read_opts_set_input_charset(ropts, read_opts->input_charset); diff --git a/libisoburn/trunk/libisoburn/libisoburn.h b/libisoburn/trunk/libisoburn/libisoburn.h index f918b44f..e359927f 100644 --- a/libisoburn/trunk/libisoburn/libisoburn.h +++ b/libisoburn/trunk/libisoburn/libisoburn.h @@ -269,15 +269,33 @@ int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext); @param uid user id number (see /etc/passwd) @param gid group id number (see /etc/group) @param mode permissions (not file type) as of man 2 stat. + With directories, r-permissions will automatically imply + x-permissions. See isoburn_ropt_set_default_dirperms() below. */ int isoburn_ropt_set_default_perms(struct isoburn_read_opts *o, uid_t uid, gid_t gid, mode_t mode); int isoburn_ropt_get_default_perms(struct isoburn_read_opts *o, uid_t *uid, gid_t *gid, mode_t *mode); +/** Default attributes to use on directories if no RockRidge extension + gets loaded. + Above call isoburn_ropt_set_default_perms() automatically adds + x-permissions to r-permissions for directories. This call here may + be done afterwards to set independend permissions for directories, + especially to override the automatically added x-permissions. +*/ +int isoburn_ropt_set_default_dirperms(struct isoburn_read_opts *o, + mode_t mode); +int isoburn_ropt_get_default_dirperms(struct isoburn_read_opts *o, + mode_t *mode); -/** Input charset for RR file names. NULL to use default locale charset. - >>> what if not NULL ? + + +/** Set the character set for reading RR file names from ISO images. + @param input_charset Set this to NULL to use the default locale charset. + For selecting a particular character set, submit its + name, e.g. as listed by program iconv -l. + Example: "UTF-8". */ int isoburn_ropt_set_input_charset(struct isoburn_read_opts *o, char *input_charset); @@ -343,7 +361,9 @@ int isoburn_igopt_destroy(struct isoburn_imgen_opts **o, int flag); /** ISO level to write at. - >>> what is an ISO level ? xorriso uses 2. + @param level is a term of the ISO 9660 standard. It should be one of: + 1= filenames restricted to form 8.3 + 2= filenames allowed up to 31 characters */ int isoburn_igopt_set_level(struct isoburn_imgen_opts *o, int level); int isoburn_igopt_get_level(struct isoburn_imgen_opts *o, int *level); @@ -351,15 +371,15 @@ int isoburn_igopt_get_level(struct isoburn_imgen_opts *o, int *level); /** Which extensions to support. @param ext Bitfield: - bit0= rockridge - Rock Ridge extensions add POSIX file attributes like - owner, group, access permissions, long filenames. - Very advisable if the designed audience has Unix style systems. - bit1= joliet - Longer filenames for Windows systems. - Weaker than RockRidge, but also usable with Linux. - bit2= iso1999 - This is rather exotic. Better do not surprise the readers. + bit0= rockridge + Rock Ridge extensions add POSIX file attributes like + owner, group, access permissions, long filenames. Very + advisable if the designed audience has Unix style systems. + bit1= joliet + Longer filenames for Windows systems. + Weaker than RockRidge, but also readable with Linux. + bit2= iso1999 + This is rather exotic. Better do not surprise the readers. */ #define isoburn_igopt_rockridge 1 #define isoburn_igopt_joliet 2 @@ -418,7 +438,8 @@ int isoburn_igopt_get_relaxed(struct isoburn_imgen_opts *o, int *relax); /** Whether and how files should be sorted. @param value Bitfield: bit0= sort_files_by_weight files should be sorted based on their weight. - >>> what is weight ? + Weight is attributed to files in the image + by libisofs call iso_node_set_sort_weight(). */ #define isoburn_igopt_sort_files_by_weight 1 int isoburn_igopt_set_sort_files(struct isoburn_imgen_opts *o, int value); @@ -461,8 +482,11 @@ int isoburn_igopt_get_over_ugid(struct isoburn_imgen_opts *o, int *replace_uid, int *replace_gid, uid_t *uid, gid_t *gid); -/** Set this to NULL to use the default output charset. - >>> What if not NULL or not want default ? +/** Set the charcter set to use for representing filenames in the image. + @param output_charset Set this to NULL to use the default output charset. + For selecting a particular character set, submit its + name, e.g. as listed by program iconv -l. + Example: "UTF-8". */ int isoburn_igopt_set_out_charset(struct isoburn_imgen_opts *o, char *output_charset); diff --git a/libisoburn/trunk/xorriso/make_xorriso_standalone.sh b/libisoburn/trunk/xorriso/make_xorriso_standalone.sh index c1036156..91474bc6 100755 --- a/libisoburn/trunk/xorriso/make_xorriso_standalone.sh +++ b/libisoburn/trunk/xorriso/make_xorriso_standalone.sh @@ -134,6 +134,9 @@ copy_files libisofs/*.[ch] "$lone_dir"/libisofs # To get a common version.h cat version.h.in >> "$lone_dir"/version.h.in +sed -e 's/FNM_FILE_NAME/FNM_PATHNAME/g' \ +"$lone_dir"/libisofs/tree.c + # <<< obsoleted if test 1 = 0 diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 9bbbc205..e7ea7b70 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.01.29.211543" +#define Xorriso_timestamP "2008.01.31.152131"