Changeset 12 for trunk/pbs_drmaa/submit.c
- Timestamp:
- 04/20/11 17:20:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_drmaa/submit.c
- Property svn:keywords set to Id
r10 r12 1 /* $Id : submit.c 386 2011-01-06 18:13:33Z mamonski$ */1 /* $Id$ */ 2 2 /* 3 3 * FedStage DRMAA for PBS Pro … … 46 46 __attribute__ ((unused)) 47 47 # endif 48 = "$Id : submit.c 386 2011-01-06 18:13:33Z mamonski$";48 = "$Id$"; 49 49 #endif 50 50 … … 546 546 else 547 547 { 548 fsd_exc_raise_fmt(FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE, "Invalid native specification: %s (Invalid resource specification: %s)", resources, arg); 549 548 fsd_exc_raise_fmt(FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE, "Invalid native specification: %s (Invalid resource specification: %s)", resources, arg); 550 549 } 551 550 } … … 569 568 TRY 570 569 { 571 for (arg = strtok_r(add_attr_copy, " ,", &ctxt); arg; arg = strtok_r(NULL, ":",&ctxt) )570 for (arg = strtok_r(add_attr_copy, ";", &ctxt); arg; arg = strtok_r(NULL, ";",&ctxt) ) 572 571 { 573 572 name = fsd_strdup(strtok_r(arg, "=", &ctxt2)); … … 606 605 607 606 TRY 608 {607 { 609 608 for (arg = strtok_r(native_spec_copy, " \t", &ctxt); arg; arg = strtok_r(NULL, " \t",&ctxt) ) { 610 if (!opt) { 611 if ( (arg[0] != '-') || ((strlen(arg) != 2) && arg[2] != ' ' && arg[1] !='-' ) ) 609 if (!opt) 610 { 611 if ( (arg[0] != '-') || (strlen(arg) != 2) ) 612 612 fsd_exc_raise_fmt(FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE, 613 "Invalid native specification: %s", 614 native_specification); 615 if(arg[1] == '-') { 616 parse_additional_attr(pbs_attr, arg+2); 613 "Invalid native specification: -o(ption) expected (arg=%s native=%s).", 614 arg, native_specification); 615 616 case 'h' : 617 pbs_attr->set_attr( pbs_attr, "Hold_Types" , arg ); 618 break; 619 620 opt = arg[1]; 621 622 /* handle NO-arg options */ 623 624 switch (opt) { 625 case 'h' : 626 pbs_attr->set_attr( pbs_attr, "Hold_Types" , "u" ); 627 break; 628 default : 629 continue; /*no NO-ARG option */ 617 630 } 618 else { 619 opt = arg[1];620 621 622 } else{631 632 opt = 0; 633 } 634 else 635 { 623 636 switch (opt) { 624 637 … … 644 657 pbs_attr->set_attr( pbs_attr, "Execution_Time" , arg ); 645 658 break; 646 case 'h' :647 pbs_attr->set_attr( pbs_attr, "Hold_Types" , arg );648 break;649 659 case 'A' : 650 660 pbs_attr->set_attr( pbs_attr, "Account_Name" , arg ); … … 672 682 break; 673 683 case 'v' : 674 case 'V' :675 684 pbs_attr->set_attr( pbs_attr, "Variable_List" , arg ); 676 685 break; … … 687 696 native_specification, opt); 688 697 } 689 690 698 opt = 0; 691 699 }
Note: See TracChangeset
for help on using the changeset viewer.