- /* Open file handle as an exclusive writer. */
- if (!fh_open (fh, FH_REF_FILE, "system file", "we"))
- return NULL;
-
- /* Create the file on disk. */
- mode = S_IRUSR | S_IRGRP | S_IROTH;
- if (opts.create_writeable)
- mode |= S_IWUSR | S_IWGRP | S_IWOTH;
- file = create_stream (fh_get_file_name (fh), "w", mode);
- if (file == NULL)
- {
- msg (ME, _("Error opening \"%s\" for writing as a system file: %s."),
- fh_get_file_name (fh), strerror (errno));
- fh_close (fh, "system file", "we");
- return NULL;
- }
-