Removed outdated code parts
This commit is contained in:
parent
b61ca07f13
commit
d784d8f2e9
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2008.06.10.094304"
|
#define Xorriso_timestamP "2008.06.10.100231"
|
||||||
|
@ -251,38 +251,6 @@ int Xorriso_get_drive_handles(struct XorrisO *xorriso,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ts A80408 : Moved to libburn-0.4.4
|
|
||||||
*/
|
|
||||||
#define Xorriso_on_libburn_after_0_4_2 yes
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef Xorriso_on_libburn_after_0_4_2
|
|
||||||
|
|
||||||
/* >>> todo: throw out the copies of libdax_msgs entrails */
|
|
||||||
|
|
||||||
/* <<< to be replaced by libburn-0.4.3 API call burn_sev_to_text().
|
|
||||||
This is a copy of libdax_msgs__sev_to_text() which is not exposed
|
|
||||||
by the API of of libburn-0.4.2 . As soon as xorriso gets based on
|
|
||||||
libburn-0.4.4 this redundancy is to be removed.
|
|
||||||
It is safe, nevertheless, because the severity codes are eternal.
|
|
||||||
*/
|
|
||||||
#define LIBDAX_MSGS_SEV_ALL 0x00000000
|
|
||||||
#define LIBDAX_MSGS_SEV_ERRFILE 0x08000000
|
|
||||||
#define LIBDAX_MSGS_SEV_DEBUG 0x10000000
|
|
||||||
#define LIBDAX_MSGS_SEV_UPDATE 0x20000000
|
|
||||||
#define LIBDAX_MSGS_SEV_NOTE 0x30000000
|
|
||||||
#define LIBDAX_MSGS_SEV_HINT 0x40000000
|
|
||||||
#define LIBDAX_MSGS_SEV_WARNING 0x50000000
|
|
||||||
#define LIBDAX_MSGS_SEV_SORRY 0x60000000
|
|
||||||
#define LIBDAX_MSGS_SEV_MISHAP 0x64000000
|
|
||||||
#define LIBDAX_MSGS_SEV_FAILURE 0x68000000
|
|
||||||
#define LIBDAX_MSGS_SEV_FATAL 0x70000000
|
|
||||||
#define LIBDAX_MSGS_SEV_ABORT 0x71000000
|
|
||||||
#define LIBDAX_MSGS_SEV_NEVER 0x7fffffff
|
|
||||||
|
|
||||||
#endif /* ! Xorriso_on_libburn_after_0_4_2 */
|
|
||||||
|
|
||||||
|
|
||||||
int Xorriso__sev_to_text(int severity, char **severity_name,
|
int Xorriso__sev_to_text(int severity, char **severity_name,
|
||||||
int flag)
|
int flag)
|
||||||
{
|
{
|
||||||
@ -291,56 +259,11 @@ int Xorriso__sev_to_text(int severity, char **severity_name,
|
|||||||
ret= iso_sev_to_text(severity, severity_name);
|
ret= iso_sev_to_text(severity, severity_name);
|
||||||
if(ret>0)
|
if(ret>0)
|
||||||
return(ret);
|
return(ret);
|
||||||
|
|
||||||
#ifdef Xorriso_on_libburn_after_0_4_2
|
|
||||||
|
|
||||||
ret= burn_sev_to_text(severity, severity_name, 0);
|
ret= burn_sev_to_text(severity, severity_name, 0);
|
||||||
if(ret>0)
|
if(ret>0)
|
||||||
return(ret);
|
return(ret);
|
||||||
*severity_name= "";
|
*severity_name= "";
|
||||||
return(0);
|
return(0);
|
||||||
|
|
||||||
#else /* Xorriso_on_libburn_after_0_4_2 */
|
|
||||||
|
|
||||||
if(flag&1) {
|
|
||||||
*severity_name= "NEVER\nABORT\nFATAL\nFAILURE\nSORRY\nWARNING\nHINT\nNOTE\nUPDATE\nDEBUG\nALL";
|
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
*severity_name= "";
|
|
||||||
if(severity>=LIBDAX_MSGS_SEV_NEVER)
|
|
||||||
*severity_name= "NEVER";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_ABORT)
|
|
||||||
*severity_name= "ABORT";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_FATAL)
|
|
||||||
*severity_name= "FATAL";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_FAILURE)
|
|
||||||
*severity_name= "FAILURE";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_MISHAP)
|
|
||||||
*severity_name= "MISHAP";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_SORRY)
|
|
||||||
*severity_name= "SORRY";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_WARNING)
|
|
||||||
*severity_name= "WARNING";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_HINT)
|
|
||||||
*severity_name= "HINT";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_NOTE)
|
|
||||||
*severity_name= "NOTE";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_UPDATE)
|
|
||||||
*severity_name= "UPDATE";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_DEBUG)
|
|
||||||
*severity_name= "DEBUG";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_ERRFILE)
|
|
||||||
*severity_name= "ERRFILE";
|
|
||||||
else if(severity>=LIBDAX_MSGS_SEV_ALL)
|
|
||||||
*severity_name= "ALL";
|
|
||||||
else {
|
|
||||||
*severity_name= "";
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
return(1);
|
|
||||||
|
|
||||||
#endif /* ! Xorriso_on_libburn_after_0_4_2 */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -351,17 +274,6 @@ int Xorriso__text_to_sev(char *severity_name, int *severity_number, int flag)
|
|||||||
ret= iso_text_to_sev(severity_name, severity_number);
|
ret= iso_text_to_sev(severity_name, severity_number);
|
||||||
if(ret>0)
|
if(ret>0)
|
||||||
return(ret);
|
return(ret);
|
||||||
|
|
||||||
#ifndef Xorriso_on_libburn_after_0_4_2
|
|
||||||
if(severity_name[0]==0)
|
|
||||||
*severity_number= 0;
|
|
||||||
else if(strcmp(severity_name, "MISHAP")==0)
|
|
||||||
*severity_number= LIBDAX_MSGS_SEV_MISHAP;
|
|
||||||
else if(strcmp(severity_name, "ERRFILE")==0)
|
|
||||||
*severity_number= LIBDAX_MSGS_SEV_ERRFILE;
|
|
||||||
else
|
|
||||||
#endif /* ! Xorriso_on_libburn_after_0_4_2 */
|
|
||||||
|
|
||||||
ret= burn_text_to_sev(severity_name, severity_number, 0);
|
ret= burn_text_to_sev(severity_name, severity_number, 0);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
@ -1479,94 +1391,13 @@ int Xorriso_get_node_by_path(struct XorrisO *xorriso,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* <<< this is not safe
|
/* @param flag
|
||||||
#define Xorriso_get_dev_by_botcH 1
|
|
||||||
*/
|
|
||||||
#if iso_lib_header_version_major > 0 || \
|
|
||||||
( iso_lib_header_version_major == 0 && \
|
|
||||||
( iso_lib_header_version_minor > 6 || \
|
|
||||||
( iso_lib_header_version_minor == 6 && \
|
|
||||||
iso_lib_header_version_micro > 4)))
|
|
||||||
#define Xorriso_can_get_dev_T 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef Xorriso_can_get_dev_T
|
|
||||||
#ifdef Xorriso_standalonE
|
|
||||||
/* this is safe */
|
|
||||||
#define Xorriso_can_get_dev_T 1
|
|
||||||
#define Xorriso_get_dev_by_botcH 1
|
|
||||||
#endif /* Xorriso_standalonE */
|
|
||||||
#endif /* Xorriso_can_get_dev_T */
|
|
||||||
|
|
||||||
|
|
||||||
/* @param flag bit0= do not complain about being unable to retrieve info
|
|
||||||
*/
|
*/
|
||||||
int Xorriso_node_get_dev(struct XorrisO *xorriso, IsoNode *node,
|
int Xorriso_node_get_dev(struct XorrisO *xorriso, IsoNode *node,
|
||||||
char *path, dev_t *dev, int flag)
|
char *path, dev_t *dev, int flag)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef Xorriso_can_get_dev_T
|
|
||||||
|
|
||||||
/* >>> insert future API call here and remove botch below */
|
|
||||||
#ifndef Xorriso_get_dev_by_botcH
|
|
||||||
|
|
||||||
*dev= iso_special_get_dev((IsoSpecial *) node);
|
*dev= iso_special_get_dev((IsoSpecial *) node);
|
||||||
return(1);
|
return(1);
|
||||||
|
|
||||||
#else /* Xorriso_get_dev_by_botcH */
|
|
||||||
|
|
||||||
/* <<< */
|
|
||||||
/* Drilling a hole into libisofs-0.6.4 in order to substitute for the lack
|
|
||||||
of an API call which returns the dev_t number of a IsoSpecial (block or
|
|
||||||
character device).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* These are clones from libisofs/node.h */
|
|
||||||
|
|
||||||
typedef struct iso_extended_info IsoExtendedInfo_0_6_4_xorrisO;
|
|
||||||
|
|
||||||
struct Iso_Node_0_6_4_xorrisO
|
|
||||||
{
|
|
||||||
int refcount;
|
|
||||||
enum IsoNodeType type;
|
|
||||||
char *name;
|
|
||||||
mode_t mode;
|
|
||||||
uid_t uid;
|
|
||||||
gid_t gid;
|
|
||||||
time_t atime;
|
|
||||||
time_t mtime;
|
|
||||||
time_t ctime;
|
|
||||||
|
|
||||||
int hidden;
|
|
||||||
IsoDir *parent;
|
|
||||||
IsoNode *next;
|
|
||||||
IsoExtendedInfo_0_6_4_xorrisO *xinfo;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Iso_Special_0_6_4_xorrisO
|
|
||||||
{
|
|
||||||
struct Iso_Node_0_6_4_xorrisO node;
|
|
||||||
dev_t dev;
|
|
||||||
};
|
|
||||||
|
|
||||||
*dev= ((struct Iso_Special_0_6_4_xorrisO *) node)->dev;
|
|
||||||
return(1);
|
|
||||||
|
|
||||||
#endif /* Xorriso_get_dev_by_botcH */
|
|
||||||
|
|
||||||
#else /* Xorriso_can_get_dev_T */
|
|
||||||
|
|
||||||
char sfe[SfileadrL];
|
|
||||||
|
|
||||||
if(flag&1)
|
|
||||||
return(0);
|
|
||||||
sprintf(xorriso->info_text,
|
|
||||||
"Cannot obtain device major,minor from ISO image file %s",
|
|
||||||
Text_shellsafe(path, sfe, 0));
|
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0);
|
|
||||||
return(0);
|
|
||||||
|
|
||||||
#endif /* ! Xorriso_can_get_dev_T */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1604,10 +1435,10 @@ int Xorriso_fake_stbuf(struct XorrisO *xorriso, char *path, struct stat *stbuf,
|
|||||||
stbuf->st_mode|= S_IFLNK;
|
stbuf->st_mode|= S_IFLNK;
|
||||||
else if(LIBISO_ISCHR(*node)) {
|
else if(LIBISO_ISCHR(*node)) {
|
||||||
stbuf->st_mode|= S_IFCHR;
|
stbuf->st_mode|= S_IFCHR;
|
||||||
Xorriso_node_get_dev(xorriso, *node, path, &(stbuf->st_rdev), 1);
|
Xorriso_node_get_dev(xorriso, *node, path, &(stbuf->st_rdev), 0);
|
||||||
} else if(LIBISO_ISBLK(*node)) {
|
} else if(LIBISO_ISBLK(*node)) {
|
||||||
stbuf->st_mode|= S_IFBLK;
|
stbuf->st_mode|= S_IFBLK;
|
||||||
Xorriso_node_get_dev(xorriso, *node, path, &(stbuf->st_rdev), 1);
|
Xorriso_node_get_dev(xorriso, *node, path, &(stbuf->st_rdev), 0);
|
||||||
} else if(LIBISO_ISFIFO(*node))
|
} else if(LIBISO_ISFIFO(*node))
|
||||||
stbuf->st_mode|= S_IFIFO;
|
stbuf->st_mode|= S_IFIFO;
|
||||||
else if(LIBISO_ISSOCK(*node))
|
else if(LIBISO_ISSOCK(*node))
|
||||||
@ -2769,8 +2600,6 @@ ignored:;
|
|||||||
}
|
}
|
||||||
{ret= 2; goto ex;}
|
{ret= 2; goto ex;}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Xorriso_can_get_dev_T
|
|
||||||
mode= S_IFCHR | 0777;
|
mode= S_IFCHR | 0777;
|
||||||
ret= Xorriso_node_get_dev(xorriso, node, img_path, &dev, 0);
|
ret= Xorriso_node_get_dev(xorriso, node, img_path, &dev, 0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
@ -2784,16 +2613,11 @@ probably_damaged:;
|
|||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
}
|
}
|
||||||
ret= mknod(disk_path, mode, dev);
|
ret= mknod(disk_path, mode, dev);
|
||||||
#else
|
|
||||||
goto not_this_type;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} else if(LIBISO_ISBLK(node)) {
|
} else if(LIBISO_ISBLK(node)) {
|
||||||
what= "block device";
|
what= "block device";
|
||||||
if(xorriso->allow_restore!=2)
|
if(xorriso->allow_restore!=2)
|
||||||
goto ignored;
|
goto ignored;
|
||||||
|
|
||||||
#ifdef Xorriso_can_get_dev_T
|
|
||||||
mode= S_IFBLK | 0777;
|
mode= S_IFBLK | 0777;
|
||||||
ret= Xorriso_node_get_dev(xorriso, node, img_path, &dev, 0);
|
ret= Xorriso_node_get_dev(xorriso, node, img_path, &dev, 0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
@ -2801,9 +2625,6 @@ probably_damaged:;
|
|||||||
if(dev == (dev_t) 1)
|
if(dev == (dev_t) 1)
|
||||||
goto probably_damaged;
|
goto probably_damaged;
|
||||||
ret= mknod(disk_path, mode, dev);
|
ret= mknod(disk_path, mode, dev);
|
||||||
#else
|
|
||||||
goto not_this_type;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} else if(LIBISO_ISFIFO(node)) {
|
} else if(LIBISO_ISFIFO(node)) {
|
||||||
what= "named pipe";
|
what= "named pipe";
|
||||||
@ -2817,9 +2638,6 @@ probably_damaged:;
|
|||||||
goto ignored;
|
goto ignored;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
#ifndef Xorriso_can_get_dev_T
|
|
||||||
not_this_type:;
|
|
||||||
#endif
|
|
||||||
sprintf(xorriso->info_text, "Cannot restore file type '%s'", what);
|
sprintf(xorriso->info_text, "Cannot restore file type '%s'", what);
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
@ -3166,8 +2984,12 @@ much_too_long:;
|
|||||||
if(source_is_split)
|
if(source_is_split)
|
||||||
do_not_dive= 1;
|
do_not_dive= 1;
|
||||||
|
|
||||||
|
|
||||||
|
/* >>> handle softlinks */;
|
||||||
|
|
||||||
/* does a disk file exist with this name ? */
|
/* does a disk file exist with this name ? */
|
||||||
stbuf_ret= lstat(disk_path, &target_stbuf);
|
stbuf_ret= lstat(disk_path, &target_stbuf);
|
||||||
|
|
||||||
if(stbuf_ret!=-1) {
|
if(stbuf_ret!=-1) {
|
||||||
target_is_dir= S_ISDIR(target_stbuf.st_mode);
|
target_is_dir= S_ISDIR(target_stbuf.st_mode);
|
||||||
if(!(target_is_dir && (source_is_dir && !source_is_split))) {
|
if(!(target_is_dir && (source_is_dir && !source_is_split))) {
|
||||||
@ -3331,7 +3153,11 @@ int Xorriso_restore(struct XorrisO *xorriso,
|
|||||||
}
|
}
|
||||||
source_is_dir= (is_dir || (flag&1) || !done);
|
source_is_dir= (is_dir || (flag&1) || !done);
|
||||||
source_is_split= done && leaf_is_split;
|
source_is_split= done && leaf_is_split;
|
||||||
|
|
||||||
|
/* >>> handle softlinks */;
|
||||||
|
|
||||||
stbuf_ret= stat(path, &target_stbuf);
|
stbuf_ret= stat(path, &target_stbuf);
|
||||||
|
|
||||||
if(stbuf_ret!=-1) {
|
if(stbuf_ret!=-1) {
|
||||||
target_is_dir= S_ISDIR(target_stbuf.st_mode);
|
target_is_dir= S_ISDIR(target_stbuf.st_mode);
|
||||||
if(!(target_is_dir && (source_is_dir && !source_is_split))) {
|
if(!(target_is_dir && (source_is_dir && !source_is_split))) {
|
||||||
@ -3454,12 +3280,6 @@ int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define Xorriso_use_isoburn_toC yes
|
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
#define Xorriso_new_toc_formaT yes
|
|
||||||
|
|
||||||
/* @param flag bit0=short report form
|
/* @param flag bit0=short report form
|
||||||
bit1=report about output drive
|
bit1=report about output drive
|
||||||
*/
|
*/
|
||||||
@ -3478,22 +3298,12 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
char mem_text[80];
|
char mem_text[80];
|
||||||
off_t start_byte= 0, num_free= 0, size;
|
off_t start_byte= 0, num_free= 0, size;
|
||||||
unsigned dummy;
|
unsigned dummy;
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
struct isoburn_toc_disc *disc= NULL;
|
struct isoburn_toc_disc *disc= NULL;
|
||||||
struct isoburn_toc_session **sessions;
|
struct isoburn_toc_session **sessions;
|
||||||
struct isoburn_toc_track **tracks;
|
struct isoburn_toc_track **tracks;
|
||||||
#else
|
|
||||||
struct burn_disc *disc= NULL;
|
|
||||||
struct burn_session **sessions;
|
|
||||||
struct burn_track **tracks;
|
|
||||||
#endif /* ! Xorriso_use_isoburn_toC */
|
|
||||||
|
|
||||||
#ifdef Xorriso_new_toc_formaT
|
|
||||||
int image_blocks;
|
int image_blocks;
|
||||||
char volume_id[33];
|
char volume_id[33];
|
||||||
struct burn_toc_entry next_toc_entry;
|
struct burn_toc_entry next_toc_entry;
|
||||||
#endif
|
|
||||||
|
|
||||||
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
|
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
|
||||||
"on attempt to print Table Of Content", flag&2);
|
"on attempt to print Table Of Content", flag&2);
|
||||||
@ -3550,24 +3360,14 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
|
|
||||||
if(s != BURN_DISC_FULL && s != BURN_DISC_APPENDABLE)
|
if(s != BURN_DISC_FULL && s != BURN_DISC_APPENDABLE)
|
||||||
return(1);
|
return(1);
|
||||||
|
|
||||||
if(xorriso->request_to_abort)
|
if(xorriso->request_to_abort)
|
||||||
return(1);
|
return(1);
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
disc= isoburn_toc_drive_get_disc(drive);
|
disc= isoburn_toc_drive_get_disc(drive);
|
||||||
#else
|
|
||||||
disc= burn_drive_get_disc(drive);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef Xorriso_new_toc_formaT
|
|
||||||
|
|
||||||
sprintf(respt, "TOC layout : %3s , %9s , %10s , %s\n",
|
sprintf(respt, "TOC layout : %3s , %9s , %10s , %s\n",
|
||||||
"Idx", "sbsector", "Size", "Volume Id");
|
"Idx", "sbsector", "Size", "Volume Id");
|
||||||
if(!(flag&1))
|
if(!(flag&1))
|
||||||
Xorriso_result(xorriso,0);
|
Xorriso_result(xorriso,0);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if (disc==NULL) {
|
if (disc==NULL) {
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
@ -3583,9 +3383,6 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* fabricate TOC */
|
/* fabricate TOC */
|
||||||
|
|
||||||
#ifdef Xorriso_new_toc_formaT
|
|
||||||
|
|
||||||
ret= isoburn_read_iso_head(drive, 0, &image_blocks, volume_id, 1);
|
ret= isoburn_read_iso_head(drive, 0, &image_blocks, volume_id, 1);
|
||||||
if(ret>0) {
|
if(ret>0) {
|
||||||
sprintf(respt, "ISO session : %3d , %9d , %9ds , %s\n",
|
sprintf(respt, "ISO session : %3d , %9d , %9ds , %s\n",
|
||||||
@ -3600,52 +3397,23 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
sprintf(respt, "Other session: %3d , %9d , %9ds , \n",
|
sprintf(respt, "Other session: %3d , %9d , %9ds , \n",
|
||||||
1, 0, nwa);
|
1, 0, nwa);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* Xorriso_new_toc_formaT */
|
|
||||||
|
|
||||||
sprintf(respt, "Media content: session %2d ", 1);
|
|
||||||
sprintf(respt+strlen(respt), "track %2d %s lba: %8d\n", 1, "data ", 0);
|
|
||||||
if(!(flag&1))
|
|
||||||
Xorriso_result(xorriso,0);
|
|
||||||
sprintf(respt, "Media content: session %2d ", 1);
|
|
||||||
sprintf(respt+strlen(respt), "leadout lba: %9d\n", nwa);
|
|
||||||
|
|
||||||
#endif /* ! Xorriso_new_toc_formaT */
|
|
||||||
|
|
||||||
if(!(flag&1))
|
if(!(flag&1))
|
||||||
Xorriso_result(xorriso,0);
|
Xorriso_result(xorriso,0);
|
||||||
last_track_start= lba;
|
last_track_start= lba;
|
||||||
num_payload= num_data= last_track_size= nwa;
|
num_payload= num_data= last_track_size= nwa;
|
||||||
num_sessions= 1;
|
num_sessions= 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions);
|
sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions);
|
||||||
#else
|
|
||||||
sessions= burn_disc_get_sessions(disc, &num_sessions);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (session_no= 0; session_no<num_sessions && !(xorriso->request_to_abort);
|
for (session_no= 0; session_no<num_sessions && !(xorriso->request_to_abort);
|
||||||
session_no++) {
|
session_no++) {
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
tracks= isoburn_toc_session_get_tracks(sessions[session_no], &num_tracks);
|
tracks= isoburn_toc_session_get_tracks(sessions[session_no], &num_tracks);
|
||||||
#else
|
|
||||||
tracks= burn_session_get_tracks(sessions[session_no], &num_tracks);
|
|
||||||
#endif
|
|
||||||
if (tracks==NULL)
|
if (tracks==NULL)
|
||||||
continue;
|
continue;
|
||||||
for(track_no= 0; track_no<num_tracks && !(xorriso->request_to_abort);
|
for(track_no= 0; track_no<num_tracks && !(xorriso->request_to_abort);
|
||||||
track_no++) {
|
track_no++) {
|
||||||
track_count++;
|
track_count++;
|
||||||
is_data= 0;
|
is_data= 0;
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
isoburn_toc_track_get_entry(tracks[track_no], &toc_entry);
|
isoburn_toc_track_get_entry(tracks[track_no], &toc_entry);
|
||||||
#else
|
|
||||||
burn_track_get_entry(tracks[track_no], &toc_entry);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (toc_entry.extensions_valid & 1) {
|
if (toc_entry.extensions_valid & 1) {
|
||||||
/* DVD extension valid */
|
/* DVD extension valid */
|
||||||
lba= toc_entry.start_lba;
|
lba= toc_entry.start_lba;
|
||||||
@ -3654,30 +3422,14 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec,
|
lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec,
|
||||||
toc_entry.pframe);
|
toc_entry.pframe);
|
||||||
if(track_no==num_tracks-1) {
|
if(track_no==num_tracks-1) {
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
isoburn_toc_session_get_leadout_entry(sessions[session_no],
|
isoburn_toc_session_get_leadout_entry(sessions[session_no],
|
||||||
&next_toc_entry);
|
&next_toc_entry);
|
||||||
#else
|
|
||||||
burn_session_get_leadout_entry(sessions[session_no],
|
|
||||||
&next_toc_entry);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
isoburn_toc_track_get_entry(tracks[track_no+1], &next_toc_entry);
|
isoburn_toc_track_get_entry(tracks[track_no+1], &next_toc_entry);
|
||||||
#else
|
|
||||||
burn_track_get_entry(tracks[track_no+1], &next_toc_entry);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
track_size= burn_msf_to_lba(next_toc_entry.pmin, next_toc_entry.psec,
|
track_size= burn_msf_to_lba(next_toc_entry.pmin, next_toc_entry.psec,
|
||||||
next_toc_entry.pframe) - lba;
|
next_toc_entry.pframe) - lba;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Xorriso_new_toc_formaT
|
|
||||||
|
|
||||||
if(flag&1)
|
if(flag&1)
|
||||||
ret= 0;
|
ret= 0;
|
||||||
else
|
else
|
||||||
@ -3695,15 +3447,6 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
sprintf(respt, "Other track : %3d , %9d , %9ds , \n",
|
sprintf(respt, "Other track : %3d , %9d , %9ds , \n",
|
||||||
track_count, lba, track_size);
|
track_count, lba, track_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* Xorriso_new_toc_formaT */
|
|
||||||
|
|
||||||
sprintf(respt, "Media content: session %2d ", session_no+1);
|
|
||||||
sprintf(respt+strlen(respt), "track %2d %s lba: %9d\n",
|
|
||||||
track_count, ((toc_entry.control&7)<4?"audio":"data "), lba);
|
|
||||||
|
|
||||||
#endif /* ! Xorriso_new_toc_formaT */
|
|
||||||
|
|
||||||
if(!(flag&1))
|
if(!(flag&1))
|
||||||
Xorriso_result(xorriso,0);
|
Xorriso_result(xorriso,0);
|
||||||
if(track_no>0)
|
if(track_no>0)
|
||||||
@ -3712,13 +3455,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
if((toc_entry.control&7)>=4) /* data track */
|
if((toc_entry.control&7)>=4) /* data track */
|
||||||
is_data= 1;
|
is_data= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
isoburn_toc_session_get_leadout_entry(sessions[session_no], &toc_entry);
|
isoburn_toc_session_get_leadout_entry(sessions[session_no], &toc_entry);
|
||||||
#else
|
|
||||||
burn_session_get_leadout_entry(sessions[session_no], &toc_entry);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (toc_entry.extensions_valid & 1) {
|
if (toc_entry.extensions_valid & 1) {
|
||||||
lba= toc_entry.start_lba;
|
lba= toc_entry.start_lba;
|
||||||
burn_lba_to_msf(lba, &pmin, &psec, &pframe);
|
burn_lba_to_msf(lba, &pmin, &psec, &pframe);
|
||||||
@ -3726,14 +3463,6 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
lba= burn_msf_to_lba(pmin, psec, pframe);
|
lba= burn_msf_to_lba(pmin, psec, pframe);
|
||||||
lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec, toc_entry.pframe);
|
lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec, toc_entry.pframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef Xorriso_new_toc_formaT
|
|
||||||
sprintf(respt, "Media content: session %2d ", session_no+1);
|
|
||||||
sprintf(respt+strlen(respt), "leadout lba: %9d\n", lba);
|
|
||||||
if(!(flag&1))
|
|
||||||
Xorriso_result(xorriso,0);
|
|
||||||
#endif /* ! Xorriso_new_toc_formaT */
|
|
||||||
|
|
||||||
last_track_size= lba - last_track_start;
|
last_track_size= lba - last_track_start;
|
||||||
num_payload+= last_track_size;
|
num_payload+= last_track_size;
|
||||||
if(is_data)
|
if(is_data)
|
||||||
@ -3755,7 +3484,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
sprintf(respt+strlen(respt), "\n");
|
sprintf(respt+strlen(respt), "\n");
|
||||||
Xorriso_result(xorriso,0);
|
Xorriso_result(xorriso,0);
|
||||||
|
|
||||||
if (s == BURN_DISC_APPENDABLE && nwa!=0) {
|
if (s==BURN_DISC_APPENDABLE && nwa!=0) {
|
||||||
ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &lba, &nwa);
|
ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &lba, &nwa);
|
||||||
if(ret>0) {
|
if(ret>0) {
|
||||||
sprintf(respt, "Media nwa : %ds\n", nwa);
|
sprintf(respt, "Media nwa : %ds\n", nwa);
|
||||||
@ -3765,13 +3494,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (disc!=NULL)
|
if (disc!=NULL)
|
||||||
|
|
||||||
#ifdef Xorriso_use_isoburn_toC
|
|
||||||
isoburn_toc_disc_free(disc);
|
isoburn_toc_disc_free(disc);
|
||||||
#else
|
|
||||||
burn_disc_free(disc);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user