stat-util.h revision d6cd08464d06660b6f1e40d3c53bea0509b09c26
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt This file is part of systemd.
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt Copyright 2010-2012 Lennart Poettering
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt systemd is free software; you can redistribute it and/or modify it
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt under the terms of the GNU Lesser General Public License as published by
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt the Free Software Foundation; either version 2.1 of the License, or
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt (at your option) any later version.
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt systemd is distributed in the hope that it will be useful, but
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt WITHOUT ANY WARRANTY; without even the implied warranty of
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt Lesser General Public License for more details.
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt You should have received a copy of the GNU Lesser General Public License
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt along with systemd; If not, see <http://www.gnu.org/licenses/>.
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flyktstatic inline int dir_is_populated(const char *path) {
631bbe71298ec892f77f44f94feb612646fe6853Patrik Flyktint files_same(const char *filea, const char *fileb);
a9aff3615b430f86bd0a824214d95f634efaf894Patrik Flykt/* The .f_type field of struct statfs is really weird defined on
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykt * different archs. Let's give its type a name. */
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flykttypedef typeof(((struct statfs*)NULL)->f_type) statfs_f_type_t;
d1b0afe3653b4316a6361d204169620726d468a0Patrik Flyktbool is_fs_type(const struct statfs *s, statfs_f_type_t magic_value) _pure_;
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flyktint fd_check_fstype(int fd, statfs_f_type_t magic_value);
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flyktint path_check_fstype(const char *path, statfs_f_type_t magic_value);
a276e6d68606861b552140cbcc003f4af10626fcTom Gundersenbool is_temporary_fs(const struct statfs *s) _pure_;
a276e6d68606861b552140cbcc003f4af10626fcTom Gundersen/* Because statfs.t_type can be int on some architectures, we have to cast
a276e6d68606861b552140cbcc003f4af10626fcTom Gundersen * the const magic to the type, otherwise the compiler warns about
139b011ab81ccea1d51f09e0261a1c390115c6ffPatrik Flykt * signed/unsigned comparison, because the magic can be 32 bit unsigned.