commit 603468ea3430965b9ecd555406a8ae9ae597bf6d
Author: Tomohiro Kusumi <[email protected]>
Date: Mon Sep 28 21:16:59 2015 +0900
usr.bin/undo: Fix error handling
As mentioned in the previous commit, collect_history() should
set error variable to errno when open(2) failed.
This commit does this by adding a new wrapper function for
collect_history() and renaming the existing collect_history()
to __collect_history(). The renamed collect_history() takes
const char* instead of fd and updates error if open(2) fails.
This is at least better although the error message changed
by the previous commit is still there without strerror().
Summary of changes:
usr.bin/undo/undo.c | 43 ++++++++++++++++++++++++-------------------
1 file changed, 24 insertions(+), 19 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/603468ea3430965b9ecd555406a8ae9ae597bf6d
--
DragonFly BSD source repository