rem: if (rdb->id == RDB_DISK_ID && rdb->summed_longs == sizeof(rigid_disk_block) / sizeof(uint32)) {  uint32 *longs = (uint32 *)buffer; uint32 sum = 0; for (uint32 i = 0; i < rdb->summed_longs; i++) sum += longs[i];  if (sum != 0) { TRACE(("search_rdb: check sum is incorrect!\n")); return false; }
add: if (rdb->ID() == RDB_DISK_ID && validate_check_sum<rigid_disk_block>(rdb)) {
context: search_rdb(int fd, rigid_disk_block **_rdb){	TRACE(("search_rdb()\n"));	for (int32 sector = 0; sector < RDB_LOCATION_LIMIT; sector++) {		uint8 buffer[512];		ssize_t bytesRead = read_pos(fd, sector * 512, buffer, sizeof(buffer));		if (bytesRead < (ssize_t)sizeof(buffer)) {			TRACE(("search_rdb: read error: %ld\n", bytesRead));			return false;		}		rigid_disk_block *rdb = (rigid_disk_block *)buffer;		if (rdb->id == RDB_DISK_ID			&& rdb->summed_longs == sizeof(rigid_disk_block) / sizeof(uint32)) {			// check checksum			uint32 *longs = (uint32 *)buffer;			uint32 sum = 0;			for (uint32 i = 0; i < rdb->summed_longs; i++)				sum += longs[i];			if (sum != 0) {				TRACE(("search_rdb: check sum is incorrect!\n"));				return false;			}			// copy the RDB to a new piece of memory			rdb = new rigid_disk_block();			memcpy(rdb, buffer, sizeof(rigid_disk_block));			*_rdb = rdb;			return true;		}	}	return false;}