viced/callback.c: Don't ignore dump read errors
authorJeffrey Hutzelman <jhutz@cmu.edu>
Wed, 19 Jun 2013 03:12:46 +0000 (23:12 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 12 Jul 2013 15:11:35 +0000 (08:11 -0700)
commitc854cb31ff2b1ab79de18b5ab926bf2ea2b05663
treee0ddf46ecc18cc26c7ea73f3a7a5a7fc8ccc5350
parent8ecf7bde78272efc11460f783203afa56cf5c0dc
viced/callback.c: Don't ignore dump read errors

When reading a callback state dump, check the return values from
read(2) instead of ignoring them.  This adds a new static function,
ReadBytes(), which handles reading a requested number of bytes from a
file and bailing if there is an error.

Change-Id: Ib06d96888b4e6de0a377c8c6503147f9e44960e5
Reviewed-on: http://gerrit.openafs.org/9989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/viced/callback.c