/*
* TODO: If offset is partially into the cluster already,
* then n does not necessarily have to be larger than cluster_size_bytes for the read to overrun into the next cluster.
* This code incorrectly assumes that we're starting a read from the beginning of a cluster.
*/
int bytes_to_read = n > cluster_size_bytes ? cluster_size_bytes : n;
In
fat16_read_internalin fat16.c.