The attached patch cleans up the error handling in mkyaffsimage a little bit. Some functions return an error value, others directly set the global variable "error". The patch converts all usage to the function error return model. In process_directory(), added a printf() of the name of the unhandled object to the "we don't handle this type" error message. In process_directory(), stop scanning as soon as an error occurs. (This may be a controversial change, but it seemed good to me to make the failure obvious, and not hidden in the output of files that were properly processed.) -Frank -- Frank Rowand MontaVista Software, Inc