2 * tune2fs.c - Change the file system parameters on an ext2 file system
4 * Copyright (C) 1992, 1993, 1994 Remy Card <card@masi.ibp.fr>
5 * Laboratoire MASI, Institut Blaise Pascal
6 * Universite Pierre et Marie Curie (Paris VI)
8 * Copyright 1995, 1996, 1997, 1998, 1999, 2000 by Theodore Ts'o.
11 * This file may be redistributed under the terms of the GNU Public
19 * 93/10/31 - Added the -c option to change the maximal mount counts
20 * 93/12/14 - Added -l flag to list contents of superblock
21 * M.J.E. Mol (marcel@duteca.et.tudelft.nl)
22 * F.W. ten Wolde (franky@duteca.et.tudelft.nl)
23 * 93/12/29 - Added the -e option to change errors behavior
24 * 94/02/27 - Ported to use the ext2fs library
25 * 94/03/06 - Added the checks interval from Uwe Ohse (uwe@tirka.gun.de)
28 #define _XOPEN_SOURCE 500 /* for inclusion of strptime() */
29 #define _BSD_SOURCE /* for inclusion of strcasecmp() */
44 #include <sys/types.h>
46 #include "ext2fs/ext2_fs.h"
47 #include "ext2fs/ext2fs.h"
48 #include "et/com_err.h"
49 #include "uuid/uuid.h"
53 #include "blkid/blkid.h"
55 #include "../version.h"
56 #include "nls-enable.h"
58 const char * program_name = "tune2fs";
60 char * new_label, *new_last_mounted, *new_UUID;
62 static int c_flag, C_flag, e_flag, f_flag, g_flag, i_flag, l_flag, L_flag;
63 static int m_flag, M_flag, r_flag, s_flag = -1, u_flag, U_flag, T_flag;
64 static time_t last_check_time;
65 static int print_label;
66 static int max_mount_count, mount_count, mount_flags;
67 static unsigned long interval, reserved_blocks;
68 static double reserved_ratio;
69 static unsigned long resgid, resuid;
70 static unsigned short errors;
72 static char *features_cmd;
73 static char *mntopts_cmd;
75 int journal_size, journal_flags;
78 static const char *please_fsck = N_("Please run e2fsck on the filesystem.\n");
80 void do_findfs(int argc, char **argv);
82 static void usage(void)
85 _("Usage: %s [-c max_mounts_count] [-e errors_behavior] "
87 "\t[-i interval[d|m|w]] [-j] [-J journal_options]\n"
88 "\t[-l] [-s sparse_flag] [-m reserved_blocks_percent]\n"
89 "\t[-o [^]mount_options[,...]] [-r reserved_blocks_count]\n"
90 "\t[-u user] [-C mount_count] [-L volume_label] "
91 "[-M last_mounted_dir]\n"
92 "\t[-O [^]feature[,...]] [-T last_check_time] [-U UUID]"
93 " device\n"), program_name);
97 static __u32 ok_features[3] = {
98 EXT3_FEATURE_COMPAT_HAS_JOURNAL |
99 EXT2_FEATURE_COMPAT_DIR_INDEX, /* Compat */
100 EXT2_FEATURE_INCOMPAT_FILETYPE, /* Incompat */
101 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER /* R/O compat */
105 * Remove an external journal from the filesystem
107 static void remove_journal_device(ext2_filsys fs)
112 journal_superblock_t *jsb;
115 int commit_remove_journal = 0;
119 commit_remove_journal = 1; /* force removal even if error */
121 uuid_unparse(fs->super->s_journal_uuid, buf);
122 journal_path = blkid_get_devname(NULL, "UUID", buf);
126 ext2fs_find_block_device(fs->super->s_journal_dev);
131 #ifdef CONFIG_TESTIO_DEBUG
132 io_ptr = test_io_manager;
133 test_io_backing_manager = unix_io_manager;
135 io_ptr = unix_io_manager;
137 retval = ext2fs_open(journal_path, EXT2_FLAG_RW|
138 EXT2_FLAG_JOURNAL_DEV_OK, 0,
139 fs->blocksize, io_ptr, &jfs);
141 com_err(program_name, retval,
142 _("while trying to open external journal"));
143 goto no_valid_journal;
145 if (!(jfs->super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {
146 fprintf(stderr, _("%s is not a journal device.\n"),
148 goto no_valid_journal;
151 /* Get the journal superblock */
152 if ((retval = io_channel_read_blk(jfs->io, 1, -1024, buf))) {
153 com_err(program_name, retval,
154 _("while reading journal superblock"));
155 goto no_valid_journal;
158 jsb = (journal_superblock_t *) buf;
159 if ((jsb->s_header.h_magic != (unsigned) ntohl(JFS_MAGIC_NUMBER)) ||
160 (jsb->s_header.h_blocktype != (unsigned) ntohl(JFS_SUPERBLOCK_V2))) {
161 fputs(_("Journal superblock not found!\n"), stderr);
162 goto no_valid_journal;
165 /* Find the filesystem UUID */
166 nr_users = ntohl(jsb->s_nr_users);
167 for (i=0; i < nr_users; i++) {
168 if (memcmp(fs->super->s_uuid,
169 &jsb->s_users[i*16], 16) == 0)
173 fputs(_("Filesystem's UUID not found on journal device.\n"),
175 commit_remove_journal = 1;
176 goto no_valid_journal;
179 for (i=0; i < nr_users; i++)
180 memcpy(&jsb->s_users[i*16], &jsb->s_users[(i+1)*16], 16);
181 jsb->s_nr_users = htonl(nr_users);
183 /* Write back the journal superblock */
184 if ((retval = io_channel_write_blk(jfs->io, 1, -1024, buf))) {
185 com_err(program_name, retval,
186 "while writing journal superblock.");
187 goto no_valid_journal;
190 commit_remove_journal = 1;
193 if (commit_remove_journal == 0) {
194 fputs(_("Journal NOT removed\n"), stderr);
197 fs->super->s_journal_dev = 0;
198 uuid_clear(fs->super->s_journal_uuid);
199 ext2fs_mark_super_dirty(fs);
200 fputs(_("Journal removed\n"), stdout);
204 /* Helper function for remove_journal_inode */
205 static int release_blocks_proc(ext2_filsys fs, blk_t *blocknr,
206 int blockcnt EXT2FS_ATTR((unused)),
207 void *private EXT2FS_ATTR((unused)))
213 ext2fs_unmark_block_bitmap(fs->block_map,block);
214 group = ext2fs_group_of_blk(fs, block);
215 fs->group_desc[group].bg_free_blocks_count++;
216 fs->super->s_free_blocks_count++;
221 * Remove the journal inode from the filesystem
223 static void remove_journal_inode(ext2_filsys fs)
225 struct ext2_inode inode;
227 ino_t ino = fs->super->s_journal_inum;
229 retval = ext2fs_read_inode(fs, ino, &inode);
231 com_err(program_name, retval,
232 _("while reading journal inode"));
235 if (ino == EXT2_JOURNAL_INO) {
236 retval = ext2fs_read_bitmaps(fs);
238 com_err(program_name, retval,
239 _("while reading bitmaps"));
242 retval = ext2fs_block_iterate(fs, ino, 0, NULL,
243 release_blocks_proc, NULL);
245 com_err(program_name, retval,
246 _("while clearing journal inode"));
249 memset(&inode, 0, sizeof(inode));
250 ext2fs_mark_bb_dirty(fs);
251 fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
253 inode.i_flags &= ~EXT2_IMMUTABLE_FL;
254 retval = ext2fs_write_inode(fs, ino, &inode);
256 com_err(program_name, retval,
257 _("while writing journal inode"));
260 fs->super->s_journal_inum = 0;
261 ext2fs_mark_super_dirty(fs);
265 * Update the default mount options
267 static void update_mntopts(ext2_filsys fs, char *mntopts)
269 struct ext2_super_block *sb= fs->super;
271 if (e2p_edit_mntopts(mntopts, &sb->s_default_mount_opts, ~0)) {
272 fprintf(stderr, _("Invalid mount option set: %s\n"),
276 ext2fs_mark_super_dirty(fs);
280 * Update the feature set as provided by the user.
282 static void update_feature_set(ext2_filsys fs, char *features)
284 int sparse, old_sparse, filetype, old_filetype;
285 int journal, old_journal, dxdir, old_dxdir;
286 struct ext2_super_block *sb= fs->super;
287 __u32 old_compat, old_incompat, old_ro_compat;
289 old_compat = sb->s_feature_compat;
290 old_ro_compat = sb->s_feature_ro_compat;
291 old_incompat = sb->s_feature_incompat;
293 old_sparse = sb->s_feature_ro_compat &
294 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
295 old_filetype = sb->s_feature_incompat &
296 EXT2_FEATURE_INCOMPAT_FILETYPE;
297 old_journal = sb->s_feature_compat &
298 EXT3_FEATURE_COMPAT_HAS_JOURNAL;
299 old_dxdir = sb->s_feature_compat &
300 EXT2_FEATURE_COMPAT_DIR_INDEX;
301 if (e2p_edit_feature(features, &sb->s_feature_compat,
303 fprintf(stderr, _("Invalid filesystem option set: %s\n"),
307 sparse = sb->s_feature_ro_compat &
308 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
309 filetype = sb->s_feature_incompat &
310 EXT2_FEATURE_INCOMPAT_FILETYPE;
311 journal = sb->s_feature_compat &
312 EXT3_FEATURE_COMPAT_HAS_JOURNAL;
313 dxdir = sb->s_feature_compat &
314 EXT2_FEATURE_COMPAT_DIR_INDEX;
315 if (old_journal && !journal) {
316 if ((mount_flags & EXT2_MF_MOUNTED) &&
317 !(mount_flags & EXT2_MF_READONLY)) {
318 fputs(_("The has_journal flag may only be "
319 "cleared when the filesystem is\n"
320 "unmounted or mounted "
321 "read-only.\n"), stderr);
324 if (sb->s_feature_incompat &
325 EXT3_FEATURE_INCOMPAT_RECOVER) {
326 fputs(_("The needs_recovery flag is set. "
327 "Please run e2fsck before clearing\n"
328 "the has_journal flag.\n"), stderr);
331 if (sb->s_journal_inum) {
332 remove_journal_inode(fs);
334 if (sb->s_journal_dev) {
335 remove_journal_device(fs);
338 if (journal && !old_journal) {
340 * If adding a journal flag, let the create journal
341 * code below handle creating setting the flag and
342 * creating the journal. We supply a default size if
347 sb->s_feature_compat &= ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
349 if (dxdir && !old_dxdir) {
350 if (!sb->s_def_hash_version)
351 sb->s_def_hash_version = EXT2_HASH_TEA;
352 if (uuid_is_null((unsigned char *) sb->s_hash_seed))
353 uuid_generate((unsigned char *) sb->s_hash_seed);
356 if (sb->s_rev_level == EXT2_GOOD_OLD_REV &&
357 (sb->s_feature_compat || sb->s_feature_ro_compat ||
358 sb->s_feature_incompat))
359 ext2fs_update_dynamic_rev(fs);
360 if ((sparse != old_sparse) ||
361 (filetype != old_filetype)) {
362 sb->s_state &= ~EXT2_VALID_FS;
363 printf("\n%s\n", _(please_fsck));
365 if ((old_compat != sb->s_feature_compat) ||
366 (old_ro_compat != sb->s_feature_ro_compat) ||
367 (old_incompat != sb->s_feature_incompat))
368 ext2fs_mark_super_dirty(fs);
372 * Add a journal to the filesystem.
374 static void add_journal(ext2_filsys fs)
376 unsigned long journal_blocks;
381 if (fs->super->s_feature_compat &
382 EXT3_FEATURE_COMPAT_HAS_JOURNAL) {
383 fputs(_("The filesystem already has a journal.\n"), stderr);
386 if (journal_device) {
387 check_plausibility(journal_device);
388 check_mount(journal_device, 0, _("journal"));
389 #ifdef CONFIG_TESTIO_DEBUG
390 io_ptr = test_io_manager;
391 test_io_backing_manager = unix_io_manager;
393 io_ptr = unix_io_manager;
395 retval = ext2fs_open(journal_device, EXT2_FLAG_RW|
396 EXT2_FLAG_JOURNAL_DEV_OK, 0,
397 fs->blocksize, io_ptr, &jfs);
399 com_err(program_name, retval,
400 _("\n\twhile trying to open journal on %s\n"),
404 printf(_("Creating journal on device %s: "),
408 retval = ext2fs_add_journal_device(fs, jfs);
411 com_err (program_name, retval,
412 _("while adding filesystem to journal on %s"),
416 fputs(_("done\n"), stdout);
417 } else if (journal_size) {
418 fputs(_("Creating journal inode: "), stdout);
420 journal_blocks = figure_journal_size(journal_size, fs);
422 retval = ext2fs_add_journal_inode(fs, journal_blocks,
425 fprintf(stderr, "\n");
426 com_err(program_name, retval,
427 _("\n\twhile trying to create journal file"));
430 fputs(_("done\n"), stdout);
432 * If the filesystem wasn't mounted, we need to force
433 * the block group descriptors out.
435 if ((mount_flags & EXT2_MF_MOUNTED) == 0)
436 fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
438 print_check_message(fs);
443 free(journal_device);
448 static void parse_e2label_options(int argc, char ** argv)
450 if ((argc < 2) || (argc > 3)) {
451 fputs(_("Usage: e2label device [newlabel]\n"), stderr);
454 io_options = strchr(argv[1], '?');
457 device_name = blkid_get_devname(NULL, argv[1], NULL);
459 com_err("e2label", 0, _("Unable to resolve '%s'"),
464 open_flag = EXT2_FLAG_RW | EXT2_FLAG_JOURNAL_DEV_OK;
471 static time_t parse_time(char *str)
475 if (strcmp(str, "now") == 0) {
478 memset(&ts, 0, sizeof(ts));
480 strptime(str, "%Y%m%d%H%M%S", &ts);
482 sscanf(str, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon,
483 &ts.tm_mday, &ts.tm_hour, &ts.tm_min, &ts.tm_sec);
486 if (ts.tm_year < 0 || ts.tm_mon < 0 || ts.tm_mon > 11 ||
487 ts.tm_mday < 0 || ts.tm_mday > 31 || ts.tm_hour > 23 ||
488 ts.tm_min > 59 || ts.tm_sec > 61)
491 if (ts.tm_mday == 0) {
492 com_err(program_name, 0,
493 _("Couldn't parse date/time specifier: %s"),
497 return (mktime(&ts));
500 static void parse_tune2fs_options(int argc, char **argv)
507 printf("tune2fs %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
508 while ((c = getopt(argc, argv, "c:e:fg:i:jlm:o:r:s:u:C:J:L:M:O:T:U:")) != EOF)
512 max_mount_count = strtol (optarg, &tmp, 0);
513 if (*tmp || max_mount_count > 16000) {
514 com_err (program_name, 0,
515 _("bad mounts count - %s"),
519 if (max_mount_count == 0)
520 max_mount_count = -1;
522 open_flag = EXT2_FLAG_RW;
525 mount_count = strtoul (optarg, &tmp, 0);
526 if (*tmp || mount_count > 16000) {
527 com_err (program_name, 0,
528 _("bad mounts count - %s"),
533 open_flag = EXT2_FLAG_RW;
536 if (strcmp (optarg, "continue") == 0)
537 errors = EXT2_ERRORS_CONTINUE;
538 else if (strcmp (optarg, "remount-ro") == 0)
539 errors = EXT2_ERRORS_RO;
540 else if (strcmp (optarg, "panic") == 0)
541 errors = EXT2_ERRORS_PANIC;
543 com_err (program_name, 0,
544 _("bad error behavior - %s"),
549 open_flag = EXT2_FLAG_RW;
551 case 'f': /* Force */
555 resgid = strtoul (optarg, &tmp, 0);
557 gr = getgrnam (optarg);
566 com_err (program_name, 0,
567 _("bad gid/group name - %s"),
572 open_flag = EXT2_FLAG_RW;
575 interval = strtoul (optarg, &tmp, 0);
588 case 'M': /* months! */
589 interval *= 86400 * 30;
593 case 'W': /* weeks */
594 interval *= 86400 * 7;
599 com_err (program_name, 0,
600 _("bad interval - %s"), optarg);
604 open_flag = EXT2_FLAG_RW;
609 open_flag = EXT2_FLAG_RW;
612 parse_journal_opts(optarg);
613 open_flag = EXT2_FLAG_RW;
621 open_flag = EXT2_FLAG_RW |
622 EXT2_FLAG_JOURNAL_DEV_OK;
625 reserved_ratio = strtod(optarg, &tmp);
626 if (*tmp || reserved_ratio > 50) {
627 com_err (program_name, 0,
628 _("bad reserved block ratio - %s"),
633 open_flag = EXT2_FLAG_RW;
636 new_last_mounted = optarg;
638 open_flag = EXT2_FLAG_RW;
642 com_err (program_name, 0,
643 _("-o may only be specified once"));
646 mntopts_cmd = optarg;
647 open_flag = EXT2_FLAG_RW;
652 com_err (program_name, 0,
653 _("-O may only be specified once"));
656 features_cmd = optarg;
657 open_flag = EXT2_FLAG_RW;
660 reserved_blocks = strtoul (optarg, &tmp, 0);
662 com_err (program_name, 0,
663 _("bad reserved blocks count - %s"),
668 open_flag = EXT2_FLAG_RW;
671 s_flag = atoi(optarg);
672 open_flag = EXT2_FLAG_RW;
676 last_check_time = parse_time(optarg);
677 open_flag = EXT2_FLAG_RW;
680 resuid = strtoul (optarg, &tmp, 0);
682 pw = getpwnam (optarg);
691 com_err (program_name, 0,
692 _("bad uid/user name - %s"),
697 open_flag = EXT2_FLAG_RW;
702 open_flag = EXT2_FLAG_RW |
703 EXT2_FLAG_JOURNAL_DEV_OK;
708 if (optind < argc - 1 || optind == argc)
710 if (!open_flag && !l_flag)
712 io_options = strchr(argv[optind], '?');
715 device_name = blkid_get_devname(NULL, argv[optind], NULL);
717 com_err("tune2fs", 0, _("Unable to resolve '%s'"),
723 void do_findfs(int argc, char **argv)
728 (strncmp(argv[1], "LABEL=", 6) && strncmp(argv[1], "UUID=", 5))) {
729 fprintf(stderr, "Usage: findfs LABEL=<label>|UUID=<uuid>\n");
732 dev = blkid_get_devname(NULL, argv[1], NULL);
734 com_err("findfs", 0, _("Unable to resolve '%s'"),
743 int main (int argc, char ** argv)
747 struct ext2_super_block *sb;
751 setlocale(LC_MESSAGES, "");
752 setlocale(LC_CTYPE, "");
753 bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
754 textdomain(NLS_CAT_NAME);
757 program_name = *argv;
758 add_error_table(&et_ext2_error_table);
760 if (strcmp(get_progname(argv[0]), "findfs") == 0)
761 do_findfs(argc, argv);
762 if (strcmp(get_progname(argv[0]), "e2label") == 0)
763 parse_e2label_options(argc, argv);
765 parse_tune2fs_options(argc, argv);
767 #ifdef CONFIG_TESTIO_DEBUG
768 io_ptr = test_io_manager;
769 test_io_backing_manager = unix_io_manager;
771 io_ptr = unix_io_manager;
773 retval = ext2fs_open2(device_name, io_options, open_flag,
776 com_err (program_name, retval, _("while trying to open %s"),
779 _("Couldn't find valid filesystem superblock.\n"));
783 fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
785 /* For e2label emulation */
786 printf("%.*s\n", (int) sizeof(sb->s_volume_name),
788 remove_error_table(&et_ext2_error_table);
791 retval = ext2fs_check_if_mounted(device_name, &mount_flags);
793 com_err("ext2fs_check_if_mount", retval,
794 _("while determining whether %s is mounted."),
798 /* Normally we only need to write out the superblock */
799 fs->flags |= EXT2_FLAG_SUPER_ONLY;
802 sb->s_max_mnt_count = max_mount_count;
803 ext2fs_mark_super_dirty(fs);
804 printf (_("Setting maximal mount count to %d\n"),
808 sb->s_mnt_count = mount_count;
809 ext2fs_mark_super_dirty(fs);
810 printf (_("Setting current mount count to %d\n"), mount_count);
813 sb->s_errors = errors;
814 ext2fs_mark_super_dirty(fs);
815 printf (_("Setting error behavior to %d\n"), errors);
818 sb->s_def_resgid = resgid;
819 ext2fs_mark_super_dirty(fs);
820 printf (_("Setting reserved blocks gid to %lu\n"), resgid);
823 sb->s_checkinterval = interval;
824 ext2fs_mark_super_dirty(fs);
825 printf (_("Setting interval between checks to %lu seconds\n"), interval);
828 sb->s_r_blocks_count = e2p_percent(reserved_ratio,
830 ext2fs_mark_super_dirty(fs);
831 printf (_("Setting reserved blocks percentage to %g%% (%u blocks)\n"),
832 reserved_ratio, sb->s_r_blocks_count);
835 if (reserved_blocks >= sb->s_blocks_count/2) {
836 com_err (program_name, 0,
837 _("reserved blocks count is too big (%lu)"),
841 sb->s_r_blocks_count = reserved_blocks;
842 ext2fs_mark_super_dirty(fs);
843 printf (_("Setting reserved blocks count to %lu\n"),
847 if (sb->s_feature_ro_compat &
848 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)
849 fputs(_("\nThe filesystem already has sparse "
850 "superblocks.\n"), stderr);
852 sb->s_feature_ro_compat |=
853 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
854 sb->s_state &= ~EXT2_VALID_FS;
855 ext2fs_mark_super_dirty(fs);
856 printf(_("\nSparse superblock flag set. %s"),
861 if (!(sb->s_feature_ro_compat &
862 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER))
863 fputs(_("\nThe filesystem already has sparse "
864 "superblocks disabled.\n"), stderr);
866 sb->s_feature_ro_compat &=
867 ~EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
868 sb->s_state &= ~EXT2_VALID_FS;
869 fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
870 ext2fs_mark_super_dirty(fs);
871 printf(_("\nSparse superblock flag cleared. %s"),
876 sb->s_lastcheck = last_check_time;
877 ext2fs_mark_super_dirty(fs);
878 printf(_("Setting time filesystem last checked to %s\n"),
879 ctime(&last_check_time));
882 sb->s_def_resuid = resuid;
883 ext2fs_mark_super_dirty(fs);
884 printf (_("Setting reserved blocks uid to %lu\n"), resuid);
887 if (strlen(new_label) > sizeof(sb->s_volume_name))
888 fputs(_("Warning: label too long, truncating.\n"),
890 memset(sb->s_volume_name, 0, sizeof(sb->s_volume_name));
891 strncpy(sb->s_volume_name, new_label,
892 sizeof(sb->s_volume_name));
893 ext2fs_mark_super_dirty(fs);
896 memset(sb->s_last_mounted, 0, sizeof(sb->s_last_mounted));
897 strncpy(sb->s_last_mounted, new_last_mounted,
898 sizeof(sb->s_last_mounted));
899 ext2fs_mark_super_dirty(fs);
902 update_mntopts(fs, mntopts_cmd);
904 update_feature_set(fs, features_cmd);
905 if (journal_size || journal_device)
909 if ((strcasecmp(new_UUID, "null") == 0) ||
910 (strcasecmp(new_UUID, "clear") == 0)) {
911 uuid_clear(sb->s_uuid);
912 } else if (strcasecmp(new_UUID, "time") == 0) {
913 uuid_generate_time(sb->s_uuid);
914 } else if (strcasecmp(new_UUID, "random") == 0) {
915 uuid_generate(sb->s_uuid);
916 } else if (uuid_parse(new_UUID, sb->s_uuid)) {
917 com_err(program_name, 0, _("Invalid UUID format\n"));
920 ext2fs_mark_super_dirty(fs);
925 remove_error_table(&et_ext2_error_table);
926 return (ext2fs_close (fs) ? 1 : 0);