mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
STABLE14-vnop-attrs-fix-20051023
FIXES 22568 fix code broken in mac merge (cherry picked from commit e6e293bb899cb027648908d23848ce13901a7503)
This commit is contained in:
parent
5dbd32c49a
commit
e2a22edd2a
@ -158,20 +158,20 @@ afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs)
|
||||
* Below return 0 (and not 1) blocks if the file is zero length. This conforms
|
||||
* better with the other filesystems that do return 0.
|
||||
*/
|
||||
#ifdef AFS_HPUX_ENV
|
||||
attrs->va_blocks = (attrs->va_size ? ((attrs->va_size + 1023) >> 10) : 0);
|
||||
#elif defined(AFS_SGI_ENV)
|
||||
attrs->va_blocks = BTOBB(attrs->va_size);
|
||||
#elif defined(AFS_XBSD_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV)
|
||||
#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
|
||||
attrs->va_bytes = (attrs->va_size ? (attrs->va_size + 1023) : 1024);
|
||||
#ifdef va_bytes_rsv
|
||||
attrs->va_bytes_rsv = -1;
|
||||
#endif
|
||||
#else
|
||||
attrs->va_blocks =
|
||||
(attrs->va_size ? ((attrs->va_size + 1023) >> 10) << 1 : 0);
|
||||
#elif defined(AFS_HPUX_ENV)
|
||||
attrs->va_blocks = (attrs->va_size ? ((attrs->va_size + 1023)>>10) : 0);
|
||||
#elif defined(AFS_SGI_ENV)
|
||||
attrs->va_blocks = BTOBB(attrs->va_size);
|
||||
#elif defined(AFS_SUN5_ENV)
|
||||
attrs->va_nblocks = (attrs->va_size ? ((attrs->va_size + 1023)>>10)<<1:0);
|
||||
#else /* everything else */
|
||||
attrs->va_blocks = (attrs->va_size ? ((attrs->va_size + 1023)>>10)<<1:0);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user