]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Prevent setsize ioctl warnings in repair when running in dangerous mode.
authorNathan Scott <nathans@sgi.com>
Fri, 19 Mar 2004 01:56:50 +0000 (01:56 +0000)
committerNathan Scott <nathans@sgi.com>
Fri, 19 Mar 2004 01:56:50 +0000 (01:56 +0000)
repair/init.c
repair/xfs_repair.c

index b7dc6e0f044068ff39252bc3167cb75f75f33e8b..5ef47c0c385eb8a2f3b5f67a4919af92eb17e9e9 100644 (file)
@@ -66,14 +66,12 @@ xfs_init(libxfs_init_t *args)
 
        args->notvolmsg = _("you should never get this message - %s");
        args->notvolok = 1;
-       args->setblksize = 1;
+       args->setblksize = !dangerously;
 
        if (no_modify)
                args->isreadonly = (LIBXFS_ISREADONLY | LIBXFS_ISINACTIVE);
-       
-       if(dangerously)
+       else if (dangerously)
                args->isreadonly = (LIBXFS_ISINACTIVE | LIBXFS_DANGEROUSLY);
-       
 
        if (!libxfs_init(args))
                do_error(_("couldn't initialize XFS library\n"));
index 1effeaadab00c357325d046a0fe0ecb1b2666a8d..f1225f68f02a29115c86bd81f06ab02b72dcb5c2 100644 (file)
@@ -238,15 +238,15 @@ process_args(int argc, char **argv)
                case 'n':
                        no_modify = 1;
                        break;
+               case 'd':
+                       dangerously = 1;
+                       break;
                case 'v':
                        verbose = 1;
                        break;
                case 'V':
                        printf(_("%s version %s\n"), progname, VERSION);
                        exit(0);
-               case 'd': /* dangerously */
-                       dangerously = 1;
-                       break;
                case '?':
                        usage();
                }