~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to kern/file.c

ImportĀ upstreamĀ versionĀ 1.97~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
{
113
113
  grub_ssize_t res;
114
114
 
 
115
  if (file->offset > file->size)
 
116
    {
 
117
      grub_error (GRUB_ERR_OUT_OF_RANGE,
 
118
                  "Attempt to read past the end of file.");
 
119
      return -1;
 
120
    }
 
121
 
115
122
  if (len == 0 || len > file->size - file->offset)
116
123
    len = file->size - file->offset;
117
124