[Libguestfs] [PATCH 3/3] Add and use an helper error function