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)
29 /* Solaris for a strange reason drops struct
30 timeval if _XOPEN_SOURCE defined */
31 #define _XOPEN_SOURCE /* for inclusion of strptime() */
33 #define _BSD_SOURCE /* for inclusion of strcasecmp() */
48 #include <sys/types.h>
50 #include "ext2fs/ext2_fs.h"
51 #include "ext2fs/ext2fs.h"
52 #include "et/com_err.h"
53 #include "uuid/uuid.h"
57 #include "blkid/blkid.h"
59 #include "../version.h"
60 #include "nls-enable.h"
62 const char * program_name = "tune2fs";
64 char * new_label, *new_last_mounted, *new_UUID;
66 static int c_flag, C_flag, e_flag, f_flag, g_flag, i_flag, l_flag, L_flag;
67 static int m_flag, M_flag, r_flag, s_flag = -1, u_flag, U_flag, T_flag;
68 static time_t last_check_time;
69 static int print_label;
70 static int max_mount_count, mount_count, mount_flags;
71 static unsigned long interval, reserved_ratio, reserved_blocks;
72 static unsigned long resgid, resuid;
73 static unsigned short errors;
75 static char *features_cmd;
76 static char *mntopts_cmd;
78 int journal_size, journal_flags;
81 static const char *please_fsck = N_("Please run e2fsck on the filesystem.\n");
83 void do_findfs(int argc, char **argv);
85 static void usage(void)
88 _("Usage: %s [-c max-mounts-count] [-e errors-behavior] "
90 "\t[-i interval[d|m|w]] [-j] [-J journal-options]\n"
91 "\t[-l] [-s sparse-flag] [-m reserved-blocks-percent]\n"
92 "\t[-o [^]mount-options[,...]] [-r reserved-blocks-count]\n"
93 "\t[-u user] [-C mount-count] [-L volume-label] "
94 "[-M last-mounted-dir]\n"
95 "\t[-O [^]feature[,...]] [-T last-check-time] [-U UUID]"
96 " device\n"), program_name);
100 static __u32 ok_features[3] = {
101 EXT3_FEATURE_COMPAT_HAS_JOURNAL |
102 EXT2_FEATURE_COMPAT_DIR_INDEX, /* Compat */
103 EXT2_FEATURE_INCOMPAT_FILETYPE, /* Incompat */
104 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER /* R/O compat */
108 * Remove an external journal from the filesystem
110 static void remove_journal_device(ext2_filsys fs)
115 journal_superblock_t *jsb;
118 int commit_remove_journal = 0;
122 commit_remove_journal = 1; /* force removal even if error */
124 uuid_unparse(fs->super->s_journal_uuid, buf);
125 journal_path = blkid_get_devname(NULL, "UUID", buf);
129 ext2fs_find_block_device(fs->super->s_journal_dev);
134 #ifdef CONFIG_TESTIO_DEBUG
135 io_ptr = test_io_manager;
136 test_io_backing_manager = unix_io_manager;
138 io_ptr = unix_io_manager;
140 retval = ext2fs_open(journal_path, EXT2_FLAG_RW|
141 EXT2_FLAG_JOURNAL_DEV_OK, 0,
142 fs->blocksize, io_ptr, &jfs);
144 com_err(program_name, retval,
145 _("while trying to open external journal"));
146 goto no_valid_journal;
148 if (!(jfs->super->s_feature_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {
149 fprintf(stderr, _("%s is not a journal device.\n"),
151 goto no_valid_journal;
154 /* Get the journal superblock */
155 if ((retval = io_channel_read_blk(jfs->io, 1, -1024, buf))) {
156 com_err(program_name, retval,
157 _("while reading journal superblock"));
158 goto no_valid_journal;
161 jsb = (journal_superblock_t *) buf;
162 if ((jsb->s_header.h_magic != (unsigned) ntohl(JFS_MAGIC_NUMBER)) ||
163 (jsb->s_header.h_blocktype != (unsigned) ntohl(JFS_SUPERBLOCK_V2))) {
164 fputs(_("Journal superblock not found!\n"), stderr);
165 goto no_valid_journal;
168 /* Find the filesystem UUID */
169 nr_users = ntohl(jsb->s_nr_users);
170 for (i=0; i < nr_users; i++) {
171 if (memcmp(fs->super->s_uuid,
172 &jsb->s_users[i*16], 16) == 0)
176 fputs(_("Filesystem's UUID not found on journal device.\n"),
178 commit_remove_journal = 1;
179 goto no_valid_journal;
182 for (i=0; i < nr_users; i++)
183 memcpy(&jsb->s_users[i*16], &jsb->s_users[(i+1)*16], 16);
184 jsb->s_nr_users = htonl(nr_users);
186 /* Write back the journal superblock */
187 if ((retval = io_channel_write_blk(jfs->io, 1, -1024, buf))) {
188 com_err(program_name, retval,
189 "while writing journal superblock.");
190 goto no_valid_journal;
193 commit_remove_journal = 1;
196 if (commit_remove_journal == 0) {
197 fputs(_("Journal NOT removed\n"), stderr);
200 fs->super->s_journal_dev = 0;
201 uuid_clear(fs->super->s_journal_uuid);
202 ext2fs_mark_super_dirty(fs);
203 fputs(_("Journal removed\n"), stdout);
207 /* Helper function for remove_journal_inode */
208 static int release_blocks_proc(ext2_filsys fs, blk_t *blocknr,
209 int blockcnt EXT2FS_ATTR((unused)),
210 void *private EXT2FS_ATTR((unused)))
216 ext2fs_unmark_block_bitmap(fs->block_map,block);
217 group = ext2fs_group_of_blk(fs, block);
218 fs->group_desc[group].bg_free_blocks_count++;
219 fs->super->s_free_blocks_count++;
224 * Remove the journal inode from the filesystem
226 static void remove_journal_inode(ext2_filsys fs)
228 struct ext2_inode inode;
230 ino_t ino = fs->super->s_journal_inum;
232 retval = ext2fs_read_inode(fs, ino, &inode);
234 com_err(program_name, retval,
235 _("while reading journal inode"));
238 if (ino == EXT2_JOURNAL_INO) {
239 retval = ext2fs_read_bitmaps(fs);
241 com_err(program_name, retval,
242 _("while reading bitmaps"));
245 retval = ext2fs_block_iterate(fs, ino, 0, NULL,
246 release_blocks_proc, NULL);
248 com_err(program_name, retval,
249 _("while clearing journal inode"));
252 memset(&inode, 0, sizeof(inode));
253 ext2fs_mark_bb_dirty(fs);
254 fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
256 inode.i_flags &= ~EXT2_IMMUTABLE_FL;
257 retval = ext2fs_write_inode(fs, ino, &inode);
259 com_err(program_name, retval,
260 _("while writing journal inode"));
263 fs->super->s_journal_inum = 0;
264 ext2fs_mark_super_dirty(fs);
268 * Update the default mount options
270 static void update_mntopts(ext2_filsys fs, char *mntopts)
272 struct ext2_super_block *sb= fs->super;
274 if (e2p_edit_mntopts(mntopts, &sb->s_default_mount_opts, ~0)) {
275 fprintf(stderr, _("Invalid mount option set: %s\n"),
279 ext2fs_mark_super_dirty(fs);
283 * Update the feature set as provided by the user.
285 static void update_feature_set(ext2_filsys fs, char *features)
287 int sparse, old_sparse, filetype, old_filetype;
288 int journal, old_journal, dxdir, old_dxdir;
289 struct ext2_super_block *sb= fs->super;
290 __u32 old_compat, old_incompat, old_ro_compat;
292 old_compat = sb->s_feature_compat;
293 old_ro_compat = sb->s_feature_ro_compat;
294 old_incompat = sb->s_feature_incompat;
296 old_sparse = sb->s_feature_ro_compat &
297 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
298 old_filetype = sb->s_feature_incompat &
299 EXT2_FEATURE_INCOMPAT_FILETYPE;
300 old_journal = sb->s_feature_compat &
301 EXT3_FEATURE_COMPAT_HAS_JOURNAL;
302 old_dxdir = sb->s_feature_compat &
303 EXT2_FEATURE_COMPAT_DIR_INDEX;
304 if (e2p_edit_feature(features, &sb->s_feature_compat,
306 fprintf(stderr, _("Invalid filesystem option set: %s\n"),
310 sparse = sb->s_feature_ro_compat &
311 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
312 filetype = sb->s_feature_incompat &
313 EXT2_FEATURE_INCOMPAT_FILETYPE;
314 journal = sb->s_feature_compat &
315 EXT3_FEATURE_COMPAT_HAS_JOURNAL;
316 dxdir = sb->s_feature_compat &
317 EXT2_FEATURE_COMPAT_DIR_INDEX;
318 if (old_journal && !journal) {
319 if ((mount_flags & EXT2_MF_MOUNTED) &&
320 !(mount_flags & EXT2_MF_READONLY)) {
321 fputs(_("The has_journal flag may only be "
322 "cleared when the filesystem is\n"
323 "unmounted or mounted "
324 "read-only.\n"), stderr);
327 if (sb->s_feature_incompat &
328 EXT3_FEATURE_INCOMPAT_RECOVER) {
329 fputs(_("The needs_recovery flag is set. "
330 "Please run e2fsck before clearing\n"
331 "the has_journal flag.\n"), stderr);
334 if (sb->s_journal_inum) {
335 remove_journal_inode(fs);
337 if (sb->s_journal_dev) {
338 remove_journal_device(fs);
341 if (journal && !old_journal) {
343 * If adding a journal flag, let the create journal
344 * code below handle creating setting the flag and
345 * creating the journal. We supply a default size if
350 sb->s_feature_compat &= ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
352 if (dxdir && !old_dxdir) {
353 if (!sb->s_def_hash_version)
354 sb->s_def_hash_version = EXT2_HASH_TEA;
355 if (uuid_is_null((unsigned char *) sb->s_hash_seed))
356 uuid_generate((unsigned char *) sb->s_hash_seed);
359 if (sb->s_rev_level == EXT2_GOOD_OLD_REV &&
360 (sb->s_feature_compat || sb->s_feature_ro_compat ||
361 sb->s_feature_incompat))
362 ext2fs_update_dynamic_rev(fs);
363 if ((sparse != old_sparse) ||
364 (filetype != old_filetype)) {
365 sb->s_state &= ~EXT2_VALID_FS;
366 printf("\n%s\n", _(please_fsck));
368 if ((old_compat != sb->s_feature_compat) ||
369 (old_ro_compat != sb->s_feature_ro_compat) ||
370 (old_incompat != sb->s_feature_incompat))
371 ext2fs_mark_super_dirty(fs);
375 * Add a journal to the filesystem.
377 static void add_journal(ext2_filsys fs)
379 unsigned long journal_blocks;
384 if (fs->super->s_feature_compat &
385 EXT3_FEATURE_COMPAT_HAS_JOURNAL) {
386 fputs(_("The filesystem already has a journal.\n"), stderr);
389 if (journal_device) {
390 check_plausibility(journal_device);
391 check_mount(journal_device, 0, _("journal"));
392 #ifdef CONFIG_TESTIO_DEBUG
393 io_ptr = test_io_manager;
394 test_io_backing_manager = unix_io_manager;
396 io_ptr = unix_io_manager;
398 retval = ext2fs_open(journal_device, EXT2_FLAG_RW|
399 EXT2_FLAG_JOURNAL_DEV_OK, 0,
400 fs->blocksize, io_ptr, &jfs);
402 com_err(program_name, retval,
403 _("\n\twhile trying to open journal on %s\n"),
407 printf(_("Creating journal on device %s: "),
411 retval = ext2fs_add_journal_device(fs, jfs);
414 com_err (program_name, retval,
415 _("while adding filesystem to journal on %s"),
419 fputs(_("done\n"), stdout);
420 } else if (journal_size) {
421 fputs(_("Creating journal inode: "), stdout);
423 journal_blocks = figure_journal_size(journal_size, fs);
425 retval = ext2fs_add_journal_inode(fs, journal_blocks,
428 fprintf(stderr, "\n");
429 com_err(program_name, retval,
430 _("\n\twhile trying to create journal file"));
433 fputs(_("done\n"), stdout);
435 * If the filesystem wasn't mounted, we need to force
436 * the block group descriptors out.
438 if ((mount_flags & EXT2_MF_MOUNTED) == 0)
439 fs->flags &= ~EXT2_FLAG_SUPER_ONLY;
441 print_check_message(fs);
446 free(journal_device);
451 static void parse_e2label_options(int argc, char ** argv)
453 if ((argc < 2) || (argc > 3)) {
454 fputs(_("Usage: e2label device [newlabel]\n"), stderr);
457 io_options = strchr(argv[1], '?');
460 device_name = blkid_get_devname(NULL, argv[1], NULL);
462 com_err("e2label", 0, _("Unable to resolve '%s'"),
467 open_flag = EXT2_FLAG_RW | EXT2_FLAG_JOURNAL_DEV_OK;
474 static time_t parse_time(char *str)
478 if (strcmp(str, "now") == 0) {
481 memset(&ts, 0, sizeof(ts));
483 strptime(str, "%Y%m%d%H%M%S", &ts);
485 sscanf(str, "%4d%2d%2d%2d%2d%2d", &ts.tm_year, &ts.tm_mon,
486 &ts.tm_mday, &ts.tm_hour, &ts.tm_min, &ts.tm_sec);
489 if (ts.tm_year < 0 || ts.tm_mon < 0 || ts.tm_mon > 11 ||
490 ts.tm_mday < 0 || ts.tm_mday > 31 || ts.tm_hour > 23 ||
491 ts.tm_min > 59 || ts.tm_sec > 61)
494 if (ts.tm_mday == 0) {
495 com_err(program_name, 0,
496 _("Couldn't parse date/time specifier: %s"),
500 return (mktime(&ts));
503 static void parse_tune2fs_options(int argc, char **argv)
510 printf("tune2fs %s (%s)\n", E2FSPROGS_VERSION, E2FSPROGS_DATE);
511 while ((c = getopt(argc, argv, "c:e:fg:i:jlm:o:r:s:u:C:J:L:M:O:T:U:")) != EOF)
515 max_mount_count = strtol (optarg, &tmp, 0);
516 if (*tmp || max_mount_count > 16000) {
517 com_err (program_name, 0,
518 _("bad mounts count - %s"),
522 if (max_mount_count == 0)
523 max_mount_count = -1;
525 open_flag = EXT2_FLAG_RW;
528 mount_count = strtoul (optarg, &tmp, 0);
529 if (*tmp || mount_count > 16000) {
530 com_err (program_name, 0,
531 _("bad mounts count - %s"),
536 open_flag = EXT2_FLAG_RW;
539 if (strcmp (optarg, "continue") == 0)
540 errors = EXT2_ERRORS_CONTINUE;
541 else if (strcmp (optarg, "remount-ro") == 0)
542 errors = EXT2_ERRORS_RO;
543 else if (strcmp (optarg, "panic") == 0)
544 errors = EXT2_ERRORS_PANIC;
546 com_err (program_name, 0,
547 _("bad error behavior - %s"),
552 open_flag = EXT2_FLAG_RW;
554 case 'f': /* Force */
558 resgid = strtoul (optarg, &tmp, 0);
560 gr = getgrnam (optarg);
569 com_err (program_name, 0,
570 _("bad gid/group name - %s"),
575 open_flag = EXT2_FLAG_RW;
578 interval = strtoul (optarg, &tmp, 0);
591 case 'M': /* months! */
592 interval *= 86400 * 30;
596 case 'W': /* weeks */
597 interval *= 86400 * 7;
601 if (*tmp || interval > (365 * 86400)) {
602 com_err (program_name, 0,
603 _("bad interval - %s"), optarg);
607 open_flag = EXT2_FLAG_RW;
612 open_flag = EXT2_FLAG_RW;
615 parse_journal_opts(optarg);
616 open_flag = EXT2_FLAG_RW;
624 open_flag = EXT2_FLAG_RW |
625 EXT2_FLAG_JOURNAL_DEV_OK;
628 reserved_ratio = strtoul (optarg, &tmp, 0);
629 if (*tmp || reserved_ratio > 50) {
630 com_err (program_name, 0,
631 _("bad reserved block ratio - %s"),
636 open_flag = EXT2_FLAG_RW;
639 new_last_mounted = optarg;
641 open_flag = EXT2_FLAG_RW;
645 com_err (program_name, 0,
646 _("-o may only be specified once"));
649 mntopts_cmd = optarg;
650 open_flag = EXT2_FLAG_RW;
655 com_err (program_name, 0,
656 _("-O may only be specified once"));
659 features_cmd = optarg;
660 open_flag = EXT2_FLAG_RW;
663 reserved_blocks = strtoul (optarg, &tmp, 0);
665 com_err (program_name, 0,
666 _("bad reserved blocks count - %s"),
671 open_flag = EXT2_FLAG_RW;
674 s_flag = atoi(optarg);
675 open_flag = EXT2_FLAG_RW;
679 last_check_time = parse_time(optarg);
680 open_flag = EXT2_FLAG_RW;
683 resuid = strtoul (optarg, &tmp, 0);
685 pw = getpwnam (optarg);
694 com_err (program_name, 0,
695 _("bad uid/user name - %s"),
700 open_flag = EXT2_FLAG_RW;
705 open_flag = EXT2_FLAG_RW |
706 EXT2_FLAG_JOURNAL_DEV_OK;
711 if (optind < argc - 1 || optind == argc)
713 if (!open_flag && !l_flag)
715 io_options = strchr(argv[optind], '?');
718 device_name = blkid_get_devname(NULL, argv[optind], NULL);
720 com_err("tune2fs", 0, _("Unable to resolve '%s'"),
726 void do_findfs(int argc, char **argv)
731 (strncmp(argv[1], "LABEL=", 6) && strncmp(argv[1], "UUID=", 5))) {
732 fprintf(stderr, "Usage: findfs LABEL=<label>|UUID=<uuid>\n");
735 dev = blkid_get_devname(NULL, argv[1], NULL);
737 com_err("findfs", 0, _("Unable to resolve '%s'"),
746 int main (int argc, char ** argv)
750 struct ext2_super_block *sb;
754 setlocale(LC_MESSAGES, "");
755 setlocale(LC_CTYPE, "");
756 bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
757 textdomain(NLS_CAT_NAME);
760 program_name = *argv;
761 initialize_ext2_error_table();
763 if (strcmp(get_progname(argv[0]), "findfs") == 0)
764 do_findfs(argc, argv);
765 if (strcmp(get_progname(argv[0]), "e2label") == 0)
766 parse_e2label_options(argc, argv);
768 parse_tune2fs_options(argc, argv);
770 #ifdef CONFIG_TESTIO_DEBUG
771 io_ptr = test_io_manager;
772 test_io_backing_manager = unix_io_manager;
774 io_ptr = unix_io_manager;
776 retval = ext2fs_open2(device_name, io_options, open_flag,
779 com_err (program_name, retval, _("while trying to open %s"),
782 _("Couldn't find valid filesystem superblock.\n"));
787 /* For e2label emulation */
788 printf("%.*s\n", (int) sizeof(sb->s_volume_name),
792 retval = ext2fs_check_if_mounted(device_name, &mount_flags);
794 com_err("ext2fs_check_if_mount", retval,
795 _("while determining whether %s is mounted."),
799 /* Normally we only need to write out the superblock */
800 fs->flags |= EXT2_FLAG_SUPER_ONLY;
803 sb->s_max_mnt_count = max_mount_count;
804 ext2fs_mark_super_dirty(fs);
805 printf (_("Setting maximal mount count to %d\n"),
809 sb->s_mnt_count = mount_count;
810 ext2fs_mark_super_dirty(fs);
811 printf (_("Setting current mount count to %d\n"), mount_count);
814 sb->s_errors = errors;
815 ext2fs_mark_super_dirty(fs);
816 printf (_("Setting error behavior to %d\n"), errors);
819 sb->s_def_resgid = resgid;
820 ext2fs_mark_super_dirty(fs);
821 printf (_("Setting reserved blocks gid to %lu\n"), resgid);
824 sb->s_checkinterval = interval;
825 ext2fs_mark_super_dirty(fs);
826 printf (_("Setting interval between check %lu seconds\n"), interval);
829 sb->s_r_blocks_count = (sb->s_blocks_count / 100)
831 ext2fs_mark_super_dirty(fs);
832 printf (_("Setting reserved blocks percentage to %lu (%u blocks)\n"),
833 reserved_ratio, sb->s_r_blocks_count);
836 if (reserved_blocks >= sb->s_blocks_count/2) {
837 com_err (program_name, 0,
838 _("reserved blocks count is too big (%lu)"),
842 sb->s_r_blocks_count = reserved_blocks;
843 ext2fs_mark_super_dirty(fs);
844 printf (_("Setting reserved blocks count to %lu\n"),
848 if (sb->s_feature_ro_compat &
849 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)
850 fputs(_("\nThe filesystem already has sparse "
851 "superblocks.\n"), stderr);
853 sb->s_feature_ro_compat |=
854 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
855 sb->s_state &= ~EXT2_VALID_FS;
856 ext2fs_mark_super_dirty(fs);
857 printf(_("\nSparse superblock flag set. %s"),
862 if (!(sb->s_feature_ro_compat &
863 EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER))
864 fputs(_("\nThe filesystem already has sparse "
865 "superblocks disabled.\n"), stderr);
867 sb->s_feature_ro_compat &=
868 ~EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
869 sb->s_state &= ~EXT2_VALID_FS;
870 fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
871 ext2fs_mark_super_dirty(fs);
872 printf(_("\nSparse superblock flag cleared. %s"),
877 sb->s_lastcheck = last_check_time;
878 ext2fs_mark_super_dirty(fs);
879 printf(_("Setting time filesystem last checked to %s\n"),
880 ctime(&last_check_time));
883 sb->s_def_resuid = resuid;
884 ext2fs_mark_super_dirty(fs);
885 printf (_("Setting reserved blocks uid to %lu\n"), resuid);
888 if (strlen(new_label) > sizeof(sb->s_volume_name))
889 fputs(_("Warning: label too long, truncating.\n"),
891 memset(sb->s_volume_name, 0, sizeof(sb->s_volume_name));
892 strncpy(sb->s_volume_name, new_label,
893 sizeof(sb->s_volume_name));
894 ext2fs_mark_super_dirty(fs);
897 memset(sb->s_last_mounted, 0, sizeof(sb->s_last_mounted));
898 strncpy(sb->s_last_mounted, new_last_mounted,
899 sizeof(sb->s_last_mounted));
900 ext2fs_mark_super_dirty(fs);
903 update_mntopts(fs, mntopts_cmd);
905 update_feature_set(fs, features_cmd);
906 if (journal_size || journal_device)
910 if ((strcasecmp(new_UUID, "null") == 0) ||
911 (strcasecmp(new_UUID, "clear") == 0)) {
912 uuid_clear(sb->s_uuid);
913 } else if (strcasecmp(new_UUID, "time") == 0) {
914 uuid_generate_time(sb->s_uuid);
915 } else if (strcasecmp(new_UUID, "random") == 0) {
916 uuid_generate(sb->s_uuid);
917 } else if (uuid_parse(new_UUID, sb->s_uuid)) {
918 com_err(program_name, 0, _("Invalid UUID format\n"));
921 ext2fs_mark_super_dirty(fs);
926 return (ext2fs_close (fs) ? 1 : 0);