Deleted Added
sdiff udiff text old ( 218214 ) new ( 219815 )
full compact
1/*-
2 * Copyright (c) 2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/hastd/subr.c 218214 2011-02-03 10:37:44Z pjd $");
32
33#include <sys/types.h>
34#include <sys/disk.h>
35#include <sys/ioctl.h>
36#include <sys/stat.h>
37
38#include <errno.h>
39#include <fcntl.h>
40#include <pwd.h>
41#include <unistd.h>
42
43#include <pjdlog.h>
44
45#include "hast.h"
46#include "subr.h"
47
48int
49provinfo(struct hast_resource *res, bool dowrite)
50{
51 struct stat sb;
52
53 PJDLOG_ASSERT(res->hr_localpath != NULL &&
54 res->hr_localpath[0] != '\0');
55
56 if (res->hr_localfd == -1) {

--- 132 unchanged lines hidden ---