[darwinbuild-changes] [295] trunk/darwinup/Digest.cpp

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 4 02:02:25 PDT 2006


Revision: 295
          http://trac.macosforge.org/projects/darwinbuild/changeset/295
Author:   kevin
Date:     2006-10-04 02:02:25 -0700 (Wed, 04 Oct 2006)

Log Message:
-----------
- fall back to checksumming entire file if unprebind fails

Modified Paths:
--------------
    trunk/darwinup/Digest.cpp

Modified: trunk/darwinup/Digest.cpp
===================================================================
--- trunk/darwinup/Digest.cpp	2005-11-15 06:42:38 UTC (rev 294)
+++ trunk/darwinup/Digest.cpp	2006-10-04 09:02:25 UTC (rev 295)
@@ -176,7 +176,10 @@
 		if (ret == REDO_PREBINDING_SUCCESS && block != NULL) {
 			digest(SHA1Digest::m_md, (uint8_t*)block, blocklen);
 		} else {
-			fprintf(stderr, "%s:%d: unexpected unprebind result %d: %s\n", __FILE__, __LINE__, ret, error);
+			//fprintf(stderr, "%s:%d: unexpected unprebind result: %s: %s (%d)\n", __FILE__, __LINE__, filename, error, ret);
+			int fd = open(filename, O_RDONLY);
+			digest(SHA1Digest::m_md, fd);
+			close(fd);
 		}
 		if (block != NULL) {
 			kern_return_t ret = vm_deallocate(mach_task_self(), (vm_address_t)block, (vm_size_t)blocklen);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/7388432f/attachment.html


More information about the darwinbuild-changes mailing list