MCPcopy Create free account
hub / github.com/coreutils/coreutils / rm_option_init

Function rm_option_init

src/mv.c:88–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86};
87
88static void
89rm_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
120static void
121cp_option_init (struct cp_options *x)

Callers 1

do_moveFunction · 0.70

Calls 1

get_root_dev_inoFunction · 0.85

Tested by

no test coverage detected