From 887651bdeaa22c4cd2936b7d098987bc003df1ca Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 11 Apr 2003 06:43:46 +0000 Subject: [PATCH] Fix MD superblock state interpretation issues, and xfsprogs configure.in. --- VERSION | 2 +- configure.in | 56 ++++++++++++++++++++++++++++++++++-------------- debian/changelog | 6 ++++++ doc/CHANGES | 9 ++++++-- libdisk/md.c | 10 +++++++-- libdisk/md.h | 5 ++++- po/xfsprogs.pot | 6 +++++- 7 files changed, 71 insertions(+), 23 deletions(-) diff --git a/VERSION b/VERSION index defdf9551..ffa0cc7bf 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=4 -PKG_REVISION=5 +PKG_REVISION=6 PKG_BUILD=0 diff --git a/configure.in b/configure.in index 574d3c067..a414fdc25 100644 --- a/configure.in +++ b/configure.in @@ -61,32 +61,44 @@ cc=$CC AC_SUBST(cc) dnl check if users wants their own make -test -z "$MAKE" && AC_PATH_PROG(MAKE, make, /usr/bin/make) +if test -z "$MAKE"; then + AC_PATH_PROG(MAKE, make, /usr/bin/make) +fi make=$MAKE AC_SUBST(make) dnl check if users wants their own linker -test -z "$LD" && AC_PATH_PROG(LD, ld, /usr/bin/ld) +if test -z "$LD"; then + AC_PATH_PROG(LD, ld, /usr/bin/ld) +fi ld=$LD AC_SUBST(ld) dnl check if the tar program is available -test -z "$TAR" && AC_PATH_PROG(TAR, tar) +if test -z "$TAR"; then + AC_PATH_PROG(TAR, tar, /bin/tar) +fi tar=$TAR AC_SUBST(tar) dnl check if the gzip program is available -test -z "$ZIP" && AC_PATH_PROG(ZIP, gzip, /bin/gzip) +if test -z "$ZIP"; then + AC_PATH_PROG(ZIP, gzip, /bin/gzip) +fi zip=$ZIP AC_SUBST(zip) dnl check if the makedepend program is available -test -z "$MAKEDEPEND" && AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true) +if test -z "$MAKEDEPEND"; then + AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true) +fi makedepend=$MAKEDEPEND AC_SUBST(makedepend) dnl check if the rpm program is available -test -z "$RPM" && AC_PATH_PROG(RPM, rpm, /bin/rpm) +if test -z "$RPM"; then + AC_PATH_PROG(RPM, rpm, /bin/rpm) +fi rpm=$RPM AC_SUBST(rpm) @@ -112,18 +124,26 @@ dnl check if symbolic links are supported AC_PROG_LN_S dnl check if user wants their own awk, sed and echo -test -z "$AWK" && AC_PATH_PROG(AWK, awk, /bin/awk) +if test -z "$AWK"; then + AC_PATH_PROG(AWK, awk, /bin/awk) +fi awk=$AWK AC_SUBST(awk) -test -z "$SED" && AC_PATH_PROG(SED, sed, /bin/sed) +if test -z "$SED"; then + AC_PATH_PROG(SED, sed, /bin/sed) +fi sed=$SED AC_SUBST(sed) -test -z "$ECHO" && AC_PATH_PROG(ECHO, echo, /bin/echo) +if test -z "$ECHO"; then + AC_PATH_PROG(ECHO, echo, /bin/echo) +fi echo=$ECHO AC_SUBST(echo) dnl ensure libtool is installed -test -z "$LIBTOOL" && AC_PATH_PROG(LIBTOOL, libtool,,/usr/bin) +if test -z "$LIBTOOL"; then + AC_PATH_PROG(LIBTOOL, libtool,,/usr/bin) +fi if test "$LIBTOOL" = ""; then echo echo 'FATAL ERROR: libtool does not seem to be installed.' @@ -159,14 +179,19 @@ AC_SUBST(enable_gettext) dnl check if the msgfmt, msgmerge, xgettext programs are available if test "$enable_gettext" = yes; then - test -z "$MSGFMT" && AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt) + if test -z "$MSGFMT"; then + AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt) + fi msgfmt=$MSGFMT AC_SUBST(msgfmt) - test -z "$MSGMERGE" && AC_CHECK_PROG(MSGMERGE, msgmerge, /usr/bin/msgmerge) + if test -z "$MSGMERGE"; then + AC_CHECK_PROG(MSGMERGE, msgmerge, /usr/bin/msgmerge) + fi msgmerge=$MSGMERGE AC_SUBST(msgmerge) - - test -z "$XGETTEXT" && AC_CHECK_PROG(XGETTEXT, xgettext, /usr/bin/xgettext) + if test -z "$XGETTEXT"; then + AC_CHECK_PROG(XGETTEXT, xgettext, /usr/bin/xgettext) + fi xgettext=$XGETTEXT AC_SUBST(xgettext) @@ -247,8 +272,7 @@ dnl also check if man page source is gzipped dnl (usually on Debian, but not Redhat pre-7.0) have_zipped_manpages=false for d in ${prefix}/share/man ${prefix}/man ; do - if test -f $d/man1/man.1.gz - then + if test -f $d/man1/man.1.gz; then have_zipped_manpages=true break fi diff --git a/debian/changelog b/debian/changelog index 31db74956..ae1553383 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xfsprogs (2.4.5-1) unstable; urgency=low + + * New upstream release + + -- Nathan Scott Fri, 11 Apr 2003 16:18:27 +1000 + xfsprogs (2.4.4-1) unstable; urgency=low * New upstream release diff --git a/doc/CHANGES b/doc/CHANGES index c962ba0de..5e110964c 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,6 +1,11 @@ +xfsprogs-2.4.6 (11 April 2003) + - Fix a bug in detection of "clean" and "error" states with + MD devices. + - Fix configure tests that used AC_PATH_PROG incorrectly. + xfsprogs-2.4.5 (03 April 2003) - - Sync up xfs_inode.c in libxfs - - Implement get_unaligned/put_unaligned in libxfs + - Sync up xfs_inode.c in libxfs. + - Implement get_unaligned/put_unaligned in libxfs. xfsprogs-2.4.4 (30 March 2003) - Correct display of imaxpct in mkfs.xfs output. diff --git a/libdisk/md.c b/libdisk/md.c index 85dd3efa9..2aee6d290 100644 --- a/libdisk/md.c +++ b/libdisk/md.c @@ -70,8 +70,14 @@ md_get_subvol_stripe( close(fd); /* Check state */ - if (md.state) { - fprintf(stderr, _("MD array %s not in clean state\n"), + if (!(md.state & (1 << MD_SB_CLEAN))) { + fprintf(stderr, + _("warning - MD array %s not in clean state\n"), + dfile); + } + if (md.state & (1 << MD_SB_ERRORS)) { + fprintf(stderr, + _("warning - MD array %s in error state\n"), dfile); exit(1); } diff --git a/libdisk/md.h b/libdisk/md.h index 491733906..a237a0470 100644 --- a/libdisk/md.h +++ b/libdisk/md.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -36,6 +36,9 @@ #define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, struct md_array_info) +#define MD_SB_CLEAN 0 +#define MD_SB_ERRORS 1 + struct md_array_info { /* * Generic constant information diff --git a/po/xfsprogs.pot b/po/xfsprogs.pot index ecafc8e5a..96f63d1ff 100644 --- a/po/xfsprogs.pot +++ b/po/xfsprogs.pot @@ -1199,7 +1199,11 @@ msgid "Error getting MD array info from %s\n" msgstr "" #, c-format -msgid "MD array %s not in clean state\n" +msgid "warning - MD array %s not in clean state\n" +msgstr "" + +#, c-format +msgid "warning - MD array %s in error state\n" msgstr "" #, c-format -- 2.47.2