viced/callback.c: Don't ignore dump read errors 05/13505/2
authorJeffrey Hutzelman <jhutz@cmu.edu>
Wed, 19 Jun 2013 03:12:46 +0000 (23:12 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 1 Mar 2019 15:15:10 +0000 (10:15 -0500)
commitcb63e52e63803a10f0bbc675f611645617a9e7f5
tree9b9a08d4dc65db331fed67a7ba77889cf73283bd
parent8fcc8da4c991fb5f032cc27ae0b3efa1f40e6fc0
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.

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>
(cherry picked from commit c854cb31ff2b1ab79de18b5ab926bf2ea2b05663)

Change-Id: Ieffa11c6049eceb23bc6bf9169454529df3ef766
Reviewed-on: https://gerrit.openafs.org/13505
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/viced/callback.c