9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek Jan Cholasta <jcholast@redhat.com>
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek Copyright (C) 2012 Red Hat
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek This program is free software; you can redistribute it and/or modify
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek it under the terms of the GNU General Public License as published by
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek the Free Software Foundation; either version 3 of the License, or
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek (at your option) any later version.
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek This program is distributed in the hope that it will be useful,
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek but WITHOUT ANY WARRANTY; without even the implied warranty of
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek GNU General Public License for more details.
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek You should have received a copy of the GNU General Public License
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek along with this program. If not, see <http://www.gnu.org/licenses/>.
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek/* based on code from libssh <http://www.libssh.org> */
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozekssize_t sss_atomic_io_s(int fd, void *buf, size_t n, bool do_read)
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek while (n > pos) {
9959c512ac3ba36f7a0db7614f0357ce0bae748fJakub Hrozek /* read returns 0 on end-of-file */