+ /* Check version. */
+ if (opts.version != 2 && opts.version != 3)
+ {
+ msg (ME, _("Unknown system file version %d. Treating as version %d."),
+ opts.version, 3);
+ opts.version = 3;
+ }
+
+ /* Create file. */
+ mode = S_IRUSR | S_IRGRP | S_IROTH;
+ if (opts.create_writeable)
+ mode |= S_IWUSR | S_IWGRP | S_IWOTH;
+ fd = open (handle_get_filename (fh), O_WRONLY | O_CREAT | O_TRUNC, mode);
+ if (fd < 0)
+ goto open_error;
+
+ /* Open file handle. */