~ubuntu-branches/ubuntu/karmic/openafs/karmic-updates

« back to all changes in this revision

Viewing changes to src/afs/VNOPS/afs_vnop_read.c

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2008-09-22 19:07:02 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080922190702-59m13d7kn6gkw32d
Tags: 1.4.7.dfsg1-6
* Apply upstream patch to free /proc entries in the correct order.
  Thanks, Marc Dionne.  (Closes: #493914)
* Apply upstream deltas to support 2.6.27 kernels and to stop using
  COMMON_KERN_CFLAGS for all 2.6 kernels uniformly, which fixes
  problems on amd64 with newer kernels.  Thanks, Björn Torkelsson.
  (LP: #267504)
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #493120)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include "afs/param.h"
20
20
 
21
21
RCSID
22
 
    ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.26.2.4 2006/02/21 04:47:08 shadow Exp $");
 
22
    ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.26.2.6 2008/04/27 03:54:27 shadow Exp $");
23
23
 
24
24
#include "afs/sysincludes.h"    /* Standard vendor system headers */
25
25
#include "afsincludes.h"        /* Afs-based standard headers */
117
117
     * Locks held:
118
118
     * avc->lock(R)
119
119
     */
120
 
    while (totalLength > 0) {
 
120
    if (filePos >= avc->m.Length) {
 
121
        if (len > AFS_ZEROS)
 
122
            len = sizeof(afs_zeros);    /* and in 0 buffer */
 
123
        len = 0;
 
124
#ifdef AFS_DARWIN80_ENV
 
125
        trimlen = len;
 
126
        tuiop = afsio_darwin_partialcopy(auio, trimlen);
 
127
#else
 
128
        afsio_copy(auio, &tuio, tvec);
 
129
        trimlen = len;
 
130
        afsio_trim(&tuio, trimlen);
 
131
#endif
 
132
        AFS_UIOMOVE(afs_zeros, trimlen, UIO_READ, tuiop, code);
 
133
    }
 
134
 
 
135
    while (avc->m.Length > 0 && totalLength > 0) {
121
136
        /* read all of the cached info */
122
137
        if (filePos >= avc->m.Length)
123
138
            break;              /* all done */
536
551
    }
537
552
#endif
538
553
 
539
 
    while (totalLength > 0) {
 
554
    if (filePos >= avc->m.Length) {
 
555
        if (len > AFS_ZEROS)
 
556
            len = sizeof(afs_zeros);    /* and in 0 buffer */
 
557
        len = 0;
 
558
#ifdef AFS_DARWIN80_ENV
 
559
        trimlen = len;
 
560
        tuiop = afsio_darwin_partialcopy(auio, trimlen);
 
561
#else
 
562
        afsio_copy(auio, &tuio, tvec);
 
563
        trimlen = len;
 
564
        afsio_trim(&tuio, trimlen);
 
565
#endif
 
566
        AFS_UIOMOVE(afs_zeros, trimlen, UIO_READ, tuiop, code);
 
567
    }
 
568
 
 
569
    while (avc->m.Length > 0 && totalLength > 0) {
540
570
        /* read all of the cached info */
541
571
        if (filePos >= avc->m.Length)
542
572
            break;              /* all done */