Blame libglnx/glnx-lockfile.h

rpm-build c487f7
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
rpm-build c487f7
rpm-build c487f7
#pragma once
rpm-build c487f7
rpm-build c487f7
/***
rpm-build c487f7
  This file is part of systemd.
rpm-build c487f7
rpm-build c487f7
  Copyright 2011 Lennart Poettering
rpm-build c487f7
  Copyright 2015 Colin Walters <walters@verbum.org>
rpm-build c487f7
rpm-build c487f7
  systemd is free software; you can redistribute it and/or modify it
rpm-build c487f7
  under the terms of the GNU Lesser General Public License as published by
rpm-build c487f7
  the Free Software Foundation; either version 2.1 of the License, or
rpm-build c487f7
  (at your option) any later version.
rpm-build c487f7
rpm-build c487f7
  systemd is distributed in the hope that it will be useful, but
rpm-build c487f7
  WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build c487f7
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
rpm-build c487f7
  Lesser General Public License for more details.
rpm-build c487f7
rpm-build c487f7
  You should have received a copy of the GNU Lesser General Public License
rpm-build c487f7
  along with systemd; If not, see <http://www.gnu.org/licenses/>.
rpm-build c487f7
***/
rpm-build c487f7
rpm-build c487f7
#include "config.h"
rpm-build c487f7
rpm-build c487f7
#include "glnx-backport-autoptr.h"
rpm-build c487f7
rpm-build c487f7
typedef struct GLnxLockFile {
rpm-build c487f7
        gboolean initialized;
rpm-build c487f7
        int dfd;
rpm-build c487f7
        char *path;
rpm-build c487f7
        int fd;
rpm-build c487f7
        int operation;
rpm-build c487f7
} GLnxLockFile;
rpm-build c487f7
rpm-build c487f7
gboolean glnx_make_lock_file(int dfd, const char *p, int operation, GLnxLockFile *ret, GError **error);
rpm-build c487f7
void glnx_release_lock_file(GLnxLockFile *f);
rpm-build c487f7
rpm-build c487f7
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GLnxLockFile, glnx_release_lock_file)