~ubuntu-branches/ubuntu/precise/libisoburn/precise

« back to all changes in this revision

Viewing changes to xorriso/opts_p_z.c

  • Committer: Package Import Robot
  • Author(s): George Danchev
  • Date: 2011-10-02 09:37:34 UTC
  • mfrom: (9.1.17 sid)
  • Revision ID: package-import@ubuntu.com-20111002093734-auibchjeaecfhofu
Tags: 1.1.6-2
Fix funny typo in xorriso binary package description.
Thanks to Davide Prina (Closes: #643993).

Show diffs side-by-side

added added

removed removed

Lines of Context:
452
452
 
453
453
 
454
454
/* Option -report_about */
455
 
int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity,
 
455
int Xorriso_option_report_about(struct XorrisO *xorriso, char *in_severity,
456
456
                                int flag)
457
457
{
458
458
 int ret, sev;
 
459
 char severity[20], *official;
459
460
 
 
461
 Xorriso__to_upper(in_severity, severity, (int) sizeof(severity), 0);
460
462
 ret= Xorriso__text_to_sev(severity, &sev, 0);
461
463
 if(ret<=0) {
462
464
   sprintf(xorriso->info_text, "-report_about: Not a known severity name : ");
463
 
   Text_shellsafe(severity, xorriso->info_text, 1);
 
465
   Text_shellsafe(in_severity, xorriso->info_text, 1);
464
466
   Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
465
467
   return(ret);
466
468
 }
467
 
 if(Sfile_str(xorriso->report_about_text,severity,0)<=0)
 
469
 ret= Xorriso__sev_to_text(sev, &official, 0);
 
470
 if(ret <= 0)
 
471
   official= severity;
 
472
 if(Sfile_str(xorriso->report_about_text, official, 0) <= 0)
468
473
   return(-1);
469
474
 xorriso->report_about_severity= sev;
470
475
 return(1);
472
477
 
473
478
 
474
479
/* Option -return_with */
475
 
int Xorriso_option_return_with(struct XorrisO *xorriso, char *severity,
 
480
int Xorriso_option_return_with(struct XorrisO *xorriso, char *in_severity,
476
481
                               int exit_value, int flag)
477
482
{
478
483
 int ret, sev;
 
484
 char severity[20], *official;
479
485
 
 
486
 Xorriso__to_upper(in_severity, severity, (int) sizeof(severity), 0);
480
487
 ret= Xorriso__text_to_sev(severity, &sev, 0);
481
488
 if(ret<=0) {
482
489
   sprintf(xorriso->info_text,
483
490
           "-return_with: Not a known severity name : ");
484
 
   Text_shellsafe(severity, xorriso->info_text, 1);
 
491
   Text_shellsafe(in_severity, xorriso->info_text, 1);
485
492
   Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
486
493
   return(ret);
487
494
 }
 
495
 ret= Xorriso__sev_to_text(sev, &official, 0);
 
496
 if(ret <= 0)
 
497
   official= severity;
488
498
 if(exit_value && (exit_value < 32 || exit_value > 63)) {
489
499
   sprintf(xorriso->info_text,
490
500
           "-return_with: Not an allowed exit_value. Use 0, or 32 to 63.");
491
501
   Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
492
502
   return(0);
493
503
 }
494
 
 if(Sfile_str(xorriso->return_with_text,severity,0)<=0)
 
504
 if(Sfile_str(xorriso->return_with_text, official, 0) <= 0)
495
505
   return(-1);
496
506
 xorriso->return_with_severity= sev;
497
507
 xorriso->return_with_value= exit_value;