1 2 /* xorriso - libisoburn higher level API which creates, loads, manipulates 3 and burns ISO 9660 filesystem images. 4 5 Copyright 2007-2018 Thomas Schmitt, <scdbackup@gmx.net> 6 7 Provided under GPL version 2 or later. 8 9 This file contains the public API of xorriso which covers all of its 10 operations. 11 12 An example of its usage is xorriso_main.c which checks version compatibility, 13 creates a xorriso object, initializes the libraries, and runs the command 14 interpreters of the API to constitute the command line oriented batch and 15 dialog tool xorriso. 16 17 Alternatively to command interpreters it is possible to run all options of 18 xorriso directly via the calls of the "Command API". 19 The "Problem Status and Message API" shall then be used to obtain the 20 text output of the options. 21 22 Mandatory calls are: 23 Xorriso_new(), Xorriso_startup_libraries(), Xorriso_destroy() 24 25 This architecture is fully public since version 0.5.8. From then on, new 26 features get marked by 27 @since major.minor.micro 28 The option calls may have older "since" marks which then tell when the 29 corresponding command was introduced in the command interpreter. 30 31 Please note that struct XorrisO and its API calls are _not_ thread-safe in 32 general. It is not permissible to run two API calls on the same 33 XorrisO object concurrently. 34 The only exception is 35 Xorriso_fetch_outlists() 36 in order to learn about the ongoing text output of other API calls. 37 38 39 There is a lower level of API which consists of libisofs.h, libburn.h and 40 libisoburn.h. One should not mix those calls with the ones of xorriso.h . 41 */ 42 43 /* Important: If you add a public API function then add its name to file 44 libisoburn/libisoburn.ver 45 */ 46 47 48 #ifndef Xorriso_includeD 49 #define Xorriso_includeD yes 50 51 #ifdef __cplusplus 52 extern "C" { 53 #endif 54 55 56 /** Opaque handle of the xorriso runtime context */ 57 struct XorrisO; 58 59 60 61 /* This may be changed to Xorriso_GNU_xorrisO in order to create GNU xorriso 62 under GPLv3+ derived from above GPLv2+. 63 */ 64 #define Xorriso_libburnia_xorrisO yes 65 66 67 /* --------------------- Fundamental Management ------------------- */ 68 69 70 /** These three release version numbers tell the revision of this header file 71 and of the API which it describes. They shall be memorized by applications 72 at build time. 73 @since 0.5.8 74 */ 75 #define Xorriso_header_version_majoR 1 76 #define Xorriso_header_version_minoR 5 77 #define Xorriso_header_version_micrO 0 78 79 80 /** If needed: Something like ".pl01" to indicate a bug fix. Normally empty. 81 @since 0.5.8 82 */ 83 #define Xorriso_program_patch_leveL "" 84 85 86 /** Obtain the three release version numbers of the library. These are the 87 numbers encountered by the application when linking with libisoburn, 88 i.e. possibly not before run time. 89 Better do not base the fundamental compatibility decision of an application 90 on these numbers. For a reliable check use Xorriso__is_compatible(). 91 @since 0.5.8 92 @param major The maturity version (0 for now, as we are still learning) 93 @param minor The development goal version. 94 @param micro The development step version. This has an additional meaning: 95 96 Pare numbers indicate a version with frozen API. I.e. you can 97 rely on the same set of features to be present in all 98 published releases with that major.minor.micro combination. 99 Features of a pare release will stay available and ABI 100 compatible as long as the SONAME of libisoburn stays "1". 101 Currently there are no plans to ever change the SONAME. 102 103 Odd numbers indicate that API upgrades are in progress. 104 I.e. new features might be already present or they might 105 be still missing. Newly introduced features may be changed 106 incompatibly or even be revoked before release of a pare 107 version. 108 So micro revisions {1,3,5,7,9} should never be used for 109 dynamic linking unless the proper library match can be 110 guaranteed by external circumstances. 111 112 @return 1 success, <=0 might in future become an error indication 113 */ 114 void Xorriso__version(int *major, int *minor, int *micro); 115 116 117 /** Check whether all features of header file xorriso.h from the given 118 major.minor.micro revision triple can be delivered by the library version 119 which is performing this call. 120 if (! Xorriso__is_compatible(Xorriso_header_version_majoR, 121 Xorriso_header_version_minoR, 122 Xorriso_header_version_micrO, 0)) 123 ...refuse to start the program with this dynamic library version... 124 @since 0.5.8 125 @param major obtained at build time 126 @param minor obtained at build time 127 @param micro obtained at build time 128 @param flag Bitfield for control purposes. Unused yet. Submit 0. 129 @return 1= library can work for caller 130 0= library is not usable in some aspects. Caller must restrict 131 itself to an earlier API version or must not use this library 132 at all. 133 */ 134 int Xorriso__is_compatible(int major, int minor, int micro, int flag); 135 136 137 /* Get the patch level text (e.g. "" or ".pl01") of the program code. 138 @param flag unused yet, submit 0 139 @return readonly character string 140 */ 141 char *Xorriso__get_patch_level_text(int flag); 142 143 144 /* Choose how Xorriso_startup_libraries() and the XorrisO object shall 145 prepare for eventual signals. 146 @param behavior Default is behavior 1. 147 0= no own signal handling. The main application has to do 148 that. Do not start burn runs without any handling ! 149 1= use libburn signal handler. Most time with action 150 0. During writing, formatting, blanking: 0x30. 151 Only usable with a single xorriso object. 152 2= Enable system default reaction on all signals 153 @since 1.0.9 154 3= Try to ignore nearly all signals 155 @since 1.0.9 156 @param flag unused yet, submit 0 157 @return <= 0 is error, >0 is success 158 */ 159 int Xorriso__preset_signal_behavior(int behavior, int flag); 160 161 162 /* Mandatory call: 163 Create a new xorriso object and tell it the program name to be used 164 with messages and for decision of special behavior. 165 @param xorriso returns the newly created XorrisO object 166 @param progname typically argv[0] of main(). Some leafnames of the progname 167 path have special meaning and trigger special behavior: 168 "osirrox" allows image-to-disk copying: -osirrox "on" 169 "xorrisofs" activates -as "mkisofs" emulation from start 170 "genisofs" alias of "xorrisofs" 171 "mkisofs" alias of "xorrisofs" 172 "genisoimage" alias of "xorrisofs" 173 "xorrecord" activates -as "cdrecord" emulation from start 174 "cdrecord" alias of "xorrecord" 175 "wodim" alias of "xorrecord" 176 "cdrskin" alias of "xorrecord" 177 @param flag unused yet, submit 0 178 @return >0 success , <=0 failure, no object created 179 */ 180 int Xorriso_new(struct XorrisO ** xorriso, char *progname, int flag); 181 182 183 /* Note: Between Xorriso_new() and the next call Xorriso_startup_libraries() 184 there may be called the special command interpreter 185 Xorriso_prescan_args(). 186 The other command interpreters may be used only after 187 Xorriso_startup_libraries(). The same restriction applies to the 188 calls of the Command API further below. 189 */ 190 191 192 /* Mandatory call: 193 It has to be made before calling any function listed below this point. 194 Only exception is the special command interpreter Xorriso_prescan_args(). 195 196 Make global library initializations. 197 This must be done with the first xorriso object that gets created and 198 with the first xorriso object that gets created after Xorriso_destroy(,1). 199 @param xorriso The context object. 200 @param flag unused yet, submit 0 201 @return <=0 error , >0 success 202 */ 203 int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag); 204 205 206 /* Note: After library startup, you may run Command Interpreters or call 207 functions from the Command API. 208 209 Wenn all desired activities are done, you may check whether there are 210 uncommited changes pending, compute an exit value, destroy the XorrisO 211 object, and exit your program. 212 */ 213 214 215 /* Inquire whether option -commit would make sense. 216 @param xorriso The context object to inquire. 217 @param flag @since 0.6.6 218 bit0= do not return 1 if -as mkisofs -print-size was 219 performed on the current image. 220 @return 0= -commit would have nothing to do 221 1= a new image session would emerge at -commit 222 */ 223 int Xorriso_change_is_pending(struct XorrisO *xorriso, int flag); 224 225 226 /* Compute the exit value from the recorded maximum event severity. 227 @param xorriso The context object to inquire. 228 @param flag unused yet, submit 0 229 @return The computed exit value 230 */ 231 int Xorriso_make_return_value(struct XorrisO *xorriso, int flag); 232 233 234 /* Mandatory call: 235 Destroy xorriso object when it is no longer needed. 236 @param xorriso The context object to destroy. *xorriso will become NULL. 237 @param flag bit0= Perform global library shutdown. 238 Use only with last xorriso object to be destroyed. 239 @return <=0 error, >0 success 240 */ 241 int Xorriso_destroy(struct XorrisO **xorriso, int flag); 242 243 244 /* --------------------- Command Interpreters ------------------- */ 245 246 247 /* This special interpreter may be called between Xorriso_new() and 248 Xorriso_startup_libraries(). It interprets certain commands which shall 249 get into effect before the libraries get initialized: 250 -abort_on , -report_about , -return_with , 251 -scsi_log , -signal_handling 252 This is the only occasion where command -x has an effect: 253 -x 254 Some commands get executed only if they are the only command in argv: 255 -prog_help , -help 256 The following is recognized only if it is the first of all arguments: 257 -no_rc 258 Some get examined for the need to redirect stdout messages: 259 -dev , -outdev , -indev , -as 260 Commands 261 -backslash_codes , -list_delimiter , -add_plainly 262 get into effect during this call. But their setting at begin of the call 263 gets restored before the call returns. 264 @param xorriso The context object in which to perform the commands. 265 @param argc Number of arguments. 266 @param argv The arguments. argv[0] contains the program name. 267 argv[1] to argv[argc-1] contain commands and parameters. 268 @param idx Argument cursor. When this function is called, *idx must 269 be at least 1, argv[*idx] must be a command. 270 *idx will iterate over commands and parameters until this 271 function aborts or until argc is reached. 272 @param flag bit0= do not interpret argv[1] 273 bit1= produce FAILURE events on unknown commands 274 @since 1.1.0 275 @return <0 error 276 0 end program 277 1 ok, go on 278 */ 279 int Xorriso_prescan_args(struct XorrisO *xorriso, int argc, char **argv, 280 int flag); 281 282 283 /* Read and interpret commands from eventual startup files as listed in 284 man xorriso. 285 @param xorriso The context object in which to perform the commands. 286 @param flag unused yet, submit 0 287 @return <=0 = error 288 1 = success 289 3 = end program run (e.g. because command -end was encountered) 290 */ 291 int Xorriso_read_rc(struct XorrisO *xorriso, int flag); 292 293 294 /* Check whether program arguments shall be backslash decoded. If so, then 295 replace *argv by a new argument vector. The old one will not be freed 296 by this call. If it is dynamic memory then you need to keep a copy of 297 the pointer and free it yourself after this call. 298 299 @since 1.3.2: 300 This call internally interprets the commands -backslash_codes and 301 -list_delimiter if it encounters them among the arguments. The 302 decoding of backslashes can thus be enabled and disabled by the 303 arguments themselves. The state of the xorriso object in respect 304 to these commands gets preserved at the start of the call and restored 305 when the call ends. 306 (*argv)[0] never gets decoded. 307 The old *argv will always be replaced by a new one. 308 309 @param xorriso The context object 310 @param argc Number of arguments. 311 @param argv The arguments. (*argv)[0] contains the program name. 312 (*argv)[1] to (*argv)[argc-1] contain commands and parameters 313 If argv after the call differs from argv before the call, 314 then one should dispose it later by: 315 Xorriso__dispose_words(argc, argv); 316 @param flag unused yet, submit 0 317 @return <= 0 error , > 0 success 318 */ 319 int Xorriso_program_arg_bsl(struct XorrisO *xorriso, int argc, char ***argv, 320 int flag); 321 322 323 /* Interpret argv as xorriso command options and their parameters. 324 (An alternative is to call functions of the options API directly and to 325 perform own error status evaluation. See below: Command API.) 326 After the first command and its parameters there may be more commands and 327 parameters. All parameters must be given in the same call as their command. 328 @since 1.2.2: 329 Commands may get arranged in a sequence that is most likely to make sense. 330 E.g. image loading settings before drive aquiration, then commands for 331 adding files, then settings for writing, then writing. 332 This feature may be enabled by command "-x" in Xorriso_prescan_args() 333 or by parameter flag of this call. 334 @param xorriso The context object in which to perform the commands. 335 @param argc Number of arguments. 336 @param argv The arguments. argv[0] contains the program name. 337 argv[1] to argv[argc-1] contain commands and parameters. 338 @param idx Argument cursor. When this function is called, *idx must 339 be at least 1, argv[*idx] must be a command. 340 *idx will iterate over commands and parameters until this 341 function aborts, or until argc is reached, or only once if 342 flag bit2 is set. 343 @param flag bit0= reserved. Indicates recursion. Submit 0. 344 bit1= Indicates that these are the main() program start 345 arguments. This enables their use with emulations 346 which where set with Xorriso_new(), or argument 347 arranging. 348 bit2= Only execute the one command argv[*idx] and advance 349 *idx to the next command if successful. Then return. 350 This prevents any argument arranging. 351 @since 1.2.2 352 bit3= With bit1 and not bit2: 353 Enable argument arranging as with 354 Xorriso_prescan_args() and command "-x". 355 @since 1.2.2 356 bit4= With bit1: 357 Surely disable argument arranging. 358 @since 1.2.2 359 @return <=0 = error 360 1 = success 361 2 = problem event ignored 362 3 = end program run (e.g. because command -end was encountered) 363 */ 364 int Xorriso_interpreter(struct XorrisO *xorriso, 365 int argc, char **argv, int *idx, int flag); 366 367 368 /* Parse a command line into words and use them as argv for a call of 369 Xorriso_interpreter(). Put out some info lines about the outcome. 370 @param xorriso The context object in which to perform the commands. 371 @param line A text of one or more words according to man xorriso 372 paragraph "Command processing" up to and including 373 "Backslash Interpretation". 374 @param flag bit0 to bit15 are forwarded to Xorriso_interpreter() 375 bit16= no pageing of info lines 376 bit17= print === bar even if xorriso->found<0 377 @return see return of Xorriso_interpreter() 378 */ 379 int Xorriso_execute_option(struct XorrisO *xorriso, char *line, int flag); 380 381 382 /* Parse a text line into words. This parsing obeys the same rules as 383 command line parsing but allows to skip a prefix, to use a user provided 384 set of separator characters, and to restrict the number of parsed words. 385 386 If parameter xorriso is NULL, then this call is safe for usage by 387 a concurrent thread while a xorriso API call is being executed. 388 389 @since 1.2.6 390 @param xorriso The context object which provides settings for parsing 391 and output channels for error messages. 392 May be NULL in order to allow concurrent execution e.g. 393 by a callback function of Xorriso_start_msg_watcher(). 394 If xorriso is NULL then: 395 flag bit1-bit4 are in effect even if bit0 is not set. 396 flag bit5 and bit6 may not be set. 397 @param line A text of one or more words according to man xorriso 398 paragraph "Command processing" up to and including 399 "Backslash Interpretation". 400 @param prefix If not empty then the line will only be parsed if it 401 begins by the prefix text. Parsing will then begin after 402 the end of the prefix. 403 If the prefix does not match, then 0 will be returned 404 in *argc, argv will be NULL, and the return value will 405 be 2. 406 @param separators If not empty this overrides the default list of word 407 separating characters. Default set is the one of 408 isspace(3). 409 @param max_words If not 0: Maximum number of words to parse. If there 410 remains line text after the last parsed word and its 411 following separators, then this remainder is copied 412 unparsed into a final result word. In this case *argc 413 will be larger than max_words by one. Note that trailing 414 separators are considered to be followed by an empty 415 word. 416 @param argc Will return the number of allocated and filled word 417 strings. 418 @param argv Will return the array of word strings. 419 Do not forget to dispose the allocated memory by a 420 call to Xorriso__dispose_words(). 421 @param flag Bitfield for control purposes 422 bit0= Override setting of -backslash_codes. 423 bit1-4= With bit0: backslash behavior 424 0= off 425 1= in_double_quotes 426 2= in_quotes 427 3= with_quoted_input 428 bit5= Prepend the program name as (*argv)[0], so that 429 *argv is suitable for Xorriso_interpreter() 430 and other calls which expect this. 431 Not allowed if xorriso is NULL. 432 bit6= Issue failure message in case of return 0 433 Not allowed if xorriso is NULL. 434 @return <=0 means error and invalidity of *argv: 435 0 = Input format error. E.g. bad quotation mark. 436 -1 = Lack of resources. E.g. memory. 437 -2 = Improper combination of call parameters. 438 >0 means success but not necessarily a valid result: 439 1 = Result in argc and argv is valid (but may 440 be empty by argc == 0, argv == NULL). 441 2 = Line did not match prefix. Result is invalid 442 and empty. 443 */ 444 int Xorriso_parse_line(struct XorrisO *xorriso, char *line, 445 char *prefix, char *separators, int max_words, 446 int *argc, char ***argv, int flag); 447 448 449 /* Dispose a list of strings as allocated by Xorriso_parse_line() or 450 Xorriso_program_arg_bsl(), or Xorriso_sieve_get_result(). 451 @since 1.2.6 452 @param argc A pointer to the number of allocated and filled word 453 strings. *argc will be set to 0 by this call. 454 @param argv A pointer to the array of word strings. 455 *argv will be set to NULL by this call. 456 */ 457 void Xorriso__dispose_words(int *argc, char ***argv); 458 459 460 /* Enter xorriso command line dialog mode, using libreadline if configured 461 at build time and not disabled at run time. 462 This call returns immediately if not option -dialog "on" was performed 463 before. 464 @param xorriso The context object in which to perform the commands. 465 @param flag unused yet, submit 0 466 @return <=0 error, 1= dialog mode ended normally , 467 3= dialog mode ended normally,interpreter asks to end program 468 */ 469 /* @since 0.1.0 */ 470 int Xorriso_dialog(struct XorrisO *xorriso, int flag); 471 472 473 /* --------------------- Problem Status and Message API ------------------- */ 474 475 476 /** Submit a problem message to the xorriso problem reporting and handling 477 system. This will eventually increase problem status rank, which may 478 at certain stages in the program be pardoned and reset to 0. 479 The pardon is governed by Xorriso_option_abort_on() and by the anger 480 of the affected program part. If no pardon has been given, then the problem 481 status reaches the caller of option functions. 482 Problem status should be inquired by Xorriso_eval_problem_status() and be 483 reset before next option execution by Xorriso_set_problem_status(). 484 The problem status itself does not cause the failure of option functions. 485 But in case of failures for other reasons, a remnant overly severe problem 486 status can cause overly harsh program reactions. 487 @param xorriso The environment handle 488 @param error_code The unique error code of your message. 489 Submit 0 if you do not have reserved error codes within 490 the libburnia project. 491 @param msg_text Not more than 8196 characters of message text. 492 A final newline character gets appended automatically. 493 @param os_errno Eventual errno related to the message. Submit 0 if 494 the message is not related to a operating system error. 495 @param severity One of "ABORT", "FATAL", "FAILURE", "MISHAP", "SORRY", 496 "WARNING", "HINT", "NOTE", "UPDATE", "DEBUG". 497 Defaults to "FATAL". 498 @param flag Bitfield for control purposes 499 bit0= use pager (as with result) 500 bit1= permission to suppress output 501 @return 1 if message was delivered, <=0 if failure 502 */ 503 int Xorriso_msgs_submit(struct XorrisO *xorriso, 504 int error_code, char msg_text[], int os_errno, 505 char severity[], int flag); 506 507 /** Alternative call interface of Xorriso_msgs_submit with void* instead 508 of struct XorrisO* 509 */ 510 int Xorriso_msgs_submit_void(void *xorriso, 511 int error_code, char msg_text[], int os_errno, 512 char severity[], int flag); 513 514 515 /** Evaluate an advise whether to abort or whether to go on with option 516 processing. This should be called after any option function was processed. 517 It updates the problem status by processing the library message queues 518 and then it uses this status and the submitted return value of the 519 option function to evaluate the situation. 520 @param xorriso The environment handle 521 @param ret The return value of the previously called option function 522 @param flag bit0= do not issue own event messages 523 bit1= take xorriso->request_to_abort as reason for abort 524 @return Gives the advice: 525 2= pardon was given, go on 526 1= no problem, go on 527 0= function failed but xorriso would not abort, go on 528 <0= do abort 529 -1 = due to xorriso->problem_status 530 or due to ret<0 531 -2 = due to xorriso->request_to_abort 532 */ 533 int Xorriso_eval_problem_status(struct XorrisO *xorriso, int ret, int flag); 534 535 536 /** Set the current problem status of the xorriso handle. 537 @param xorriso The environment handle 538 @param severity A severity text. Empty text resets to "No Problem". 539 @param flag Unused yet. Submit 0. 540 @return <=0 failure (e.g. wrong severity text), 1 success. 541 */ 542 int Xorriso_set_problem_status(struct XorrisO *xorriso, char *severity, 543 int flag); 544 545 546 /* The next three functions are part of Xorriso_eval_problem_status(). 547 You may use them to build an own advisor function. 548 */ 549 550 /** Compare two severity texts for their severeness. 551 Unknown severity texts get defaulted to "FATAL". 552 @since 1.2.6 553 @param sev1 First severity text to compare 554 @param sev2 Second severity text to compare 555 @return -1 sev1 is less severe than sev2 556 0 sev1 is equally severe to sev2 557 1 sev1 is more severe than sev2 558 */ 559 int Xorriso__severity_cmp(char *sev1, char *sev2); 560 561 562 /** Return a blank separated list of severity names. Sorted from low 563 to high severity. 564 @since 1.2.6 565 @param flag Bitfield for control purposes (unused yet, submit 0) 566 @return A constant string with the severity names 567 */ 568 char *Xorriso__severity_list(int flag); 569 570 571 572 /** Obtain the current problem status of the xorriso handle. 573 @param xorriso The environment handle 574 @param severity The severity text matching the current problem status 575 @param flag Unused yet. Submit 0. 576 @return The severity rank number. 0= no problem occurred. 577 */ 578 int Xorriso_get_problem_status(struct XorrisO *xorriso, char severity[80], 579 int flag); 580 581 582 /** Forward any pending messages from the library message queues to the 583 xorriso message system which puts out on info channel. This registers 584 the severity of the library events like the severity of a message submitted 585 via Xorriso_msgs_submit(). 586 xorriso sets the message queues of the libraries to queuing "ALL". 587 Many inner functions of xorriso call Xorriso_process_msg_queues() on their 588 own because they expect library output pending. Nevertheless, a loop of 589 xorriso option calls should either call Xorriso_eval_problem_status() or 590 Xorriso_process_msg_queues() with each cycle. 591 @param xorriso The environment handle 592 @param flag Unused yet. Submit 0. 593 @return 1 on success, <=0 if failure 594 */ 595 int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag); 596 597 598 /** Write a message for option -errfile_log. 599 @param xorriso The environment handle 600 @param error_code The unique error code of your message. 601 Submit 0 if you do not have reserved error codes within 602 the libburnia project. 603 @param msg_text Not more than 8196 characters of message text. 604 @param os_errno Eventual errno related to the message. Submit 0 if 605 the message is not related to a operating system error. 606 @param flag bit0-7= meaning of msg_text 607 ( 0= ERRFILE path , for internal use mainly ) 608 1= mark line text (only to be put out if enabled) 609 @return <=0 error , >0 success 610 */ 611 int Xorriso_process_errfile(struct XorrisO *xorriso, 612 int error_code, char msg_text[], int os_errno, 613 int flag); 614 615 616 /* 617 Message output evaluation 618 619 xorriso is basically a dialog software which reacts on commands by 620 side effects and by messages. The side effects manipulate the state of 621 the ISO image model and of drives. This state can be inquired by commands 622 which emit messages. 623 624 There are several approaches how a program that uses xorriso via this API 625 can receive and use the message output of xorriso. 626 627 - The message sieve may be programmed to pick certain information snippets 628 out of the visible message stream. This covers all messages on the 629 result channel and those info channel messages which get not suppressed 630 by command -report_about. All important info messages have severity NOTE 631 or higher. 632 Much of the message interpretation is supposed to happen by the sieve 633 filter rules which describe the interesting message lines and the 634 positions of the interesting message parts. 635 The call Xorriso_sieve_big() installs a sieve that looks out for most 636 model state messages which xorriso can emit. After a few commands 637 the user will ask the sieve for certain text pieces that might have been 638 caught. 639 640 - The outlist stack may be used to catch messages in linked lists rather 641 than putting them out on the message channels. 642 All interpretation of the messages has to be done by the user of the 643 xorriso API. Function Xorriso_parse_line() is intended to help with 644 splitting up messages into words. 645 The outlist stack is handy for catching the results of information 646 commands with large uniform output or no well recognizable message 647 prefix. Like -lsl, -getfacl, -status, -find ... -exec get_md5. 648 One should push the stack before the command, pull it afterwards, examine 649 the text list by Xorriso_lst_get_*(), and finally dispose the list. 650 651 - The message watcher is a separate program thread which uses the outlist 652 stack to catch the messages and to call user provided handler functions. 653 These functions can use Xorriso_parse_line() too, if they submit the 654 xorriso parameter as NULL. They may not use the struct XorrisO object 655 in any way. 656 Synchronization between watcher and emitters of commands can be achieved 657 by Xorriso_peek_outlists(). 658 The main motivation for the message watcher is to inspect and display 659 messages of long lasting xorriso commands while they are still executing. 660 E.g. of -commit, -blank, -format. 661 One would normally start it before such a command and stop it afterwards. 662 But of course, the watcher can stay activated all the time and process 663 all message output via its handler calls. 664 665 The message sieve does not interfere with outlists and message watcher. 666 The message watcher will only see messages which are not caught by outlists 667 which were enabled after the watcher thread was started. 668 669 */ 670 671 /* The programmable message sieve picks words out of the program messages 672 of xorriso. 673 The sieve is a collection of filter rules. Each one is defined by a call of 674 Xorriso_sieve_add_filter(). The sieve watches the given output channels for 675 messages which begin by the given text prefixes of the filters. 676 Matching lines get split into words by Xorriso_parse_line() using 677 the given separators. The words described by the filter's word index array 678 get recorded by the filter and can be inquired by Xorriso_sieve_get_result() 679 after one or more xorriso commands have been performed. 680 The recorded results may be disposed by Xorriso_sieve_clear_results without 681 giving up the sieve. 682 The whole sieve may be disposed by Xorriso_sieve_dispose(). 683 Default at library start is an inactive sieve without any filter rules. 684 */ 685 686 /** Add a filter rule to the message sieve. 687 Start watching output messages, if this is not already enabled. 688 @since 1.2.6 689 @param xorriso The environment handle 690 @param name The filter name by which its recorded results shall 691 be inquired via Xorriso_sieve_get_result() 692 @param channels Which of the output channels the filter shall watch 693 bit0= result channel 694 bit1= info channel 695 bit2= mark channel 696 @param prefix The line start to watch for. Will also be handed over 697 to Xorriso_parse_line(). Empty text matches all lines. 698 If the prefix begins by '?' characters, then these 699 match any character at the beginning of a message. 700 The prefix of the filter rule will then be adapted 701 to really match the line, before it gets handed over 702 to Xorriso_parse_line(). 703 @param separators List of separator characters for Xorriso_parse_line() 704 @param num_words Number of word indice in word_idx 705 @param word_idx Array with the argv indice to be picked from the 706 the result of Xorriso_parse_line(). Must at least 707 contain num_words elements. 708 @param max_results If not 0, then the maximum number of line results that 709 shall be recorded by the filter. When this number is 710 exceeded, then results of older lines get discarded 711 when new results get recorded. 712 @param flag Bitfield for control purposes 713 bit0= Last result word shall contain the remainder of 714 the message line 715 @return <=0 error , >0 success 716 */ 717 int Xorriso_sieve_add_filter(struct XorrisO *xorriso, char *name, 718 int channels, char *prefix, char *separators, 719 int num_words, int *word_idx, int max_results, 720 int flag); 721 722 723 /** Inquire recorded results from a particular filter rule. 724 @param xorriso The environment handle 725 @param name The filter name as given by Xorriso_sieve_add_filter() 726 @param argc Will return the number of allocated and filled word 727 strings. 728 @param argv Will return the array of word strings. 729 Do not forget to dispose the allocated memory by a 730 call to Xorriso__dispose_words(). 731 @param available Will return the number of results which are still 732 available for further calls of Xorriso_sieve_get_result() 733 with the given name. 734 @param flag Bitfield for control purposes: 735 bit0= Reset reading to first matching result. 736 bit1= Only inquire number of available results. 737 Do not allocate memory. 738 bit2= If *argv is not NULL, then free it before attaching 739 new memory. 740 bit3= Do not read recorded data but rather list all 741 filter names. 742 @return <0 error: -1 = memory shortage 743 -2 = no filter rule found 744 0 No more data available for the given name 745 With bit3: No filter rules installed. 746 >0 argc and argv are valid 747 */ 748 int Xorriso_sieve_get_result(struct XorrisO *xorriso, char *name, 749 int *argc, char ***argv, int *available, 750 int flag); 751 752 753 /** Dispose all recorded results. Keep filter rules. Continue watching 754 and recording. 755 @since 1.2.6 756 @param xorriso The environment handle 757 @param flag Unused yet. Submit 0. 758 @return <=0 error , >0 success 759 */ 760 int Xorriso_sieve_clear_results(struct XorrisO *xorriso, int flag); 761 762 763 /** Dispose all filter rules. End watching and recording. 764 This is the default state at library startup. 765 @since 1.2.6 766 @param xorriso The environment handle 767 @param flag Unused yet. Submit 0. 768 @return <=0 error , >0 success 769 */ 770 int Xorriso_sieve_dispose(struct XorrisO *xorriso, int flag); 771 772 773 /** Install a large sieve with filters for about any interesting message 774 of xorriso. The filter rule names are mostly the same as the prefixes they 775 search for. If you do not find the message prefix of your desire, then 776 you may add a filter rule by Xorriso_sieve_add_filter(). 777 If you do not want all these filter any more, call Xorriso_sieve_dispose(). 778 779 You should obtain your recorded data often and then call 780 Xorriso_sieve_clear_results(). It is nevertheless ok to perform several 781 different xorriso information commands and to then obtain results from the 782 sieve. 783 784 The installed filters in particular: 785 Name Recorded values, returned by Xorriso_sieve_get_result() 786 ------------------------------------------------------------------------ 787 "-changes_pending" up to 1 result from -changes_pending show_status 788 argv[0]= "yes" or "no" 789 "? -dev" up to 10 results from -devices or -device_links 790 (records drives with single digit index number) 791 argv[0]= drive address 792 argv[1]= permissions 793 argv[2]= drive vendor 794 argv[3]= product id 795 "?? -dev" up to 90 results from -devices or -device_links 796 (records drives with double digit index number) 797 argv[0]= drive address 798 argv[1]= permissions 799 argv[2]= drive vendor 800 argv[3]= product id 801 "Abstract File:" up to 1 result from -pvd_info 802 argv[0]= file name 803 (Note: prefix is "Abstract File: ") 804 "After commit :" up to 1 result from -tell_media_space 805 argv[0]= number of blocks with "s" appended 806 "App Id :" up to 1 result from -pvd_info 807 argv[0]= id 808 (Note: prefix is "App Id : ") 809 "Biblio File :" up to 1 result from -pvd_info 810 argv[0]= file name 811 (Note: prefix is "Biblio File : ") 812 "Build timestamp :" up to 1 result from -version 813 argv[0]= timestamp 814 (Note: prefix is "Build timestamp : ") 815 "CopyrightFile:" up to 1 result from -pvd_info 816 argv[0]= file name 817 (Note: prefix is "CopyrightFile: ") 818 "Creation Time:" up to 1 result from -pvd_info 819 argv[0]= YYYYMMDDhhmmsscc 820 (Note: prefix is "Creation Time: ") 821 "DVD obs 64 kB:" up to 1 result from -list_extras 822 argv[0]= "yes" or "no" 823 "Drive current:" up to 2 results from -dev, -indev, -toc, others 824 argv[0]= command ("-dev", "-outdev", "-indev") 825 argv[1]= drive address 826 "Drive type :" up to 2 results from -toc 827 argv[0]= vendor 828 argv[1]= product 829 argv[2]= revision 830 "Eff. Time :" up to 1 result from -pvd_info 831 argv[0]= YYYYMMDDhhmmsscc 832 (Note: prefix is "EffectiveTime: ") 833 "Expir. Time :" up to 1 result from -pvd_info 834 argv[0]= YYYYMMDDhhmmsscc 835 (Note: prefix is "Expir. Time : ") 836 "Ext. filters :" up to 1 result from -list_extras 837 argv[0]= "yes" or "no" , possibly more info 838 (Note: prefix is "Ext. filters : ") 839 "File damaged :" up to 10000 results from -find ... -exec report_damage 840 argv[0]= damage start byte in file 841 argv[1]= damage range size in file 842 argv[2]= file size 843 argv[3]= path in ISO image 844 "File data lba:" up to 10000 results from -find ... -exec report_lba 845 argv[0]= extent number (all extents of same path together 846 are the content of one file) 847 argv[1]= start block number of extent 848 argv[2]= number of blocks of extent 849 argv[3]= overall file content size in all extents 850 argv[4]= path in ISO image 851 "Format idx :" up to 100 results from -list_formats 852 argv[0]= index 853 argv[1]= MMC code 854 argv[2]= number of blocks with "s" appended 855 argv[3]= roughly the size in MiB 856 (Note: prefix is "Format idx ") 857 "Format status:" up to 1 result from -list_formats 858 argv[0]= status 859 argv[1]= capacity 860 "ISO session :" up to 10000 results from -toc 861 argv[0]= Idx 862 argv[1]= sbsector 863 argv[2]= Size 864 argv[3]= Volume Id 865 "Image size :" up to 1 result from -print_size 866 argv[0]= number of blocks with "s" appended 867 "Jigdo files :" up to 1 result from -list_extras 868 argv[0]= "yes" or "no" 869 "Local ACL :" up to 1 result from -list_extras 870 argv[0]= "yes" or "no" 871 "Local xattr :" up to 1 result from -list_extras 872 argv[0]= "yes" or "no" 873 "MD5 MISMATCH:" up to 10000 results from -check_md5* 874 argv[0]= path of mismatching file 875 "MD5 tag range:" up to 10000 results from -check_media 876 argv[0]= lba 877 argv[1]= size in blocks 878 argv[2]= result text (starting with "+", "-", or "0") 879 "Media blocks :" up to 2 results from -toc 880 argv[0]= readable 881 argv[1]= writable 882 argv[2]= overall 883 "Media current:" up to 2 results from -dev, -indev, -toc, others 884 argv[0]= media type / MMC profile name 885 (Note: prefix is "Media current: " which eats extra blank) 886 "Media nwa :" up to 1 result from -toc 887 argv[0]= next writable address 888 "Media product:" up to 2 results from -toc 889 argv[0]= product id 890 argv[1]= manufacturer 891 "Media region :" up to 10000 results from -check_media 892 argv[0]= lba 893 argv[1]= size in blocks 894 argv[2]= quality text (starting with "+", "-", or "0") 895 "Media space :" up to 1 result from -tell_media_space 896 argv[0]= number of blocks with "s" appended 897 "Media status :" up to 2 results from -dev, -indev, -toc, others 898 argv[0]= status description 899 (Note: prefix is "Media status : ") 900 "Media summary:" up to 2 results from -dev, -indev, -toc, others 901 argv[0]= sessions 902 argv[1]= data blocks (full count) 903 argv[2]= data (with unit letter k,m,g) 904 argv[3]= free (with unit letter k,m,g) 905 "Modif. Time :" up to 1 result from -pvd_info 906 argv[0]= YYYYMMDDhhmmsscc 907 (Note: prefix is "Modif. Time : ") 908 "PVD address :" up to 1 result from -pvd_info 909 argv[0]= block address with "s" appended 910 "Preparer Id :" up to 1 result from -pvd_info 911 argv[0]= id 912 (Note: prefix is "Preparer Id : ") 913 "Profile :" up to 256 results from -list_profiles 914 argv[0]= MMC code 915 argv[1]= profile name in round brackets 916 possibly appended: " (current)" 917 "Publisher Id :" up to 1 result from -pvd_info 918 argv[0]= id 919 (Note: prefix is "Publisher Id : ") 920 "Readline :" up to 1 result from -list_extras 921 argv[0]= "yes" or "no" 922 "Size lower :" up to 1 result from -findx ... -exec estimate_size 923 argv[0]= size with appended "s" 924 "Size upper :" up to 1 result from -findx ... -exec estimate_size 925 argv[0]= size with appended "s" 926 "System Id :" up to 1 result from -pvd_info 927 argv[0]= id 928 (Note: prefix is "System Id : ") 929 "Version timestamp :" up to 1 result from -version 930 argv[0]= timestamp 931 "Volume Id :" up to 1 result from -pvd_info 932 argv[0]= id 933 (Note: Not output from -dev or -toc but from -pvd_info) 934 "Volume Set Id:" up to 1 result from -pvd_info 935 argv[0]= id 936 (Note: prefix is "Volume Set Id: ") 937 "Volume id :" up to 2 results from -dev, -indev, -toc, others 938 argv[0]= volume id 939 (Note: Not output from -pvd_info but from -dev or -toc) 940 "Write speed :" up to 100 results from -list_speeds 941 argv[0]= kilobytes per second 942 argv[1]= speed factor 943 "Write speed H:" up to 1 result from -list_speeds 944 see "Write speed :" 945 "Write speed L:" up to 1 result from -list_speeds 946 see "Write speed :" 947 "Write speed h:" up to 1 result from -list_speeds 948 see "Write speed :" 949 "Write speed l:" up to 1 result from -list_speeds 950 see "Write speed :" 951 "libburn in use :" up to 1 result from -version 952 argv[0]= version text 953 argv[1]= minimum version requirement 954 "libburn OS adapter:" up to 1 result from -version 955 argv[0]= adapter description 956 (Note: prefix is "libburn OS adapter: ") 957 "libisoburn in use :" up to 1 result from -version 958 argv[0]= version text 959 argv[1]= minimum version requirement 960 "libisofs in use :" up to 1 result from -version 961 argv[0]= version text 962 argv[1]= minimum version requirement 963 "libjte in use :" up to 1 result from -version 964 argv[0]= version text 965 argv[1]= minimum version requirement 966 "xorriso version :" up to 1 result from -version 967 argv[0]= version text 968 "zisofs :" up to 1 result from -list_extras 969 argv[0]= "yes" or "no" 970 ------------------------------------------------------------------------ 971 972 @since 1.2.6 973 @param xorriso The environment handle 974 @param flag Unused yet. Submit 0. 975 @return <=0 error , >0 success 976 */ 977 int Xorriso_sieve_big(struct XorrisO *xorriso, int flag); 978 979 980 /* The outlist stack allows to redirect the info and result messages from 981 their normal channels into a pair of string lists which can at some 982 later time be retrieved by the application. 983 These redirection caches can be stacked to allow stacked applications. 984 xorriso itself uses them for internal purposes. 985 986 The call Xorriso_start_msg_watcher() starts a concurrent thread which 987 uses outlists to collect messages and to hand them over by calling 988 application provided functions. 989 */ 990 991 /* A list item able of forming double chained lists */ 992 struct Xorriso_lsT; 993 994 /** Maximum number of stacked redirections */ 995 #define Xorriso_max_outlist_stacK 32 996 997 /** Enable a new redirection of info and/or result channel. The normal message 998 output and eventual older redirections will not see new messages until 999 the redirection is ended by a call to Xorriso_pull_outlists() with the 1000 stack_handle value returned by this call. 1001 If Xorriso_option_pkt_output() is set to "on", then it will consolidate 1002 output in the result_list of Xorriso_fetch_outlists() and 1003 Xorriso_pull_outlists(). 1004 @param xorriso The environment handle 1005 @param stack_handle returns an id number which is unique as long as 1006 its redirection is stacked. Do not interpret it and 1007 do not use it after its redirection was pulled from 1008 the stack. 1009 @param flag Bitfield for control purposes 1010 bit0= redirect result channel 1011 bit1= redirect info channel 1012 If bit0 and bit1 are 0, both channels get redirected. 1013 @return 1 on success, <=0 if failure 1014 */ 1015 int Xorriso_push_outlists(struct XorrisO *xorriso, int *stack_handle, 1016 int flag); 1017 1018 1019 /** Obtain the currently collected text messages of redirected info and 1020 result channel. 1021 The messages are handed out as two lists. Both lists have to be disposed 1022 via Xorriso_lst_destroy_all() when they are no longer needed. 1023 The message lists are either NULL or represented by their first 1024 Xorriso_lsT item. 1025 1026 This call is safe for being used by a concurrent thread while a 1027 xorriso API call is being executed on the same struct XorrisO. 1028 In such a situation, it should not be used with high frequency in order 1029 not to hamper the ongoing xorriso operation by blocking its message 1030 output facility. A hundred times per second should be enough. 1031 1032 @since 1.2.6 1033 @param xorriso The environment handle 1034 @param stack_handle An id number returned by Xorriso_push_outlists() 1035 and not yet revoked by Xorriso_pull_outlists(). 1036 Submit -1 to address the most recent valid id. 1037 @param result_list Result and mark messages (usually directed to stdout) 1038 @param info_list Info and mark messages (usually directed to stderr) 1039 @param flag Bitfield for control purposes 1040 bit0= fetch result channel 1041 bit1= fetch info channel 1042 If bit0 and bit1 are 0, both channels get fetched. 1043 @return 1 on success, <=0 if failure 1044 */ 1045 int Xorriso_fetch_outlists(struct XorrisO *xorriso, int stack_handle, 1046 struct Xorriso_lsT **result_list, 1047 struct Xorriso_lsT **info_list, int flag); 1048 1049 1050 /** Inquire whether messages are pending in redirected result and info channel. 1051 This may be used to determine whether a concurrent message watcher already 1052 has obtained all pending messages. 1053 @since 1.2.6 1054 @param xorriso The environment handle 1055 @param stack_handle An id number returned by Xorriso_push_outlists() 1056 and not yet revoked by Xorriso_pull_outlists(). 1057 Submit -1 to address the most recent valid id. 1058 @param timeout Number of seconds after which to return despite 1059 flag bit 2 1060 @param flag Bitfield for control purposes 1061 bit0= fetch result channel 1062 bit1= fetch info channel 1063 bit2= wait and retry until return is 0 or -1 1064 If bit0 and bit1 are 0, both channels get fetched. 1065 @return If > 0: 1066 bit0= messages are pending in outlists 1067 bit1= message watcher is processing fetched messages 1068 Else: 1069 0= no messages are pending anywhere 1070 -1= inappropriate stack_handle 1071 -2= locking failed 1072 */ 1073 int Xorriso_peek_outlists(struct XorrisO *xorriso, int stack_handle, 1074 int timeout, int flag); 1075 1076 1077 /** Disable the redirection given by stack_handle. If it was the current 1078 receiver of messages then switch output to the next older redirection, 1079 or to the normal channels if no redirections are stacked any more. 1080 The messages collected by the disabled redirection are handed out as 1081 two lists. Both lists have to be disposed via Xorriso_lst_destroy_all() 1082 when they are no longer needed. 1083 The message lists are either NULL or represented by their first 1084 Xorriso_lsT item. 1085 @param xorriso The environment handle 1086 @param stack_handle An id number returned by Xorriso_push_outlists() 1087 and not yet revoked by Xorriso_pull_outlists(). 1088 This handle is invalid after the call. 1089 Submit -1 to address the most recent valid id. 1090 @param result_list Result and mark messages (usually directed to stdout) 1091 @param info_list Info and mark messages (usually directed to stderr) 1092 @param flag unused yet, submit 0 1093 @return 1 on success, <=0 if failure 1094 */ 1095 int Xorriso_pull_outlists(struct XorrisO *xorriso, int stack_handle, 1096 struct Xorriso_lsT **result_list, 1097 struct Xorriso_lsT **info_list, int flag); 1098 1099 1100 /** Redirect output by Xorriso_push_outlists() and start a thread which 1101 fetches this output and performs a call of a given function with each 1102 message that is obtained. 1103 @since 1.2.6 1104 @param xorriso The environment handle 1105 @param result_handler Pointer to the function which shall be called with 1106 each result message. A NULL pointer causes output 1107 to be directed to stdout or to be interpreted 1108 as -pkt_output format if this is enabled by 1109 Xorriso_option_pkt_output(). 1110 The function should return 1. A return value of -1 1111 urges not to call again with further lines. 1112 @param result_handle The first argument of (*result_handler)(). It shall 1113 point to a memory object that knows all necessary 1114 external parameters for running (*result_handler)(). 1115 Submit NULL if result_handler is NULL. 1116 @param info_handler Pointer to the function which shall be called with 1117 each info message. A NULL pointer causes output to 1118 be directed to stderr or to -as mkisofs -log-file. 1119 The function should return 1. A return value of -1 1120 urges not to call again with further lines. 1121 @param info_handle The first argument of (*info_handler)(). It shall 1122 point to a memory object that knows all necessary 1123 external parameters for running (*info_handler)(). 1124 Submit NULL if info_handler is NULL. 1125 @param flag unused yet, submit 0 1126 @return 1 on success, <=0 if failure (e.g. there is already 1127 a watcher active) 1128 */ 1129 int Xorriso_start_msg_watcher(struct XorrisO *xorriso, 1130 int (*result_handler)(void *handle, char *text), 1131 void *result_handle, 1132 int (*info_handler)(void *handle, char *text), 1133 void *info_handle, 1134 int flag); 1135 1136 1137 /** Revoke output redirection by Xorriso_start_msg_watcher() and end the 1138 watcher thread. If text messages are delivered when Xorriso_pull_outlists() 1139 is called, then they get put out through the active handler functions. 1140 @since 1.2.6 1141 @param xorriso The environment handle 1142 @param flag Bitfield for control purposes: 1143 bit0= do not issue SORRY message if no message 1144 watcher is active 1145 @return 1 on success, <=0 if failure 1146 */ 1147 int Xorriso_stop_msg_watcher(struct XorrisO *xorriso, int flag); 1148 1149 1150 /** Obtain the text message from the current list item. 1151 @param entry The current list item 1152 @param flag unused yet, submit 0 1153 @return Pointer to the text content of the list item. 1154 This pointer does not have to be freed. 1155 */ 1156 char *Xorriso_lst_get_text(struct Xorriso_lsT *entry, int flag); 1157 1158 1159 /** Obtain the address of the next item in the chain of messages. 1160 An iteration over the output of Xorriso_pull_outlists() starts at the 1161 returned result_list or info_list and ends when this function returns 1162 NULL. 1163 @param entry The current list item 1164 @param flag unused yet, submit 0 1165 @return Pointer to the next list item or NULL if end of list. 1166 This pointer does not have to be freed. 1167 */ 1168 struct Xorriso_lsT *Xorriso_lst_get_next(struct Xorriso_lsT *entry, int flag); 1169 1170 1171 /** Obtain the address of the previous item in the chain of messages. 1172 @param entry The current list item 1173 @param flag unused yet, submit 0 1174 @return Pointer to the previous list item or NULL if start of list. 1175 This pointer does not have to be freed. 1176 */ 1177 struct Xorriso_lsT *Xorriso_lst_get_prev(struct Xorriso_lsT *entry, int flag); 1178 1179 1180 /** Destroy all list items which are directly or indirectly connected to 1181 the given link item. 1182 All pointers obtained by Xorriso_lst_get_text() become invalid by this. 1183 Apply this to each of the two list handles obtained by 1184 Xorriso_pull_outlists() when the lists are no longer needed. 1185 @param lstring *lstring will be freed and set to NULL. 1186 It is not dangerous to submit a pointer to a NULL-pointer. 1187 @param flag unused yet, submit 0 1188 @return -1= lstring was NULL (i.e. wrong use of this call), 1189 0= *lstring was already NULL, 1190 1= item actually disposed 1191 */ 1192 int Xorriso_lst_destroy_all(struct Xorriso_lsT **lstring, int flag); 1193 1194 1195 1196 /* ---------------------------- Command API ------------------------ */ 1197 /* See man 1 xorriso for explanation of the particular commands */ 1198 /* 1199 Before each call to a command function, there should happen: 1200 Xorriso_set_problem_status() with empty severity text. 1201 1202 After each call to a command function, there should happen: 1203 Xorriso_eval_problem_status() 1204 One should follow its eventual advice to abort. 1205 1206 Commands with a varying number of arguments get then passed like 1207 Xorriso_interpreter(). E.g.: 1208 int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv, 1209 int *idx, int flag); 1210 The command functions will begin to read the arguments at position *idx 1211 and will see the list end either at the next argv which contains the 1212 -list_delimiter text or at argv[argc-1]. 1213 After the call, *idx will be the index of the first not yet interpreted 1214 argv. 1215 1216 Do not set any flag bits which are not described by "@param flag". 1217 I.e. if flag is not mentioned, then submit 0. 1218 Yet undefined flag bits might get a meaning in future. Unset bits will 1219 then produce the traditional behavior, whereas set bits might bring 1220 surprises to inadverted callers. 1221 1222 The API is available 1223 @since 0.5.8 1224 Earlier "since" marks refer to availability in the command interpreter. 1225 */ 1226 1227 1228 /* Command -abort_on */ 1229 /* @since 0.1.0 */ 1230 int Xorriso_option_abort_on(struct XorrisO *xorriso, char *severity, int flag); 1231 1232 /* Command -abstract_file */ 1233 /* @since 0.6.0 */ 1234 int Xorriso_option_abstract_file(struct XorrisO *xorriso, char *name, 1235 int flag); 1236 1237 /* Command -acl "on"|"off" */ 1238 /* @since 0.3.4 */ 1239 int Xorriso_option_acl(struct XorrisO *xorriso, char *mode, int flag); 1240 1241 /* Command -add */ 1242 /* @param flag bit0=do not report the added item 1243 bit1=do not reset pacifier, no final pacifier message 1244 */ 1245 /* @since 0.1.0 */ 1246 int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv, 1247 int *idx, int flag); 1248 1249 /* Command -add_plainly "on"|"off" */ 1250 /* @since 0.1.0 */ 1251 int Xorriso_option_add_plainly(struct XorrisO *xorriso, char *mode, 1252 int flag); 1253 1254 /* Command -alter_date, -alter_date_r */ 1255 /* @param flag bit0=recursive (-alter_date_r) 1256 */ 1257 /* @since 0.1.0 */ 1258 int Xorriso_option_alter_date(struct XorrisO *xorriso, 1259 char *time_type, char *timestring, 1260 int argc, char **argv, int *idx, int flag); 1261 1262 /* Command -append_partition */ 1263 /* @since 0.6.4 */ 1264 int Xorriso_option_append_partition(struct XorrisO *xorriso, char *partno_text, 1265 char *type_text, char *image_path, int flag); 1266 1267 /* Command -application_id */ 1268 /* @since 0.3.0 */ 1269 int Xorriso_option_application_id(struct XorrisO *xorriso, char *name, 1270 int flag); 1271 1272 /* Command -application_use */ 1273 /* @since 1.3.2 */ 1274 int Xorriso_option_application_use(struct XorrisO *xorriso, char *path, 1275 int flag); 1276 1277 /* Command -as */ 1278 /* @param flag bit0=do not report the added item 1279 bit1=do not reset pacifier, no final pacifier message 1280 */ 1281 /* @since 0.1.2 */ 1282 int Xorriso_option_as(struct XorrisO *xorriso, int argc, char **argv, 1283 int *idx, int flag); 1284 1285 /* Command -assert_volid */ 1286 /* @since 0.3.2 */ 1287 int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern, 1288 char *severity, int flag); 1289 1290 /* Command -auto_charset "on"|"off" */ 1291 /* @since 0.3.8 */ 1292 int Xorriso_option_auto_charset(struct XorrisO *xorriso, char *mode, int flag); 1293 1294 /* Command -backslash_codes */ 1295 /* @since 0.3.0 */ 1296 int Xorriso_option_backslash_codes(struct XorrisO *xorriso, char *mode, 1297 int flag); 1298 1299 /* Command -ban_stdio_write */ 1300 /* @since 0.1.0 */ 1301 int Xorriso_option_ban_stdio_write(struct XorrisO *xorriso, int flag); 1302 1303 /* Command -biblio_file */ 1304 /* @since 0.6.0 */ 1305 int Xorriso_option_biblio_file(struct XorrisO *xorriso, char *name, int flag); 1306 1307 /* Command -blank and -format */ 1308 /* @param flag bit0= format rather than blank 1309 @return <=0 error , 1 success, 2 revoked by -reassure 1310 */ 1311 /* @since 0.1.0 */ 1312 int Xorriso_option_blank(struct XorrisO *xorriso, char *mode, int flag); 1313 1314 /* Command -boot_image */ 1315 /* @since 0.1.0 */ 1316 int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form, 1317 char *treatment, int flag); 1318 1319 /* Command -calm_drive */ 1320 /* @since 0.4.2 */ 1321 int Xorriso_option_calm_drive(struct XorrisO *xorriso, char *which, int flag); 1322 1323 /* Command -cd alias -cdi */ 1324 /* @since 0.1.0 */ 1325 int Xorriso_option_cdi(struct XorrisO *xorriso, char *iso_rr_path, int flag); 1326 1327 /* Command -cdx */ 1328 /* @since 0.1.0 */ 1329 int Xorriso_option_cdx(struct XorrisO *xorriso, char *disk_path, int flag); 1330 1331 /* Command -changes_pending */ 1332 /* @since 1.2.2 */ 1333 int Xorriso_option_changes_pending(struct XorrisO *xorriso, char *state, 1334 int flag); 1335 1336 /* Commands -charset, -in_charset, -out_charset, -local_charset */ 1337 /* @param flag bit0= set in_charset 1338 bit1= set out_charset 1339 bit2= set local_charset 1340 */ 1341 /* @since 0.3.0 */ 1342 int Xorriso_option_charset(struct XorrisO *xorriso, char *name, int flag); 1343 1344 /* Command -check_md5 and -check_md5_r 1345 @param flag bit0= issue summary message 1346 bit1= do not reset pacifier, no final pacifier message 1347 bit2= do not issue pacifier messages at all 1348 bit3= recursive: -check_md5_r 1349 */ 1350 /* @since 0.4.2 */ 1351 int Xorriso_option_check_md5(struct XorrisO *xorriso, 1352 int argc, char **argv, int *idx, int flag); 1353 1354 /* Command -check_media */ 1355 /* @since 0.2.4 */ 1356 int Xorriso_option_check_media(struct XorrisO *xorriso, 1357 int argc, char **argv, int *idx, int flag); 1358 1359 /* Command -check_media_defaults */ 1360 /* @since 0.2.6 */ 1361 int Xorriso_option_check_media_defaults(struct XorrisO *xorriso, 1362 int argc, char **argv, int *idx, int flag); 1363 1364 /* Command -chgrp alias -chgrpi , chgrp_r alias chgrp_ri */ 1365 /* @param flag bit0=recursive (-chgrp_r) 1366 */ 1367 /* @since 0.1.0 */ 1368 int Xorriso_option_chgrpi(struct XorrisO *xorriso, char *gid, 1369 int argc, char **argv, int *idx, int flag); 1370 1371 /* Command -chmod alias -chmodi , -chmod_r alias chmod_ri */ 1372 /* @param flag bit0=recursive (-chmod_r) 1373 */ 1374 /* @since 0.1.0 */ 1375 int Xorriso_option_chmodi(struct XorrisO *xorriso, char *mode, 1376 int argc, char **argv, int *idx, int flag); 1377 1378 /* Command -chown alias -chowni , chown_r alias chown_ri */ 1379 /* @param flag bit0=recursive (-chown_r) 1380 */ 1381 /* @since 0.1.0 */ 1382 int Xorriso_option_chowni(struct XorrisO *xorriso, char *uid, 1383 int argc, char **argv, int *idx, int flag); 1384 1385 /* Command -clone */ 1386 /* @since 1.0.2 */ 1387 int Xorriso_option_clone(struct XorrisO *xorriso, char *origin, char *dest, 1388 int flag); 1389 1390 /* Command -close "on"|"off"| @since 1.3.4 "as_needed" */ 1391 /* @since 0.1.0 */ 1392 int Xorriso_option_close(struct XorrisO *xorriso, char *mode, int flag); 1393 1394 /* Command -close_damaged */ 1395 /* @since 1.1.0 */ 1396 int Xorriso_option_close_damaged(struct XorrisO *xorriso, char *mode, 1397 int flag); 1398 1399 /* Command -close_filter_list */ 1400 /* @since 0.3.8 */ 1401 int Xorriso_option_close_filter_list(struct XorrisO *xorriso, int flag); 1402 1403 /* Command -commit */ 1404 /* @param flag bit0= leave indrive and outdrive acquired as they were, 1405 i.e. do not acquire outdrive as new in-out-drive 1406 bit1= do not perform eventual -reassure 1407 @return <=0 error , 1 success, 2 revoked by -reassure 1408 */ 1409 /* @since 0.1.0 */ 1410 int Xorriso_option_commit(struct XorrisO *xorriso, int flag); 1411 1412 /* Command -commit_eject */ 1413 /* @return <=0 error , 1 success, 2 revoked by -reassure 1414 */ 1415 /* @since 0.1.0 */ 1416 int Xorriso_option_commit_eject(struct XorrisO *xorriso, char *which, int flag); 1417 1418 /* Command -compare and -compare_r 1419 @param flag bit0= issue summary message 1420 bit1= do not reset pacifier, no final pacifier message 1421 bit2= do not issue pacifier messages at all 1422 bit3= recursive: -compare_r 1423 */ 1424 /* @since 0.1.2 */ 1425 int Xorriso_option_compare(struct XorrisO *xorriso, char *disk_path, 1426 char *iso_path, int flag); 1427 1428 /* Command -compliance */ 1429 /* @since 0.3.0 */ 1430 int Xorriso_option_compliance(struct XorrisO *xorriso, char *mode, int flag); 1431 1432 /* Command -concat */ 1433 /* @since 1.3.8 */ 1434 int Xorriso_option_concat(struct XorrisO *xorriso, 1435 int argc, char **argv, int *idx, int flag); 1436 1437 /* Command -copyright_file */ 1438 /* @since 0.6.0 */ 1439 int Xorriso_option_copyright_file(struct XorrisO *xorriso, char *name, 1440 int flag); 1441 1442 /* Command -cp_clone */ 1443 /* @since 1.0.2 */ 1444 int Xorriso_option_cp_clone(struct XorrisO *xorriso, int argc, char **argv, 1445 int *idx, int flag); 1446 1447 /* Command -cpr alias -cpri */ 1448 /* @since 0.1.0 */ 1449 int Xorriso_option_cpri( struct XorrisO *xorriso, int argc, char **argv, 1450 int *idx, int flag); 1451 1452 /* Command -cpx , -cpax, -cp_rx , -cp_rax */ 1453 /* @param flag bit0= recursive (-cp_rx, -cp_rax) 1454 @since 0.2.0 1455 bit1= full property restore (-cpax, -cp_rax) 1456 @since 0.2.0 1457 */ 1458 /* @since 0.1.8 */ 1459 int Xorriso_option_cpx(struct XorrisO *xorriso, int argc, char **argv, 1460 int *idx, int flag); 1461 1462 /* Command -cut_out */ 1463 /* @since 0.1.2 */ 1464 int Xorriso_option_cut_out(struct XorrisO *xorriso, char *disk_path, 1465 char *start, char *count, char *iso_rr_path, int flag); 1466 1467 /* Command -dev , -indev, -outdev */ 1468 /* @param flag bit0=use as indev , bit1= use as outdev 1469 @return <=0 error , 1 success, 2 revoked by -reassure 1470 */ 1471 /* @since 0.1.0 */ 1472 int Xorriso_option_dev(struct XorrisO *xorriso, char *adr, int flag); 1473 1474 /* Command -data_cache_size */ 1475 /* @since 1.2.2 */ 1476 int Xorriso_option_data_cache_size(struct XorrisO *xorriso, char *num_tiles, 1477 char *tile_blocks, int flag); 1478 1479 /* Command -devices */ 1480 /* @param flag bit0= perform -device_links rather than -devices 1481 @since 1.1.4 1482 @return <=0 error , 1 success, 2 revoked by -reassure 1483 */ 1484 /* @since 0.1.0 */ 1485 int Xorriso_option_devices(struct XorrisO *xorriso, int flag); 1486 1487 /* Command -dialog "on"|"off" */ 1488 /* @since 0.2.8 */ 1489 /* (since 0.1.0 there was -dialog and -dialog_reset without arg) */ 1490 int Xorriso_option_dialog(struct XorrisO *xorriso, char *mode, int flag); 1491 1492 /* Command -disk_dev_ino "on"|"off" */ 1493 /* @since 0.3.4 */ 1494 int Xorriso_option_disk_dev_ino(struct XorrisO *xorriso, char *mode, int flag); 1495 1496 /* Command -disk_pattern "on"|"ls"|"off" */ 1497 /* @since 0.1.0 */ 1498 int Xorriso_option_disk_pattern(struct XorrisO *xorriso, char *mode, int flag); 1499 1500 /* Command -displacement [-]offset */ 1501 /* @since 0.6.6 */ 1502 int Xorriso_option_displacement(struct XorrisO *xorriso, char *value, 1503 int flag); 1504 1505 /* Command -drive_class */ 1506 /* @since 0.3.2 */ 1507 int Xorriso_option_drive_class(struct XorrisO *xorriso, 1508 char *d_class, char *pattern, int flag); 1509 1510 /* Command -dummy "on"|"off" */ 1511 /* @since 0.1.0 */ 1512 int Xorriso_option_dummy(struct XorrisO *xorriso, char *mode, int flag); 1513 1514 /* Command -dvd_obs "default"|"32k"|"64k" */ 1515 /* @since 0.4.8 */ 1516 int Xorriso_option_dvd_obs(struct XorrisO *xorriso, char *obs, int flag); 1517 1518 /* Command -early_stdio_test */ 1519 /* @since 1.0.6 */ 1520 int Xorriso_option_early_stdio_test(struct XorrisO *xorriso, char *mode, 1521 int flag); 1522 1523 /* Command -ecma119_map */ 1524 /* @since 1.4.2 */ 1525 int Xorriso_option_ecma119_map(struct XorrisO *xorriso, char *mode, int flag); 1526 1527 /* Command -eject */ 1528 /* @param flag bit0=do not report toc of eventually remaining drives 1529 */ 1530 /* @since 0.1.0 */ 1531 int Xorriso_option_eject(struct XorrisO *xorriso, char *which, int flag); 1532 1533 /* Command -end , and -rollback_end */ 1534 /* @param flag bit0= discard pending changes 1535 @return <=0 error , 1 success, 2 revoked by -reassure 1536 */ 1537 /* @since 0.1.0 */ 1538 int Xorriso_option_end(struct XorrisO *xorriso, int flag); 1539 1540 /* Command -errfile_log marked|plain path|-|"" */ 1541 /* @since 0.1.2 */ 1542 int Xorriso_option_errfile_log(struct XorrisO *xorriso, 1543 char *mode, char *path, int flag); 1544 1545 /* Command -error_behavior */ 1546 /* @since 0.1.6 */ 1547 int Xorriso_option_error_behavior(struct XorrisO *xorriso, 1548 char *occasion, char *behavior, int flag); 1549 1550 /* Command -external_filter */ 1551 /* @since 0.3.8 */ 1552 int Xorriso_option_external_filter(struct XorrisO *xorriso, 1553 int argc, char **argv, int *idx, int flag); 1554 1555 /* Command -extract , -extract_single */ 1556 /* @param flag bit0=do not report the restored item 1557 bit1=do not reset pacifier, no final pacifier message 1558 bit5= -extract_single: do not insert directory tree 1559 */ 1560 /* @since 0.2.0 */ 1561 int Xorriso_option_extract(struct XorrisO *xorriso, char *disk_path, 1562 char *iso_path, int flag); 1563 1564 /* Command -extract_cut */ 1565 /* @since 0.2.6 */ 1566 int Xorriso_option_extract_cut(struct XorrisO *xorriso, char *iso_rr_path, 1567 char *start, char *count, char *disk_path, int flag); 1568 1569 /* Command -file_name_limit */ 1570 /* @since 1.4.2 */ 1571 int Xorriso_option_file_name_limit(struct XorrisO *xorriso, char *value, 1572 int flag); 1573 1574 /* Command -file_size_limit */ 1575 /* @since 0.2.6 */ 1576 int Xorriso_option_file_size_limit(struct XorrisO *xorriso, 1577 int argc, char **argv, int *idx, int flag); 1578 1579 1580 /* Command -find alias -findi, and -findx */ 1581 /* @param flag bit0= -findx rather than -findi 1582 bit1= do not reset pacifier, no final pacifier message 1583 do not reset find_compare_result 1584 */ 1585 /* @since 0.1.0 */ 1586 int Xorriso_option_find(struct XorrisO *xorriso, int argc, char **argv, 1587 int *idx, int flag); 1588 1589 /* Command -follow */ 1590 /* @since 0.1.0 */ 1591 int Xorriso_option_follow(struct XorrisO *xorriso, char *mode, int flag); 1592 1593 /* Command -for_backup is a shortcut for 1594 Xorriso_option_hardlinks(xorriso, "on", 0); 1595 Xorriso_option_acl(xorriso, "on", 0); 1596 Xorriso_option_xattr(xorriso, "any", 0); 1597 Xorriso_option_md5(xorriso, "on", 0); 1598 */ 1599 /* @since 0.4.0 */ 1600 /* xattr "any" 1601 @since 1.5.0 1602 */ 1603 1604 /* Command -fs */ 1605 /* @since 0.1.0 */ 1606 int Xorriso_option_fs(struct XorrisO *xorriso, char *size, int flag); 1607 1608 /* Commands -getfacl alias -getfacli, -getfacl_r alias -getfacl_ri 1609 -getfattr alias getfattri 1610 */ 1611 /* @param flag bit0=recursive -getfacl_r 1612 bit1= getfattr rather than getfacl 1613 bit3= with bit1: do not ignore eventual non-user attributes 1614 */ 1615 /* @since 0.3.4 */ 1616 int Xorriso_option_getfacli(struct XorrisO *xorriso, 1617 int argc, char **argv, int *idx, int flag); 1618 1619 /* Command -gid */ 1620 /* @since 0.1.0 */ 1621 int Xorriso_option_gid(struct XorrisO *xorriso, char *gid, int flag); 1622 1623 /* Command -grow_blindly */ 1624 /* @since 0.2.2 */ 1625 int Xorriso_option_grow_blindly(struct XorrisO *xorriso, char *msc2, int flag); 1626 1627 /* Command -hardlinks "on"|"off" */ 1628 /* @since 0.4.0 */ 1629 int Xorriso_option_hardlinks(struct XorrisO *xorriso, char *mode, int flag); 1630 1631 /* Command -help and part of -prog_help */ 1632 /* @since 0.1.0 */ 1633 int Xorriso_option_help(struct XorrisO *xorriso, int flag); 1634 1635 /* Option -hfsplus "on"|"off" */ 1636 /* @since 1.2.4 */ 1637 int Xorriso_option_hfsplus(struct XorrisO *xorriso, char *mode, int flag); 1638 1639 /* Command -hide */ 1640 /* @since 0.6.0 */ 1641 int Xorriso_option_hide(struct XorrisO *xorriso, char *hide_state, 1642 int argc, char **argv, int *idx, int flag); 1643 1644 /* Command -history */ 1645 /* @since 0.1.0 */ 1646 int Xorriso_option_history(struct XorrisO *xorriso, char *line, int flag); 1647 1648 /* Command -iso_rr_pattern "on"|"ls"|"off" */ 1649 /* @since 0.1.0 */ 1650 int Xorriso_option_iso_rr_pattern(struct XorrisO *xorriso, char *mode, 1651 int flag); 1652 1653 /* Command -jigdo aspect argument */ 1654 /* @since 0.6.4 */ 1655 int Xorriso_option_jigdo(struct XorrisO *xorriso, char *aspect, char *arg, 1656 int flag); 1657 1658 /* Command -joliet "on"|"off" */ 1659 /* @since 0.1.0 */ 1660 int Xorriso_option_joliet(struct XorrisO *xorriso, char *mode, int flag); 1661 1662 /* Command -launch_frontend */ 1663 /* @since 1.2.6 */ 1664 int Xorriso_option_launch_frontend(struct XorrisO *xorriso, 1665 int argc, char **argv, int *idx, int flag); 1666 1667 /* Command -list_arg_sorting */ 1668 /* @since 1.2.2 */ 1669 int Xorriso_option_list_arg_sorting(struct XorrisO *xorriso, int flag); 1670 1671 /* Command -list_delimiter */ 1672 /* @since 0.2.6 */ 1673 int Xorriso_option_list_delimiter(struct XorrisO *xorriso, char *text, 1674 int flag); 1675 1676 /* Command -list_extras */ 1677 /* @since 1.1.6 */ 1678 int Xorriso_option_list_extras(struct XorrisO *xorriso, char *mode, int flag); 1679 1680 /* Command -list_formats */ 1681 /* @since 0.1.6 */ 1682 int Xorriso_option_list_formats(struct XorrisO *xorriso, int flag); 1683 1684 /* Command -list_profiles */ 1685 /* @since 0.4.2 */ 1686 int Xorriso_option_list_profiles(struct XorrisO *xorriso, char *which, 1687 int flag); 1688 1689 /* Command -list_speeds */ 1690 /* @since 1.1.2 */ 1691 int Xorriso_option_list_speeds(struct XorrisO *xorriso, int flag); 1692 1693 /* Command -lns alias -lnsi */ 1694 /* @since 1.2.6 */ 1695 int Xorriso_option_lnsi(struct XorrisO *xorriso, char *target, char *path, 1696 int flag); 1697 1698 /* Command -load session|track|sbsector value */ 1699 /* @param flag bit0= with adr_mode sbsector: adr_value is possibly 16 too high 1700 @return <=0 error , 1 success, 2 revoked by -reassure 1701 */ 1702 /* @since 0.1.6 */ 1703 int Xorriso_option_load(struct XorrisO *xorriso, char *adr_mode, 1704 char *adr_value, int flag); 1705 1706 /* Command -logfile */ 1707 /* @since 0.1.0 */ 1708 int Xorriso_option_logfile(struct XorrisO *xorriso, char *channel, 1709 char *fileadr, int flag); 1710 1711 /* Command -ls alias -lsi and -lsl alias -lsli 1712 and -lsd alias -lsdi and -lsdl alias -lsdli 1713 and -du alias -dui and -dus alias -dusi 1714 @param flag bit0= long format (-lsl , -du, not -dus, not -ls) 1715 bit1= do not expand patterns but use literally 1716 bit2= -du rather than -ls 1717 bit3= list directories as themselves (-lsd) 1718 */ 1719 /* @since 0.1.0 */ 1720 int Xorriso_option_lsi(struct XorrisO *xorriso, int argc, char **argv, 1721 int *idx, int flag); 1722 1723 /* Command -lsx, -lslx, -lsdx , -lsdlx , -dux , -dusx 1724 @param flag bit0= long format (-lslx , -dux) 1725 bit1= do not expand patterns but use literally 1726 bit2= du rather than ls 1727 bit3= list directories as themselves (ls -d) 1728 */ 1729 /* @since 0.1.0 */ 1730 int Xorriso_option_lsx(struct XorrisO *xorriso, int argc, char **argv, 1731 int *idx, int flag); 1732 1733 /* Commandis -map , -map_single */ 1734 /* @param flag bit0=do not report the added item 1735 bit1=do not reset pacifier, no final pacifier message 1736 bit5= -map_single: do not insert directory tree 1737 */ 1738 /* @since 0.1.6 */ 1739 int Xorriso_option_map(struct XorrisO *xorriso, char *disk_path, 1740 char *iso_path, int flag); 1741 1742 /* Command -map_l , -compare_l , -update_l , -extract_l */ 1743 /* @param flag bit8-11= mode 0= -map_l 1744 1= -compare_l 1745 2= -update_l 1746 3= -extract_l 1747 4= -update_lxi @since 1.4.8 1748 5= -update_li @since 1.4.8 1749 */ 1750 /* @since 0.2.0 */ 1751 int Xorriso_option_map_l(struct XorrisO *xorriso, int argc, char **argv, 1752 int *idx, int flag); 1753 1754 /* Command -mark */ 1755 /* @since 0.1.0 */ 1756 int Xorriso_option_mark(struct XorrisO *xorriso, char *mark, int flag); 1757 1758 /* Command -md5 */ 1759 /* @since 0.4.2 */ 1760 int Xorriso_option_md5(struct XorrisO *xorriso, char *mode, int flag); 1761 1762 /* Command -mkdir alias -mkdiri */ 1763 /* @since 0.1.0 */ 1764 int Xorriso_option_mkdiri(struct XorrisO *xorriso, int argc, char **argv, 1765 int *idx, int flag); 1766 1767 /* Command -modesty_on_drive */ 1768 /* @since 1.4.2 */ 1769 int Xorriso_option_modesty_on_drive(struct XorrisO *xorriso, char *mode, 1770 int flag); 1771 1772 /* Command -mount , -mount_cmd , -session_string */ 1773 /* @param bit0= -mount_cmd: print mount command to result channel rather 1774 than performing it 1775 bit1= perform -session_string rather than -mount_cmd 1776 */ 1777 /* @since 0.3.2 */ 1778 int Xorriso_option_mount(struct XorrisO *xorriso, char *dev, char *adr_mode, 1779 char *adr, char *cmd, int flag); 1780 1781 /* Command -mount_opts option[:...] */ 1782 /* @since 0.4.4 */ 1783 int Xorriso_option_mount_opts(struct XorrisO *xorriso, char *mode, int flag); 1784 1785 /* Command -move */ 1786 /* @since 1.2.8 */ 1787 int Xorriso_option_move(struct XorrisO *xorriso, char *origin, char *dest, 1788 int flag); 1789 1790 /* Command -msg_op */ 1791 /* @since 1.2.6 */ 1792 int Xorriso_option_msg_op(struct XorrisO *xorriso, char *what, char *arg, 1793 int flag); 1794 1795 /* Command -mv alias -mvi */ 1796 /* @since 0.1.0 */ 1797 int Xorriso_option_mvi(struct XorrisO *xorriso, int argc, char **argv, 1798 int *idx, int flag); 1799 1800 /* Option -named_pipe_loop */ 1801 /* @since 1.3.2 */ 1802 int Xorriso_option_named_pipe_loop(struct XorrisO *xorriso, char *mode, 1803 char *stdin_pipe, char *stdout_pipe, 1804 char *stderr_pipe, int flag); 1805 1806 /* Command -no_rc */ 1807 /* @since 0.1.0 */ 1808 int Xorriso_option_no_rc(struct XorrisO *xorriso, int flag); 1809 1810 /* Command -not_leaf , -as mkisofs -hide without '/' */ 1811 /* @param flag bit0= add to iso_rr hide list rather than to disk exclusions 1812 @since 0.6.0 1813 bit1= add to joliet hide list rather than disk exclusions 1814 @since 0.6.0 1815 bit2= add to HFS+ hide list rather than disk exclusions 1816 @since 1.2.4 1817 */ 1818 /* @since 0.1.6 */ 1819 int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag); 1820 1821 /* Command -not_list , -quoted_not_list */ 1822 /* @param flag bit0= -quoted_not_list 1823 @since 0.3.0 1824 */ 1825 /* @since 0.1.6 */ 1826 int Xorriso_option_not_list(struct XorrisO *xorriso, char *adr, int flag); 1827 1828 /* Command -not_mgt */ 1829 /* @since 0.1.6 */ 1830 int Xorriso_option_not_mgt(struct XorrisO *xorriso, char *setting, int flag); 1831 1832 /* Command -not_paths , -as mkisofs -hide with '/' */ 1833 /* @param flag bit0= add to iso_rr hide list rather than to disk exclusions 1834 @since 0.6.0 1835 bit1= add to joliet hide list rather than disk exclusions 1836 @since 0.6.0 1837 bit2= enable disk pattern expansion regardless of -disk_pattern 1838 bit8-13= consolidated hide state bits, duplicating bit0-1 1839 @since 1.2.4 1840 bit8= add to iso_rr_hidings, same as bit0 1841 bit9= add to joliet_hidings, same as bit1 1842 bit10= add to hfsplus_hidings 1843 */ 1844 /* @since 0.1.6 */ 1845 int Xorriso_option_not_paths(struct XorrisO *xorriso, int argc, char **argv, 1846 int *idx, int flag); 1847 1848 /* Command -options_from_file */ 1849 /* @return <=0 error , 1 = success , 3 = request to end program run */ 1850 /* @since 0.1.0 */ 1851 int Xorriso_option_options_from_file(struct XorrisO *xorriso, char *adr, 1852 int flag); 1853 1854 /* Command -osirrox "on"|"off" */ 1855 /* @since 0.1.8 */ 1856 int Xorriso_option_osirrox(struct XorrisO *xorriso, char *mode, int flag); 1857 1858 /* Command -overwrite "on"|"nondir"|"off" */ 1859 /* @since 0.1.0 */ 1860 int Xorriso_option_overwrite(struct XorrisO *xorriso, char *mode, int flag); 1861 1862 /* Command -pacifier */ 1863 /* @since 0.2.2 */ 1864 int Xorriso_option_pacifier(struct XorrisO *xorriso, char *style, int flag); 1865 1866 /* Command -padding */ 1867 /* @since 0.1.0 */ 1868 int Xorriso_option_padding(struct XorrisO *xorriso, char *size, int flag); 1869 1870 /* Command -page */ 1871 /* @since 0.1.0 */ 1872 int Xorriso_option_page(struct XorrisO *xorriso, int len, int width, int flag); 1873 1874 /* Command -paste_in */ 1875 /* @since 0.2.0 */ 1876 int Xorriso_option_paste_in(struct XorrisO *xorriso, char *iso_rr_path, 1877 char *disk_path, char *start, char *count, int flag); 1878 1879 /* Command -path_list , -quoted_path_list */ 1880 /* @param flag bit0= -quoted_path_list @since 0.3.0 1881 */ 1882 /* @since 0.1.0 */ 1883 int Xorriso_option_path_list(struct XorrisO *xorriso, char *adr, int flag); 1884 1885 /* Command -pathspecs */ 1886 /* @since 0.1.0 */ 1887 int Xorriso_option_pathspecs(struct XorrisO *xorriso, char *mode, int flag); 1888 1889 /* Command -pkt_output */ 1890 /* Note: If output is redirected by Xorriso_push_outlists() then mode "on" 1891 consolidates output in the result output list, not on stdout. 1892 */ 1893 /* @since 0.1.0 */ 1894 int Xorriso_option_pkt_output(struct XorrisO *xorriso, char *mode, int flag); 1895 1896 /* Command -preparer_id */ 1897 /* @since 0.6.2 */ 1898 int Xorriso_option_preparer_id(struct XorrisO *xorriso, char *name, int flag); 1899 1900 /* Command -print, -print_info , -print_mark */ 1901 /* @param flag bit0-1= output channel: 1902 0= result channel 1903 1= info channel @since 1.0.6 1904 2= mark channel @since 1.0.6 1905 */ 1906 /* @since 1.0.6 */ 1907 int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag); 1908 1909 /* Command -print_size 1910 @param flag bit0= report in mkisofs compatible form on real stdout 1911 */ 1912 /* @since 0.1.0 */ 1913 int Xorriso_option_print_size(struct XorrisO *xorriso, int flag); 1914 1915 /* Command -prog */ 1916 /* @since 0.1.0 */ 1917 int Xorriso_option_prog(struct XorrisO *xorriso, char *name, int flag); 1918 1919 /* Command -prompt */ 1920 /* @since 0.1.0 */ 1921 int Xorriso_option_prompt(struct XorrisO *xorriso, char *text, int flag); 1922 1923 /* Command -prog_help */ 1924 /* @since 0.1.0 */ 1925 int Xorriso_option_prog_help(struct XorrisO *xorriso, char *name, int flag); 1926 1927 /* Command -publisher */ 1928 /* @since 0.1.2 */ 1929 int Xorriso_option_publisher(struct XorrisO *xorriso, char *name, int flag); 1930 1931 /* Command -pvd_info */ 1932 /* @since 0.4.4 */ 1933 int Xorriso_option_pvd_info(struct XorrisO *xorriso, int flag); 1934 1935 /* Command -pwd alias -pwdi */ 1936 /* @since 0.1.0 */ 1937 int Xorriso_option_pwdi(struct XorrisO *xorriso, int flag); 1938 1939 /* Command -pwdx */ 1940 /* @since 0.1.0 */ 1941 int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag); 1942 1943 /* Command -read_fs */ 1944 /* @since 1.4.2 */ 1945 int Xorriso_option_read_fs(struct XorrisO *xorriso, char *mode, int flag); 1946 1947 /* Command -read_mkisofsrc */ 1948 /* @since 0.6.0 */ 1949 int Xorriso_option_read_mkisofsrc(struct XorrisO *xorriso, int flag); 1950 1951 /* Command -reassure "on"|"tree"|"off" */ 1952 /* @since 0.1.0 */ 1953 int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag); 1954 1955 /* Command -report_about */ 1956 /* @since 0.1.0 */ 1957 int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity, 1958 int flag); 1959 1960 /* Command -report_el_torito */ 1961 /* @since 1.3.8 */ 1962 int Xorriso_option_report_el_torito(struct XorrisO *xorriso, 1963 char *form, int flag); 1964 1965 /* Command -report_system_area */ 1966 /* @since 1.3.8 */ 1967 int Xorriso_option_report_system_area(struct XorrisO *xorriso, 1968 char *form, int flag); 1969 1970 /* Command -return_with */ 1971 /* @since 0.1.0 */ 1972 int Xorriso_option_return_with(struct XorrisO *xorriso, char *severity, 1973 int exit_value, int flag); 1974 1975 /* Command -rm alias -rmi , -rm_r alias -rm_ri , -rmdir alias -rmdiri */ 1976 /* @param flag bit0=recursive 1977 bit2= remove empty directory: rmdiri 1978 */ 1979 /* @since 0.1.0 */ 1980 int Xorriso_option_rmi(struct XorrisO *xorriso, int argc, char **argv, 1981 int *idx, int flag); 1982 1983 /* Command -rockridge "on"|"off" */ 1984 /* @since 1.2.4 */ 1985 int Xorriso_option_rockridge(struct XorrisO *xorriso, char *mode, int flag); 1986 1987 /* Command -rollback */ 1988 /* @param flag bit0= do not -reassure 1989 @return <=0 error , 1 success, 2 revoked by -reassure 1990 */ 1991 /* @since 0.1.0 */ 1992 int Xorriso_option_rollback(struct XorrisO *xorriso, int flag); 1993 1994 /* Command -rom_toc_scan */ 1995 /* @since 0.1.6 */ 1996 int Xorriso_option_rom_toc_scan(struct XorrisO *xorriso, char *mode, int flag); 1997 1998 /* Command -rr_reloc_dir */ 1999 /* @since 1.2.2 */ 2000 int Xorriso_option_rr_reloc_dir(struct XorrisO *xorriso, char *name, int flag); 2001 2002 /* Command -scdbackup_tag */ 2003 /* @since 0.4.4 */ 2004 int Xorriso_option_scdbackup_tag(struct XorrisO *xorriso, char *list_path, 2005 char *record_name, int flag); 2006 2007 /* Command -scsi_dev_family */ 2008 /* @since 1.4.4 */ 2009 int Xorriso_option_scsi_dev_family(struct XorrisO *xorriso, char *mode, 2010 int flag); 2011 2012 /* Command -scsi_log */ 2013 /* @since 0.5.0 */ 2014 int Xorriso_option_scsi_log(struct XorrisO *xorriso, char *mode, int flag); 2015 2016 /* Command -session_log */ 2017 /* @since 0.1.4 */ 2018 int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag); 2019 2020 /* Command -setfacl_list alias -setfacl_listi */ 2021 /* @since 0.3.4 */ 2022 int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *disk_path, 2023 int flag); 2024 2025 /* Command -setfacl alias -setfacli , -setfacl_r alias -setfacl_ri */ 2026 /* @param flag bit0=recursive -setfacl_r */ 2027 /* @since 0.3.4 */ 2028 int Xorriso_option_setfacli(struct XorrisO *xorriso, char *acl_text, 2029 int argc, char **argv, int *idx, int flag); 2030 2031 /* Command -setfattr alias -setfattri, -setfattr_r alias -setfattr_ri */ 2032 /* @param flag bit0=recursive -setfattr_r */ 2033 /* @since 0.3.4 */ 2034 int Xorriso_option_setfattri(struct XorrisO *xorriso, char *name, char *value, 2035 int argc, char **argv, int *idx, int flag); 2036 2037 /* Command -setfattr_list alias -setfattr_listi */ 2038 /* @since 0.3.4 */ 2039 int Xorriso_option_setfattr_listi(struct XorrisO *xorriso, char *path, 2040 int flag); 2041 2042 /* Command -set_filter , -set_filter_r , -show_stream , -show_stream_r */ 2043 /* @param flag bit0=recursive -set_filter_r 2044 bit1= do not reset pacifier, no final pacifier message 2045 bit2= -show_stream rather than -set_filter 2046 */ 2047 /* @since 0.3.8 */ 2048 int Xorriso_option_set_filter(struct XorrisO *xorriso, char *name, 2049 int argc, char **argv, int *idx, int flag); 2050 2051 /* Option -sh_style_result */ 2052 /* @since 1.3.2 */ 2053 int Xorriso_option_sh_style_result(struct XorrisO *xorriso, char *mode, 2054 int flag); 2055 2056 /* Command -signal_handling */ 2057 /* @param flag bit0= do not yet install the eventual handler 2058 @since 1.1.0 2059 */ 2060 int Xorriso_option_signal_handling(struct XorrisO *xorriso, char *mode, 2061 int flag); 2062 2063 /* Command -sleep */ 2064 /* @since 1.1.8 */ 2065 int Xorriso_option_sleep(struct XorrisO *xorriso, char *duration, int flag); 2066 2067 /* Command -speed , -read_speed */ 2068 /* @param flag bit0= @since 1.3.4 2069 -read_speed rather than -speed */ 2070 /* @since 0.1.0 */ 2071 int Xorriso_option_speed(struct XorrisO *xorriso, char *speed, int flag); 2072 2073 /* Command -split_size */ 2074 /* @since 0.1.4 */ 2075 int Xorriso_option_split_size(struct XorrisO *xorriso, char *s, int flag); 2076 2077 /* Command -status */ 2078 /* @since 0.1.0 */ 2079 int Xorriso_option_status(struct XorrisO *xorriso, char *mode, int flag); 2080 2081 /* Command -status_history_max */ 2082 /* @since 0.1.0 */ 2083 int Xorriso_option_status_history_max(struct XorrisO *xorriso, int num1, 2084 int flag); 2085 2086 /* Command -stdio_sync "on"|"off"|"end"|size */ 2087 /* @since 0.4.6 */ 2088 int Xorriso_option_stdio_sync(struct XorrisO *xorriso, char *rythm, int flag); 2089 2090 /* Command -stream_recording */ 2091 /* @since 0.1.8 */ 2092 int Xorriso_option_stream_recording(struct XorrisO *xorriso, char *mode, 2093 int flag); 2094 2095 /* Command -system_id */ 2096 /* @since 0.4.4 */ 2097 int Xorriso_option_system_id(struct XorrisO *xorriso, char *name, int flag); 2098 2099 /* Command -tell_media_space */ 2100 /* @since 0.1.0 */ 2101 int Xorriso_option_tell_media_space(struct XorrisO *xorriso, int flag); 2102 2103 /* Command -temp_mem_limit */ 2104 /* @since 0.1.0 */ 2105 int Xorriso_option_temp_mem_limit(struct XorrisO *xorriso, char *size, 2106 int flag); 2107 2108 /* Command -toc */ 2109 /* @param flag bit0= short report form as with -dev, no table-of-content 2110 */ 2111 /* @since 0.1.0 */ 2112 int Xorriso_option_toc(struct XorrisO *xorriso, int flag); 2113 2114 /* Command -toc_of */ 2115 /* @since 1.2.6 */ 2116 int Xorriso_option_toc_of(struct XorrisO *xorriso, char *which, int flag); 2117 2118 /* Command -uid */ 2119 /* @since 0.1.0 */ 2120 int Xorriso_option_uid(struct XorrisO *xorriso, char *uid, int flag); 2121 2122 /* Command -unregister_filter */ 2123 /* @since 0.3.8 */ 2124 int Xorriso_option_unregister_filter(struct XorrisO *xorriso, char *name, 2125 int flag); 2126 2127 /* Command -update and -update_r 2128 @param flag bit0= issue summary message 2129 bit1= do not reset pacifier, no final pacifier message 2130 bit2= do not issue pacifier messages at all 2131 bit3= recursive: -update_r 2132 */ 2133 /* @since 0.1.2 */ 2134 int Xorriso_option_update(struct XorrisO *xorriso, char *disk_path, 2135 char *iso_path, int flag); 2136 2137 /* Command -use_readline */ 2138 /* @since 0.1.0 */ 2139 int Xorriso_option_use_readline(struct XorrisO *xorriso, char *mode, int flag); 2140 2141 /* Command -use_immed_bit */ 2142 /* @since 1.4.6 */ 2143 int Xorriso_option_use_immed_bit(struct XorrisO *xorriso, char *mode, 2144 int flag); 2145 2146 /* Command -version */ 2147 /* @since 0.1.0 */ 2148 int Xorriso_option_version(struct XorrisO *xorriso, int flag); 2149 2150 /* Command -volid */ 2151 /* @param flag bit0= do not warn of problematic volid 2152 */ 2153 int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag); 2154 2155 /* Command -volset_id */ 2156 /* @since 0.4.4 */ 2157 int Xorriso_option_volset_id(struct XorrisO *xorriso, char *name, int flag); 2158 2159 /* Command -volume_date */ 2160 /* @since 0.5.4 */ 2161 int Xorriso_option_volume_date(struct XorrisO *xorriso, 2162 char *time_type, char *timestring, int flag); 2163 2164 /* Command -write_type */ 2165 /* @since 1.2.4 */ 2166 int Xorriso_option_write_type(struct XorrisO *xorriso, char *mode, int flag); 2167 2168 /* There is no Xorriso_option_x() because -x has an effect only in 2169 Xorriso_prescan_args(). Use the flag bits of Xorriso_interpreter() if 2170 you want to impose command sorting on your own. 2171 @since 1.2.2 2172 */ 2173 2174 /* Command -xattr "on"|"off" */ 2175 /* @since 0.3.4 */ 2176 int Xorriso_option_xattr(struct XorrisO *xorriso, char *mode, int flag); 2177 2178 /* Command -zisofs */ 2179 /* @since 0.3.8 */ 2180 int Xorriso_option_zisofs(struct XorrisO *xorriso, char *mode, int flag); 2181 2182 #ifdef __cplusplus 2183 } /* extern "C" */ 2184 #endif 2185 2186 #endif /* Xorriso_includeD */ 2187 2188 2189