Adapted to libisofs revision 313

This commit is contained in:
Thomas Schmitt 2008-01-31 15:22:23 +00:00
parent 321f57e370
commit 897045c51c
6 changed files with 75 additions and 18 deletions

View File

@ -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)
{

View File

@ -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.

View File

@ -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);

View File

@ -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);
@ -353,11 +373,11 @@ int isoburn_igopt_get_level(struct isoburn_imgen_opts *o, int *level);
@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.
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.
Weaker than RockRidge, but also readable with Linux.
bit2= iso1999
This is rather exotic. Better do not surprise the readers.
*/
@ -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);

View File

@ -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' \
<libisofs/tree.c >"$lone_dir"/libisofs/tree.c
# <<< obsoleted
if test 1 = 0

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.01.29.211543"
#define Xorriso_timestamP "2008.01.31.152131"