| 86 | }; |
| 87 | |
| 88 | static void |
| 89 | rm_option_init (struct rm_options *x) |
| 90 | { |
| 91 | x->ignore_missing_files = false; |
| 92 | x->remove_empty_directories = true; |
| 93 | x->recursive = true; |
| 94 | x->one_file_system = false; |
| 95 | |
| 96 | /* Should we prompt for removal, too? No. Prompting for the 'move' |
| 97 | part is enough. It implies removal. */ |
| 98 | x->interactive = RMI_NEVER; |
| 99 | x->stdin_tty = false; |
| 100 | |
| 101 | x->verbose = false; |
| 102 | |
| 103 | /* Since this program may well have to process additional command |
| 104 | line arguments after any call to 'rm', that function must preserve |
| 105 | the initial working directory, in case one of those is a |
| 106 | '.'-relative name. */ |
| 107 | x->require_restore_cwd = true; |
| 108 | |
| 109 | { |
| 110 | static struct dev_ino dev_ino_buf; |
| 111 | x->root_dev_ino = get_root_dev_ino (&dev_ino_buf); |
| 112 | if (x->root_dev_ino == NULL) |
| 113 | error (EXIT_FAILURE, errno, _("failed to get attributes of %s"), |
| 114 | quoteaf ("/")); |
| 115 | } |
| 116 | |
| 117 | x->preserve_all_root = false; |
| 118 | } |
| 119 | |
| 120 | static void |
| 121 | cp_option_init (struct cp_options *x) |
no test coverage detected