'sort' race condition fixes.
[coreutils.git] / src / remove.h
blobdeb5d628c317837fde6c3c0cec4e4a19d97df29d
2 struct rm_options
4 /* If nonzero, ignore nonexistent files. */
5 int ignore_missing_files;
7 /* If nonzero, query the user about whether to remove each file. */
8 int interactive;
10 /* If nonzero, recursively remove directories. */
11 int recursive;
13 /* If nonzero, stdin is a tty. */
14 int stdin_tty;
16 /* If nonzero, remove directories with unlink instead of rmdir, and don't
17 require a directory to be empty before trying to unlink it.
18 Only works for the super-user. */
19 int unlink_dirs;
21 /* If nonzero, display the name of each file removed. */
22 int verbose;
25 enum RM_status
27 /* These must be listed in order of increasing seriousness. */
28 RM_OK = 1,
29 RM_USER_DECLINED,
30 RM_ERROR
33 #define VALID_STATUS(S) \
34 ((S) == RM_OK || (S) == RM_USER_DECLINED || (S) == RM_ERROR)
36 struct File_spec
38 char *filename;
39 unsigned int have_filetype_mode:1;
40 unsigned int have_full_mode:1;
41 unsigned int have_device:1;
42 mode_t mode;
43 ino_t st_ino;
44 dev_t st_dev;
47 enum RM_status rm PARAMS ((struct File_spec *fs, int user_specified_name,
48 const struct rm_options *x));
49 void fspec_init_file PARAMS ((struct File_spec *fs, const char *filename));
50 void remove_init PARAMS ((void));
51 void remove_fini PARAMS ((void));