kernels/linux-2.4.0/scripts/cramfs/mkcramfs.c
/*
 * Traverse the entry tree, writing data for every item that has
 * non-null entry->compressed (i.e. every symlink and non-empty
 * regfile).
 */
Traverse the entry tree, writing data for every item that has
non-null entry->compressed .
Traverse the entry tree writing data for every item that has non - null entry - > compressed .
static unsigned int write_data(struct entry *entry, char *base, unsigned int offset)
{
	do {
		if (entry->uncompressed) {
                        if(entry->same) {
                                set_data_offset(entry, base, entry->same->offset);
                                entry->offset=entry->same->offset;
                        } else {
                                set_data_offset(entry, base, offset);
                                entry->offset=offset;
                                offset = do_compress(base, offset, entry->name, entry->uncompressed, entry->size);
                        }
		}
		else if (entry->child)
			offset = write_data(entry->child, base, offset);
                entry=entry->next;
	} while (entry);
	return offset;
}
static unsigned int write_data ( struct entry * entry , char * base , unsigned int offset ) { do { if ( entry -> uncompressed ) { if ( entry -> same ) { set_data_offset ( entry , base , entry -> same -> offset ) ; entry -> offset = entry -> same -> offset ; } else { set_data_offset ( entry , base , offset ) ; entry -> offset = offset ; offset = do_compress ( base , offset , entry -> name , entry -> uncompressed , entry -> size ) ; } } else if ( entry -> child ) offset = write_data ( entry -> child , base , offset ) ; entry = entry -> next ; } while ( entry ) ; return offset ; }
Traverse the entry tree, writing data for every item that has
 non-null entry->compressed (i.e.
Traverse the entry tree writing data for every item that has non - null entry - > compressed ( i . e .