]> git.sur5r.net Git - bacula/bacula/commit
Fix error printing in acl and xattr code.
authorMarco van Wieringen <mvw@planets.elm.net>
Tue, 31 Jan 2012 12:52:31 +0000 (13:52 +0100)
committerMarco van Wieringen <mvw@planets.elm.net>
Tue, 31 Jan 2012 12:57:46 +0000 (13:57 +0100)
commit6cfa8c6be88f3141c498c12438c2c4e2d85036f0
tree0cbafac51110eb8fa0ac6927e2f85bed44048db1
parent8561ce5fc3dd85ea2342c747107b1862cae642b8
Fix error printing in acl and xattr code.

The errno gets saved on an instantiate of the berrno class so
we should instantiate the class after the actual errno is set
and not as we used to do at the start of the function. Then
errno is always 0 and that also explains that on error it
was always printing Unknown error 0 in the error printed.
Moved all berrno into either an if block or an block within
a switch (including additional brackets so it a local code
block in which we can instantiate a new berrno class.
bacula/src/filed/acl.c
bacula/src/filed/xattr.c