group/pintos/src/lib/kernel/bitmap.c
/* Reads B from FILE.  Returns true if successful, false
   otherwise. */
Reads B from FILE.  Returns true if successful, false
otherwise.
Reads B from FILE . Returns true if successful false otherwise .
bool
bitmap_read (struct bitmap *b, struct file *file)
{
  bool success = true;
  if (b->bit_cnt > 0)
    {
      off_t size = byte_cnt (b->bit_cnt);
      success = file_read_at (file, b->bits, size, 0) == size;
      b->bits[elem_cnt (b->bit_cnt) - 1] &= last_mask (b);
    }
  return success;
}
bool bitmap_read ( struct bitmap * b , struct file * file ) { bool success = true ; if ( b -> bit_cnt > 0 ) { off_t size = byte_cnt ( b -> bit_cnt ) ; success = file_read_at ( file , b -> bits , size , 0 ) == size ; b -> bits [ elem_cnt ( b -> bit_cnt ) - 1 ] &= last_mask ( b ) ; } return success ; }
Reads B from FILE.
Reads B from FILE .