1 |
/* fsys_jfs.c - an implementation for the IBM JFS file system */ |
/* fsys_jfs.c - an implementation for the IBM JFS 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 |
243 |
endofcur = (offset + xadlen) << jfs.l2bsize; |
endofcur = (offset + xadlen) << jfs.l2bsize; |
244 |
toread = (endofcur >= endpos) |
toread = (endofcur >= endpos) |
245 |
? len : (endofcur - filepos); |
? len : (endofcur - filepos); |
246 |
#ifndef STAGE1_5 |
|
247 |
disk_read_func = disk_read_hook; |
disk_read_func = disk_read_hook; |
|
#endif /* STAGE1_5 */ |
|
248 |
devread (addressXAD (xad) << jfs.bdlog, |
devread (addressXAD (xad) << jfs.bdlog, |
249 |
filepos - (offset << jfs.l2bsize), toread, buf); |
filepos - (offset << jfs.l2bsize), toread, buf); |
|
#ifndef STAGE1_5 |
|
250 |
disk_read_func = NULL; |
disk_read_func = NULL; |
251 |
#endif /* STAGE1_5 */ |
|
252 |
buf += toread; |
buf += toread; |
253 |
len -= toread; |
len -= toread; |
254 |
filepos += toread; |
filepos += toread; |