Avoided an error message if xorriso and xorriso-tcltk had differing device addresses
This commit is contained in:
parent
e8cc11e2e9
commit
f42b7ffdc8
@ -28,11 +28,11 @@ proc print_usage {argv0} {
|
||||
puts stderr " --help"
|
||||
puts stderr " Print this text and exit."
|
||||
puts stderr " --stdio"
|
||||
puts stderr " Establishes connection to xorriso via stdin and stdout."
|
||||
puts stderr " Establish connection to xorriso via stdin and stdout."
|
||||
puts stderr " E.g. when letting xorriso start this frontend program:"
|
||||
puts stderr " xorriso -launch_frontend \$(which xorriso-tcltk) --stdio --"
|
||||
puts stderr " --named_pipes cmd_fifo reply_fifo"
|
||||
puts stderr " Establishes connection to a xorriso process started by:"
|
||||
puts stderr " Establish connection to a xorriso process started by:"
|
||||
puts stderr " xorriso -dialog on <cmd_fifo >reply_fifo"
|
||||
puts stderr " which is then ready for a run of:"
|
||||
puts stderr " xorriso-tcltk --named_pipes cmd_fifo reply_fifo"
|
||||
@ -129,10 +129,14 @@ set expect_broken_pipes "0"
|
||||
|
||||
# Local copies of xorriso state
|
||||
|
||||
# Addresses of drives (or image files)
|
||||
# Addresses of drives (or image files) as shown by their text fields in the GUI
|
||||
set outdev_adr ""
|
||||
set indev_adr ""
|
||||
|
||||
# Addresses of drives (or image files) as set in xorriso (after inquire_dev)
|
||||
set eff_outdev_adr ""
|
||||
set eff_indev_adr ""
|
||||
|
||||
# Whether the medium is blank, appendable, closed, missing
|
||||
set indev_medium_status "missing"
|
||||
set outdev_medium_status "missing"
|
||||
@ -610,21 +614,21 @@ proc inquire_severity_list {} {
|
||||
# Parse-by-xorriso handler function for proc inquire_dev
|
||||
#
|
||||
proc set_inquired_dev {} {
|
||||
global result_list indev_adr outdev_adr
|
||||
global result_list eff_indev_adr eff_outdev_adr
|
||||
|
||||
if {[llength "$result_list"] < 2} {return ""}
|
||||
set what [lindex "$result_list" 0]
|
||||
if {"$what" == "-dev" || "$what" == "-indev"} {
|
||||
set indev_adr [lindex "$result_list" 1]
|
||||
set eff_indev_adr [lindex "$result_list" 1]
|
||||
}
|
||||
if {"$what" == "-dev" || "$what" == "-outdev"} {
|
||||
set outdev_adr [lindex "$result_list" 1]
|
||||
set eff_outdev_adr [lindex "$result_list" 1]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Inquire -indev and -outdev from xorriso and install in indev_adr
|
||||
# and outdev_adr. Usually called when the user messed up the text fields.
|
||||
# Inquire -indev and -outdev from xorriso and install in eff_indev_adr
|
||||
# and eff_outdev_adr.
|
||||
# (This could be done by -toc_of like in proc refresh_indev. But here
|
||||
# i demonstrate the use of command -status and parsing its result by
|
||||
# help of xorriso.)
|
||||
@ -639,6 +643,18 @@ proc inquire_dev {} {
|
||||
}
|
||||
|
||||
|
||||
# Inquire -indev and -outdev from xorriso and install in indev_adr
|
||||
# and outdev_adr.
|
||||
#
|
||||
proc update_dev_var {} {
|
||||
global result_list eff_indev_adr eff_outdev_adr indev_adr outdev_adr
|
||||
|
||||
inquire_dev
|
||||
set indev_adr "$eff_indev_adr"
|
||||
set outdev_adr "$eff_outdev_adr"
|
||||
}
|
||||
|
||||
|
||||
# Parse-by-xorriso handler function for proc isofs_ls
|
||||
#
|
||||
proc isofs_ls_handler {} {
|
||||
@ -1061,7 +1077,7 @@ proc indev_return {} {
|
||||
global .outdev_entry
|
||||
|
||||
if {[assert_no_changes] == 0} {
|
||||
inquire_dev
|
||||
update_dev_var
|
||||
return "0"
|
||||
}
|
||||
reset_highest_cmd_sev
|
||||
@ -1126,7 +1142,7 @@ proc dev_return {} {
|
||||
outdev_return
|
||||
} else {
|
||||
if {[assert_no_changes] == 0} {
|
||||
inquire_dev
|
||||
update_dev_var
|
||||
return "0"
|
||||
}
|
||||
reset_highest_cmd_sev
|
||||
@ -1351,7 +1367,7 @@ proc give_up_dev {} {
|
||||
proc isodir_return {caller} {
|
||||
global isodir_adr result_list isolist_names isolist_types isodir_return_name
|
||||
global isodir_is_pwd highest_cmd_sev highest_cmd_sev_msg
|
||||
global indev_adr outdev_adr
|
||||
global indev_adr outdev_adr eff_indev_adr
|
||||
global .isolist
|
||||
global bulk_parse_mode
|
||||
global bulk_parse_max_chunk
|
||||
@ -1364,11 +1380,10 @@ proc isodir_return {caller} {
|
||||
set isolist_names ""
|
||||
set isolist_types ""
|
||||
|
||||
if {"$indev_adr" == "" && "$outdev_adr" == ""} {
|
||||
if {[changes_are_pending] == "0"} {return ""}
|
||||
}
|
||||
normalize_isodir_adr
|
||||
inquire_dev
|
||||
if {"$eff_indev_adr" == "" && [changes_are_pending] == "0"} {return ""}
|
||||
|
||||
normalize_isodir_adr
|
||||
set file_type [isofs_filetype "$isodir_adr"]
|
||||
if {"$file_type" != "d" && "$file_type" != ""} {
|
||||
.isolist insert end "@@@ exists but is not a directory @@@"
|
||||
@ -1704,7 +1719,7 @@ proc burn_commit {} {
|
||||
if {[window_yesno "Really write ISO changes as session to $outdev_adr ?"] \
|
||||
!= 1} { return "" }
|
||||
} else {
|
||||
if {[window_yesno "Really write new ISO filesystem to $outdev_adr ?"] \
|
||||
if {[window_yesno "Really write a new ISO filesystem to $outdev_adr ?"] \
|
||||
!= 1} { return "" }
|
||||
}
|
||||
|
||||
@ -1792,7 +1807,7 @@ proc burn_write_image {} {
|
||||
global burn_write_image_adr burn_write_close outdev_adr outdev_medium_status
|
||||
global outdev_profile burn_write_tao burn_write_defect_mgt indev_adr
|
||||
|
||||
inquire_dev
|
||||
update_dev_var
|
||||
if {"$indev_adr" != ""} {
|
||||
xorriso_tcltk_errmsg \
|
||||
"xorriso-tcltk : SORRY : You may not have an input drive open when writing an image file"
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2012.12.31.120152"
|
||||
#define Xorriso_timestamP "2012.12.31.173306"
|
||||
|
Loading…
Reference in New Issue
Block a user