-
- if (( cc = adf_pread( &ad->ad_hf, buf, buflen, r_off )) < 0 ) {
- return( -1 );
- }
- /*
- * We've just read in bytes from the disk that we read earlier
- * into ad_data. If we're going to write this buffer out later,
- * we need to update ad_data.
- * FIXME : always false?
- */
- if (r_off < ad_getentryoff(ad, ADEID_RFORK)) {
- if ( ad->ad_hf.adf_flags & O_RDWR ) {
- memcpy(buf, ad->ad_data + r_off,
- MIN(sizeof( ad->ad_data ) - r_off, cc));
- } else {
- memcpy(ad->ad_data + r_off, buf,
- MIN(sizeof( ad->ad_data ) - r_off, cc));
- }
- }
+
+ if (( cc = adf_pread( &ad->ad_resource_fork, buf, buflen, r_off )) < 0 ) {
+ return( -1 );
+ }
+ /*
+ * We've just read in bytes from the disk that we read earlier
+ * into ad_data. If we're going to write this buffer out later,
+ * we need to update ad_data.
+ * FIXME : always false?
+ */
+ if (r_off < ad_getentryoff(ad, ADEID_RFORK)) {
+ if ( ad->ad_resource_fork.adf_flags & O_RDWR ) {
+ memcpy(buf, ad->ad_data + r_off,
+ MIN(sizeof( ad->ad_data ) - r_off, cc));
+ } else {
+ memcpy(ad->ad_data + r_off, buf,
+ MIN(sizeof( ad->ad_data ) - r_off, cc));
+ }
+ }