1 |
/* fsys_xfs.c - an implementation for the SGI XFS file system */ |
/* fsys_xfs.c - an implementation for the SGI XFS file system */ |
2 |
/* |
/* |
3 |
* GRUB -- GRand Unified Bootloader |
* GRUB -- GRand Unified Bootloader |
4 |
* Copyright (C) 2001 Free Software Foundation, Inc. |
* Copyright (C) 2001,2002 Free Software Foundation, Inc. |
5 |
* |
* |
6 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
499 |
endofcur = (offset + xadlen) << xfs.blklog; |
endofcur = (offset + xadlen) << xfs.blklog; |
500 |
toread = (endofcur >= endpos) |
toread = (endofcur >= endpos) |
501 |
? len : (endofcur - filepos); |
? len : (endofcur - filepos); |
502 |
#ifndef STAGE1_5 |
|
503 |
disk_read_func = disk_read_hook; |
disk_read_func = disk_read_hook; |
|
#endif /* STAGE1_5 */ |
|
504 |
devread (fsb2daddr (xad->start), |
devread (fsb2daddr (xad->start), |
505 |
filepos - (offset << xfs.blklog), toread, buf); |
filepos - (offset << xfs.blklog), toread, buf); |
|
#ifndef STAGE1_5 |
|
506 |
disk_read_func = NULL; |
disk_read_func = NULL; |
507 |
#endif /* STAGE1_5 */ |
|
508 |
buf += toread; |
buf += toread; |
509 |
len -= toread; |
len -= toread; |
510 |
filepos += toread; |
filepos += toread; |