1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Root device and inode number checking.
5 Copyright (C) 2003, 2006 Free Software Foundation, Inc.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
21 #ifndef ROOT_DEV_INO_H
22 # define ROOT_DEV_INO_H 1
25 # include "same-inode.h"
28 get_root_dev_ino (struct dev_ino *root_d_i);
30 /* These macros are common to the programs that support the
31 --preserve-root and --no-preserve-root options. */
33 # define ROOT_DEV_INO_CHECK(Root_dev_ino, Dir_statbuf) \
34 (Root_dev_ino && SAME_INODE (*Dir_statbuf, *Root_dev_ino))
36 # define ROOT_DEV_INO_WARN(Dirname) \
39 if (STREQ (Dirname, "/")) \
40 error (0, 0, _("it is dangerous to operate recursively on %s"), \
44 _("it is dangerous to operate recursively on %s (same as %s)"), \
45 quote_n (0, Dirname), quote_n (1, "/")); \
46 error (0, 0, _("use --no-preserve-root to override this failsafe")); \