Changeset 12572
- Timestamp:
- Mar 23, 2007, 1:25:02 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/types/psMetadata.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadata.c
r12542 r12572 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.15 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2007-03-2 2 15:34:04$14 * @version $Revision: 1.158 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2007-03-23 23:25:02 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 463 463 psMetadataItem *newItem = psMetadataItemCopy(inItem); // Copied item 464 464 if (!psMetadataAddItem(out, newItem, PS_LIST_TAIL, flag)) { 465 psError(PS_ERR_UNKNOWN, false, "Error copying %s (%s) in the metadata\n", 466 inItem->name, inItem->comment);465 psError(PS_ERR_UNKNOWN, false, "Error copying %s (%s) in the metadata\n", 466 inItem->name, inItem->comment); 467 467 if (outAlloced) { 468 468 psFree(out); … … 488 488 // if any entries in 'in' a) do not exist in 'out' or b) have a different type 489 489 bool p_psMetadataUpdate(const char *file, 490 unsigned int lineno,491 const char *func,492 psMetadata *out,493 const psMetadata *in)490 unsigned int lineno, 491 const char *func, 492 psMetadata *out, 493 const psMetadata *in) 494 494 { 495 495 PS_ASSERT_METADATA_NON_NULL(in, NULL); … … 513 513 psMetadataItem *newItem = psMetadataItemCopy(inItem); // Copied item 514 514 if (!psMetadataAddItem(out, newItem, PS_LIST_TAIL, flag)) { 515 fprintf (stderr, "Error copying %s\n", inItem->name);516 result = false;515 fprintf (stderr, "Error copying %s\n", inItem->name); 516 result = false; 517 517 } 518 518 psFree(newItem); // Drop reference … … 521 521 522 522 if (!result) { 523 psError(PS_ERR_UNKNOWN, false, "failed to update metadata\n");524 } 523 psError(PS_ERR_UNKNOWN, false, "failed to update metadata\n"); 524 } 525 525 return result; 526 526 } … … 614 614 // replace entry instead of creating a duplicate entry. 615 615 616 if ((flags & PS_META_REQUIRE_TYPE) && (existingEntry->type != item->type)) {617 psError (PS_ERR_UNKNOWN, true, _("existing item does not match type for item requiring matching type"));618 return false;619 }616 if ((flags & PS_META_REQUIRE_TYPE) && (existingEntry->type != item->type)) { 617 psError (PS_ERR_UNKNOWN, true, _("Existing item %s does not match type (%x) for item requiring matching type (%x)"), key, existingEntry->type, item->type); 618 return false; 619 } 620 620 621 621 // remove the existing entry from metadata … … 647 647 } else { 648 648 // OK, this is a new item. 649 if (flags & PS_META_REQUIRE_ENTRY) { 650 psError (PS_ERR_UNKNOWN, true, _("no matching item found for item requiring existing entry")); 651 return false; 652 } 649 if (flags & PS_META_REQUIRE_ENTRY) { 650 psError (PS_ERR_UNKNOWN, true, _("No matching item found for item requiring existing entry (%s)"), 651 key); 652 return false; 653 } 653 654 654 655 // Node doesn't exist - Add new metadata item to metadata collection's hash
Note:
See TracChangeset
for help on using the changeset viewer.
