From: Nathan Scott Date: Fri, 19 Mar 2004 01:56:50 +0000 (+0000) Subject: Prevent setsize ioctl warnings in repair when running in dangerous mode. X-Git-Tag: v2.7.0~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6089b6f04be5664d57053124c4ca592e3840250f;p=thirdparty%2Fxfsprogs-dev.git Prevent setsize ioctl warnings in repair when running in dangerous mode. --- diff --git a/repair/init.c b/repair/init.c index b7dc6e0f0..5ef47c0c3 100644 --- a/repair/init.c +++ b/repair/init.c @@ -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")); diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c index 1effeaada..f1225f68f 100644 --- a/repair/xfs_repair.c +++ b/repair/xfs_repair.c @@ -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(); }