Mailinglist Archive: opensuse-commit (1828 mails)
| < Previous | Next > |
commit device-mapper
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Sat, 13 Sep 2008 00:16:48 +0200
- Message-id: <20080912221649.39616678164@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package device-mapper
checked in at Sat Sep 13 00:16:48 CEST 2008.
--------
--- device-mapper/device-mapper.changes 2008-09-03 11:29:48.000000000 +0200
+++ device-mapper/device-mapper.changes 2008-09-10 11:46:26.080049000 +0200
@@ -1,0 +2,11 @@
+Wed Sep 10 11:56:17 CEST 2008 - xwhu@xxxxxxx
+
+- update to 1.02.27
+ Align struct memblock in dbg_malloc for sparc.
+ Add --unquoted and --rows to dmsetup.
+ Avoid compiler warning about cast in dmsetup.c's OFFSET_OF macro.
+ Fix inverted no_flush debug message.
+ Remove --enable-jobs from configure. (Set at runtime instead.)
+ Bring configure.in and list.h into line with the lvm2 versions.
+
+-------------------------------------------------------------------
Old:
----
device-mapper.1.02.26.tar.bz2
New:
----
device-mapper.1.02.27.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ device-mapper.spec ++++++
--- /var/tmp/diff_new_pack.Kb7565/_old 2008-09-13 00:15:03.000000000 +0200
+++ /var/tmp/diff_new_pack.Kb7565/_new 2008-09-13 00:15:03.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package device-mapper (Version 1.02.26)
+# spec file for package device-mapper (Version 1.02.27)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -21,8 +21,8 @@
License: GPL v2 or later; LGPL v2.1 or later
Group: System/Base
AutoReqProv: on
-Version: 1.02.26
-Release: 26
+Version: 1.02.27
+Release: 1
Summary: Device Mapper Tools
Source: device-mapper.%{version}.tar.bz2
Source1: boot.device-mapper
@@ -128,6 +128,14 @@
/usr/include/libdevmapper-event.h
%changelog
+* Wed Sep 10 2008 xwhu@xxxxxxx
+- update to 1.02.27
+ Align struct memblock in dbg_malloc for sparc.
+ Add --unquoted and --rows to dmsetup.
+ Avoid compiler warning about cast in dmsetup.c's OFFSET_OF macro.
+ Fix inverted no_flush debug message.
+ Remove --enable-jobs from configure. (Set at runtime instead.)
+ Bring configure.in and list.h into line with the lvm2 versions.
* Wed Sep 03 2008 hare@xxxxxxx
- Call mkinitrd_setup during %%post and %%postun (bnc#413709)
* Mon Aug 25 2008 prusnak@xxxxxxx
++++++ device-mapper.1.02.26.tar.bz2 -> device-mapper.1.02.27.tar.bz2 ++++++
++++ 4750 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/configure.in new/device-mapper.1.02.27/configure.in
--- old/device-mapper.1.02.26/configure.in 2007-10-10 02:02:03.000000000
+0200
+++ new/device-mapper.1.02.27/configure.in 2008-06-06 22:44:35.000000000
+0200
@@ -1,6 +1,6 @@
###############################################################################
## Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
-## Copyright (C) 2004 Red Hat, Inc. All rights reserved.
+## Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
##
## This file is part of the device-mapper userspace tools.
##
@@ -11,7 +11,6 @@
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-## MA 02111-1307, USA
################################################################################
AC_PREREQ(2.57)
@@ -19,13 +18,11 @@
dnl -- Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([lib/libdevmapper.h])
-
-################################################################################
AC_CONFIG_HEADERS(include/configure.h)
################################################################################
dnl -- Setup the directory where autoconf has auxilary files
-AC_CONFIG_AUX_DIR(autoconf)
+AC_CONFIG_AUX_DIR(autoconf)
################################################################################
dnl -- Get system type
@@ -33,21 +30,35 @@
case "$host_os" in
linux*)
- CFLAGS="$CFLAGS"
COPTIMISE_FLAG="-O2"
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
+ CLDWHOLEARCHIVE="-Wl,-whole-archive"
+ CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
LDDEPS="$LDDEPS .export.sym"
- LIB_SUFFIX="so"
- DMIOCTLS="yes"
- SELINUX="yes" ;;
+ LIB_SUFFIX=so
+ DEVMAPPER=yes
+ ODIRECT=yes
+ DM_IOCTLS=yes
+ SELINUX=yes
+ REALTIME=yes
+ CLUSTER=internal
+ FSADM=no
+ ;;
darwin*)
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
COPTIMISE_FLAG="-O2"
CLDFLAGS="$CLDFLAGS"
- LDDEPS="$LDDEPS"
- LIB_SUFFIX="dylib"
- DMIOCTLS="no"
- SELINUX="no" ;;
+ CLDWHOLEARCHIVE="-all_load"
+ CLDNOWHOLEARCHIVE=
+ LIB_SUFFIX=dylib
+ DEVMAPPER=yes
+ ODIRECT=no
+ DM_IOCTLS=no
+ SELINUX=no
+ REALTIME=no
+ CLUSTER=none
+ FSADM=no
+ ;;
esac
################################################################################
@@ -55,26 +66,34 @@
usrlibdir='${prefix}/lib'
################################################################################
-dnl -- Checks for programs.
+dnl -- Check for programs.
AC_PROG_AWK
AC_PROG_CC
+
+dnl probably no longer needed in 2008, but...
AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
+AC_PATH_PROG(CFLOW_CMD, cflow)
+AC_PATH_PROG(CSCOPE_CMD, cscope)
+
################################################################################
-dnl -- Checks for header files.
+dnl -- Check for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
AC_HEADER_TIME
-AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h limits.h
stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h
sys/types.h unistd.h,,AC_MSG_ERROR(bailing out))
-
+AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h getopt.h inttypes.h
limits.h \
+ stdarg.h stdio.h stdlib.h string.h sys/ioctl.h sys/param.h sys/stat.h \
+ sys/types.h unistd.h], , [AC_MSG_ERROR(bailing out)])
AC_CHECK_HEADERS(termios.h sys/statvfs.h)
+
################################################################################
-dnl -- Checks for typedefs, structures, and compiler characteristics.
+dnl -- Check for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_CHECK_MEMBERS([struct stat.st_rdev])
@@ -82,13 +101,24 @@
AC_TYPE_PID_T
AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
+AC_TYPE_MODE_T
+AC_CHECK_MEMBERS([struct stat.st_rdev])
+AC_STRUCT_TM
################################################################################
-dnl -- Checks for functions
-AC_CHECK_FUNCS(memset mkdir rmdir strchr strdup strerror strrchr
uname,,AC_MSG_ERROR(bailing out))
+dnl -- Check for functions
+AC_CHECK_FUNCS([gethostname getpagesize memset mkdir rmdir munmap setlocale \
+ strcasecmp strchr strdup strncasecmp strerror strrchr strstr strtol strtoul \
+ uname], , [AC_MSG_ERROR(bailing out)])
+AC_FUNC_ALLOCA
AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_FORK
+AC_FUNC_LSTAT
AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_MMAP
AC_FUNC_STAT
+AC_FUNC_STRTOD
AC_FUNC_VPRINTF
################################################################################
@@ -96,10 +126,6 @@
AC_PREFIX_DEFAULT(/usr)
################################################################################
-dnl -- Parallel make jobs?
-AC_ARG_ENABLE(jobs, [ --enable-jobs=NUM Number of jobs to run
simultaneously], JOBS=-j$enableval)
-
-################################################################################
dnl -- Setup the ownership of the files
AC_MSG_CHECKING(file owner)
OWNER="root"
@@ -132,8 +158,8 @@
AC_ARG_WITH(device-uid,
[ --with-device-uid=UID Set the owner used for new device nodes [[UID=0]]
],
- [ DEVICE_UID="$withval" ], [ DEVICE_UID="0" ] )
-AC_MSG_RESULT($DEVICE_UID)
+ [ DM_DEVICE_UID="$withval" ], [ DM_DEVICE_UID="0" ] )
+AC_MSG_RESULT($DM_DEVICE_UID)
################################################################################
dnl -- Setup device group ownership
@@ -141,8 +167,8 @@
AC_ARG_WITH(device-gid,
[ --with-device-gid=UID Set the group used for new device nodes [[GID=0]]
],
- [ DEVICE_GID="$withval" ], [ DEVICE_GID="0" ] )
-AC_MSG_RESULT($DEVICE_GID)
+ [ DM_DEVICE_GID="$withval" ], [ DM_DEVICE_GID="0" ] )
+AC_MSG_RESULT($DM_DEVICE_GID)
################################################################################
dnl -- Setup device mode
@@ -150,19 +176,21 @@
AC_ARG_WITH(device-mode,
[ --with-device-mode=MODE Set the mode used for new device nodes
[[MODE=0600]] ],
- [ DEVICE_MODE="$withval" ], [ DEVICE_MODE="0600" ] )
-AC_MSG_RESULT($DEVICE_MODE)
+ [ DM_DEVICE_MODE="$withval" ], [ DM_DEVICE_MODE="0600" ] )
+AC_MSG_RESULT($DM_DEVICE_MODE)
################################################################################
-dnl -- Enable Debugging
+dnl -- Enable debugging
AC_MSG_CHECKING(whether to enable debugging)
AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging],
-DEBUG=$enableval, DEBUG=no)
+ DEBUG=$enableval, DEBUG=no)
AC_MSG_RESULT($DEBUG)
dnl -- Normally turn off optimisation for debug builds
if test x$DEBUG = xyes; then
COPTIMISE_FLAG=
+else
+ CSCOPE_CMD=
fi
################################################################################
@@ -174,29 +202,24 @@
AC_MSG_RESULT($COPTIMISE_FLAG)
################################################################################
-dnl -- Disable Compatibility mode
+dnl -- Compatibility mode
AC_ARG_ENABLE(compat, [ --enable-compat Enable support for old
device-mapper versions],
-COMPAT=$enableval, COMPAT=no)
+ DM_COMPAT=$enableval, DM_COMPAT=no)
################################################################################
dnl -- Disable ioctl
AC_ARG_ENABLE(ioctl, [ --disable-driver Disable calls to
device-mapper in the kernel],
-DMIOCTLS=$enableval)
+ DM_IOCTLS=$enableval)
################################################################################
dnl -- Enable dmeventd
AC_ARG_ENABLE(dmeventd, [ --enable-dmeventd Build the new event
daemon],
-DMEVENTD=$enableval, DMEVENTD=no)
+ BUILD_DMEVENTD=$enableval, BUILD_DMEVENTD=no)
################################################################################
dnl -- Enable pkg-config
AC_ARG_ENABLE(pkgconfig, [ --enable-pkgconfig Install pkgconfig
support],
-PKGCONFIG=$enableval, PKGCONFIG=no)
-
-################################################################################
-dnl -- Enables staticly-linked tools
-AC_ARG_ENABLE(static_link, [ --enable-static_link Use this to link the
tools to their libraries
- statically. Default is dynamic linking],
STATIC_LINK=$enableval, STATIC_LINK=no)
+ PKGCONFIG=$enableval, PKGCONFIG=no)
################################################################################
dnl -- Clear default exec_prefix - install into /sbin rather than /usr/sbin
@@ -204,53 +227,65 @@
then exec_prefix="";
fi;
-
################################################################################
dnl -- getline included in recent libc
-AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1, [Define to 1 if getline
is available.]))
+AC_CHECK_LIB(c, getline, AC_DEFINE([HAVE_GETLINE], 1,
+ [Define to 1 if getline is available.]))
################################################################################
dnl -- canonicalize_file_name included in recent libc
-AC_CHECK_LIB(c, canonicalize_file_name,
AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1, [Define to 1 if
canonicalize_file_name is available.]))
+AC_CHECK_LIB(c, canonicalize_file_name,
+ AC_DEFINE([HAVE_CANONICALIZE_FILE_NAME], 1,
+ [Define to 1 if canonicalize_file_name is available.]))
+
+################################################################################
+dnl -- Enables statically-linked tools
+AC_MSG_CHECKING(whether to use static linking)
+AC_ARG_ENABLE(static_link,
+ [ --enable-static_link Use this to link the tools to their libraries
+ statically. Default is dynamic linking],
+ STATIC_LINK=$enableval, STATIC_LINK=no)
+AC_MSG_RESULT($STATIC_LINK)
################################################################################
dnl -- Disable selinux
AC_MSG_CHECKING(whether to enable selinux support)
AC_ARG_ENABLE(selinux, [ --disable-selinux Disable selinux support],
-SELINUX=$enableval)
+ SELINUX=$enableval)
AC_MSG_RESULT($SELINUX)
-
+
################################################################################
dnl -- Check for selinux
if test x$SELINUX = xyes; then
AC_CHECK_LIB(sepol, sepol_check_context, HAVE_SEPOL=yes, HAVE_SEPOL=no)
if test x$HAVE_SEPOL = xyes; then
- AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context
is available.])
+ AC_DEFINE([HAVE_SEPOL], 1,
+ [Define to 1 if sepol_check_context is available.])
LIBS="-lsepol $LIBS"
fi
AC_CHECK_LIB(selinux, is_selinux_enabled, HAVE_SELINUX=yes,
HAVE_SELINUX=no)
if test x$HAVE_SELINUX = xyes; then
- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 if selinux is
available.])
+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support
for selinux.])
LIBS="-lselinux $LIBS"
else
AC_MSG_WARN(Disabling selinux)
fi
- # With --enable-static_link and selinux enabled, linking dmsetup
+ # With --enable-static_link and selinux enabled, linking
# fails on at least Debian unstable due to unsatisfied references
# to pthread_mutex_lock and _unlock. See if we need -lpthread.
if test "$STATIC_LINK-$HAVE_SELINUX" = yes-yes; then
- dm_saved_libs=$LIBS
+ lvm_saved_libs=$LIBS
LIBS="$LIBS -static"
AC_SEARCH_LIBS([pthread_mutex_lock], [pthread],
[test "$ac_cv_search_pthread_mutex_lock" = "none required" ||
LIB_PTHREAD=-lpthread])
- LIBS=$dm_saved_libs
+ LIBS=$lvm_saved_libs
fi
fi
@@ -259,6 +294,22 @@
AC_CHECK_HEADERS(getopt.h, AC_DEFINE([HAVE_GETOPTLONG], 1, [Define to 1 if
getopt_long is available.]))
################################################################################
+dnl -- Check for readline (Shamelessly copied from parted 1.4.17)
+if test x$READLINE = xyes; then
+ AC_CHECK_LIB(readline, readline, ,
+ AC_MSG_ERROR(
+GNU Readline could not be found which is required for the
+--enable-readline option (which is enabled by default). Either disable
readline
+support with --disable-readline or download and install readline from:
+ ftp.gnu.org/gnu/readline
+Note: if you are using precompiled packages you will also need the development
+package as well (which may be called readline-devel or something similar).
+)
+ )
+ AC_CHECK_FUNC(rl_completion_matches,
AC_DEFINE([HAVE_RL_COMPLETION_MATCHES], 1, [Define to 1 if
rl_completion_matches() is available.]))
+fi
+
+################################################################################
dnl -- Internationalisation stuff
AC_MSG_CHECKING(whether to enable internationalisation)
AC_ARG_ENABLE(nls, [ --enable-nls Enable Native Language Support],
@@ -275,12 +326,11 @@
fi;
AC_ARG_WITH(localedir,
- [ --with-localedir=DIR Translation files in DIR
[[PREFIX/share/locale]] ],
- [ LOCALEDIR="$withval" ],
- [ LOCALEDIR='${prefix}/share/locale' ])
+ [ --with-localedir=DIR Translation files in DIR
[[PREFIX/share/locale]] ],
+ [ LOCALEDIR="$withval" ],
+ [ LOCALEDIR='${prefix}/share/locale' ])
fi
-
################################################################################
dnl -- Where the linux src tree is
AC_MSG_CHECKING(for kernel directory)
@@ -330,7 +380,7 @@
fi
if test "x${kernelvsn}" = x; then
- if test "x${missingkernel}" = "x"; then
+ if test "x${missingkernel}" = "x"; then
kernelvsn=`awk -F ' = ' '/^VERSION/ {v=$2} /^PATCH/ {p=$2} /^SUBLEVEL/
{s=$2} /^EXTRAVERSION/ {e=$2} END {printf "%d.%d.%d%s",v,p,s,e}'
$kerneldir/Makefile`
else
kernelvsn="UNKNOWN"
@@ -364,26 +414,22 @@
fi
AC_MSG_RESULT($interface)
-if test "-f VERSION" ; then
- DM_LIB_VERSION="\"`cat VERSION|sed -e \"s/([[0-9.]]*)/\0-$interface/\"`\""
-else
- DM_LIB_VERSION="Unknown version ($interface)"
-fi
+DM_LIB_VERSION="\"`cat VERSION 2>/dev/null || echo Unknown`\""
AC_DEFINE_UNQUOTED(DM_LIB_VERSION, $DM_LIB_VERSION, [Library version])
################################################################################
dnl -- dmeventd pidfile and executable path
AH_TEMPLATE(DMEVENTD_PIDFILE, [Path to dmeventd pidfile.])
-if test "$DMEVENTD" = yes; then
+if test "$BUILD_DMEVENTD" = yes; then
AC_ARG_WITH(dmeventd-pidfile,
- [ --with-dmeventd-pidfile=PATH dmeventd pidfile
[[/var/run/dmeventd.pid]] ],
- [ AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"$withval") ],
- [
AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"/var/run/dmeventd.pid") ])
+ [ --with-dmeventd-pidfile=PATH dmeventd pidfile
[[/var/run/dmeventd.pid]] ],
+ [ AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"$withval") ],
+ [
AC_DEFINE_UNQUOTED(DMEVENTD_PIDFILE,"/var/run/dmeventd.pid") ])
fi
AH_TEMPLATE(DMEVENTD_PATH, [Path to dmeventd binary.])
-if test "$DMEVENTD" = yes; then
+if test "$BUILD_DMEVENTD" = yes; then
dmeventd_prefix="$exec_prefix"
if test "x$dmeventd_prefix" = "xNONE"; then
dmeventd_prefix="$prefix"
@@ -392,53 +438,75 @@
dmeventd_prefix=""
fi
AC_ARG_WITH(dmeventd-path,
- [ --with-dmeventd-path=PATH dmeventd path
[[${exec_prefix}/sbin/dmeventd]] ],
- [ AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$withval") ],
- [
AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$dmeventd_prefix/sbin/dmeventd") ])
+ [ --with-dmeventd-path=PATH dmeventd path
[[${exec_prefix}/sbin/dmeventd]] ],
+ [ AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$withval") ],
+ [
AC_DEFINE_UNQUOTED(DMEVENTD_PATH,"$dmeventd_prefix/sbin/dmeventd") ])
fi
+
################################################################################
-AC_SUBST(usrlibdir)
-AC_SUBST(JOBS)
-AC_SUBST(STATIC_LINK)
-AC_SUBST(OWNER)
-AC_SUBST(GROUP)
-AC_SUBST(LIBS)
-AC_SUBST(interface)
-AC_SUBST(kerneldir)
-AC_SUBST(missingkernel)
-AC_SUBST(kernelvsn)
-AC_SUBST(tmpdir)
+AC_SUBST(BUILD_DMEVENTD)
AC_SUBST(CFLAGS)
-AC_SUBST(COPTIMISE_FLAG)
+AC_SUBST(CFLOW_CMD)
AC_SUBST(CLDFLAGS)
-AC_SUBST(LDDEPS)
-AC_SUBST(LIB_SUFFIX)
+AC_SUBST(CLDNOWHOLEARCHIVE)
+AC_SUBST(CLDWHOLEARCHIVE)
+AC_SUBST(CLUSTER)
+AC_SUBST(CLVMD)
+AC_SUBST(CMDLIB)
+AC_SUBST(COPTIMISE_FLAG)
+AC_SUBST(CSCOPE_CMD)
AC_SUBST(DEBUG)
+AC_SUBST(DEVMAPPER)
+AC_SUBST(DMDIR)
+AC_SUBST(DM_COMPAT)
+AC_SUBST(DM_DEVICE_GID)
+AC_SUBST(DM_DEVICE_MODE)
+AC_SUBST(DM_DEVICE_UID)
+AC_SUBST(DM_IOCTLS)
AC_SUBST(DM_LIB_VERSION)
-AC_SUBST(COMPAT)
-AC_SUBST(DMIOCTLS)
-AC_SUBST(MSGFMT)
-AC_SUBST(LOCALEDIR)
-AC_SUBST(INTL_PACKAGE)
+AC_SUBST(FSADM)
+AC_SUBST(GROUP)
+AC_SUBST(HAVE_LIBDL)
+AC_SUBST(HAVE_REALTIME)
+AC_SUBST(HAVE_SELINUX)
AC_SUBST(INTL)
-AC_SUBST(DEVICE_UID)
-AC_SUBST(DEVICE_GID)
-AC_SUBST(DEVICE_MODE)
-AC_SUBST(DMEVENTD)
+AC_SUBST(INTL_PACKAGE)
+AC_SUBST(JOBS)
+AC_SUBST(LDDEPS)
+AC_SUBST(LIBS)
+AC_SUBST(LIB_SUFFIX)
+AC_SUBST(LOCALEDIR)
+AC_SUBST(LVM1)
+AC_SUBST(LVM1_FALLBACK)
+AC_SUBST(LVM_CONF_DIR)
+AC_SUBST(LVM_VERSION)
+AC_SUBST(MIRRORS)
+AC_SUBST(MSGFMT)
+AC_SUBST(OWNER)
AC_SUBST(PKGCONFIG)
+AC_SUBST(POOL)
+AC_SUBST(SNAPSHOTS)
+AC_SUBST(STATICDIR)
+AC_SUBST(STATIC_LINK)
AC_SUBST([LIB_PTHREAD])
+AC_SUBST(interface)
+AC_SUBST(kerneldir)
+AC_SUBST(missingkernel)
+AC_SUBST(kernelvsn)
+AC_SUBST(tmpdir)
+AC_SUBST(usrlibdir)
################################################################################
-dnl -- First and last lines should not contain files to generate in order to
+dnl -- First and last lines should not contain files to generate in order to
dnl -- keep utility scripts running properly
AC_CONFIG_FILES([\
Makefile \
make.tmpl \
include/Makefile \
dmsetup/Makefile \
-lib/Makefile \
+lib/Makefile \
lib/libdevmapper.pc \
-dmeventd/Makefile \
+dmeventd/Makefile \
dmeventd/libdevmapper-event.pc \
kernel/Makefile
\
man/Makefile \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/dmsetup/dmsetup.c
new/device-mapper.1.02.27/dmsetup/dmsetup.c
--- old/device-mapper.1.02.26/dmsetup/dmsetup.c 2008-06-06 20:53:08.000000000
+0200
+++ new/device-mapper.1.02.27/dmsetup/dmsetup.c 2008-06-25 00:53:47.000000000
+0200
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
* Copyright (C) 2005-2007 NEC Corporation
*
* This file is part of the device-mapper userspace tools.
@@ -122,6 +122,7 @@
NOTABLE_ARG,
OPTIONS_ARG,
READAHEAD_ARG,
+ ROWS_ARG,
SEPARATOR_ARG,
SHOWKEYS_ARG,
SORT_ARG,
@@ -130,6 +131,7 @@
TREE_ARG,
UID_ARG,
UNBUFFERED_ARG,
+ UNQUOTED_ARG,
UUID_ARG,
VERBOSE_ARG,
VERSION_ARG,
@@ -1927,7 +1929,7 @@
};
/* Column definitions */
-#define OFFSET_OF(strct, field) ((unsigned int) &((struct strct *)NULL)->field)
+#define OFFSET_OF(strct, field) (((char*)&((struct strct*)0)->field) -
(char*)0)
#define STR (DM_REPORT_FIELD_TYPE_STRING)
#define NUM (DM_REPORT_FIELD_TYPE_NUMBER)
#define FIELD_O(type, strct, sorttype, head, field, width, func, id, desc)
{DR_ ## type, sorttype, OFFSET_OF(strct, field), width, id, head, &_ ## func ##
_disp, desc},
@@ -1976,6 +1978,7 @@
const char *keys = "";
const char *separator = " ";
int aligned = 1, headings = 1, buffered = 1, field_prefixes = 0;
+ int quoted = 1, columns_as_rows = 0;
uint32_t flags = 0;
size_t len = 0;
int r = 0;
@@ -1990,6 +1993,12 @@
if (_switches[UNBUFFERED_ARG])
buffered = 0;
+ if (_switches[ROWS_ARG])
+ columns_as_rows = 1;
+
+ if (_switches[UNQUOTED_ARG])
+ quoted = 0;
+
if (_switches[NAMEPREFIXES_ARG]) {
aligned = 0;
field_prefixes = 1;
@@ -2040,6 +2049,12 @@
if (field_prefixes)
flags |= DM_REPORT_OUTPUT_FIELD_NAME_PREFIX;
+ if (!quoted)
+ flags |= DM_REPORT_OUTPUT_FIELD_UNQUOTED;
+
+ if (columns_as_rows)
+ flags |= DM_REPORT_OUTPUT_COLUMNS_AS_ROWS;
+
if (!(_report = dm_report_init(&_report_type,
_report_types, _report_fields,
options, separator, flags, keys, NULL)))
@@ -2483,6 +2498,7 @@
{"notable", 0, &ind, NOTABLE_ARG},
{"options", 1, &ind, OPTIONS_ARG},
{"readahead", 1, &ind, READAHEAD_ARG},
+ {"rows", 0, &ind, ROWS_ARG},
{"separator", 1, &ind, SEPARATOR_ARG},
{"showkeys", 0, &ind, SHOWKEYS_ARG},
{"sort", 1, &ind, SORT_ARG},
@@ -2492,6 +2508,7 @@
{"uid", 1, &ind, UID_ARG},
{"uuid", 1, &ind, UUID_ARG},
{"unbuffered", 0, &ind, UNBUFFERED_ARG},
+ {"unquoted", 0, &ind, UNQUOTED_ARG},
{"verbose", 1, &ind, VERBOSE_ARG},
{"version", 0, &ind, VERSION_ARG},
{0, 0, 0, 0}
@@ -2638,6 +2655,8 @@
}
}
}
+ if ((ind == ROWS_ARG))
+ _switches[ROWS_ARG]++;
if ((ind == SHOWKEYS_ARG))
_switches[SHOWKEYS_ARG]++;
if ((ind == TABLE_ARG)) {
@@ -2646,8 +2665,8 @@
}
if ((ind == TREE_ARG))
_switches[TREE_ARG]++;
- if ((ind == UNBUFFERED_ARG))
- _switches[UNBUFFERED_ARG]++;
+ if ((ind == UNQUOTED_ARG))
+ _switches[UNQUOTED_ARG]++;
if ((ind == VERSION_ARG))
_switches[VERSION_ARG]++;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/include/configure.h.in
new/device-mapper.1.02.27/include/configure.h.in
--- old/device-mapper.1.02.26/include/configure.h.in 2007-08-14
21:11:31.000000000 +0200
+++ new/device-mapper.1.02.27/include/configure.h.in 2008-06-06
22:33:14.000000000 +0200
@@ -3,6 +3,14 @@
/* Define to 1 if the `closedir' function returns void instead of `int'. */
#undef CLOSEDIR_VOID
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
/* Path to dmeventd binary. */
#undef DMEVENTD_PATH
@@ -12,6 +20,13 @@
/* Library version */
#undef DM_LIB_VERSION
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
/* Define to 1 if canonicalize_file_name is available. */
#undef HAVE_CANONICALIZE_FILE_NAME
@@ -30,6 +45,12 @@
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if you have the `gethostname' function. */
+#undef HAVE_GETHOSTNAME
+
/* Define to 1 if getline is available. */
#undef HAVE_GETLINE
@@ -39,12 +60,22 @@
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `readline' library (-lreadline). */
+#undef HAVE_LIBREADLINE
+
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
+/* Define to 1 if `lstat' has the bug that it succeeds when given the
+ zero-length file name argument. */
+#undef HAVE_LSTAT_EMPTY_STRING_BUG
+
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
@@ -58,18 +89,30 @@
/* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
+/* Define to 1 if rl_completion_matches() is available. */
+#undef HAVE_RL_COMPLETION_MATCHES
+
/* Define to 1 if you have the `rmdir' function. */
#undef HAVE_RMDIR
-/* Define to 1 if selinux is available. */
+/* Define to 1 to include support for selinux. */
#undef HAVE_SELINUX
/* Define to 1 if sepol_check_context is available. */
#undef HAVE_SEPOL
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
+
/* Define to 1 if `stat' has the bug that it succeeds when given the
zero-length file name argument. */
#undef HAVE_STAT_EMPTY_STRING_BUG
@@ -86,6 +129,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
@@ -101,9 +147,21 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
/* Define to 1 if `st_rdev' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_RDEV
@@ -130,6 +188,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
@@ -139,9 +200,21 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
@@ -164,12 +237,23 @@
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
@@ -182,6 +266,9 @@
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t
+
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
@@ -190,3 +277,6 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/include/list.h
new/device-mapper.1.02.27/include/list.h
--- old/device-mapper.1.02.26/include/list.h 2007-08-21 18:26:06.000000000
+0200
+++ new/device-mapper.1.02.27/include/list.h 2008-06-08 16:53:51.000000000
+0200
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
*
* This file is part of the device-mapper userspace tools.
*
@@ -81,9 +81,18 @@
}
/*
+ * Remove an element from existing list and insert before 'head'.
+ */
+static inline void list_move(struct list *head, struct list *elem)
+{
+ list_del(elem);
+ list_add(head, elem);
+}
+
+/*
* Is the list empty?
*/
-static inline int list_empty(struct list *head)
+static inline int list_empty(const struct list *head)
{
return head->n == head;
}
@@ -91,7 +100,7 @@
/*
* Is this the first element of the list?
*/
-static inline int list_start(struct list *head, struct list *elem)
+static inline int list_start(const struct list *head, const struct list *elem)
{
return elem->p == head;
}
@@ -99,7 +108,7 @@
/*
* Is this the last element of the list?
*/
-static inline int list_end(struct list *head, struct list *elem)
+static inline int list_end(const struct list *head, const struct list *elem)
{
return elem->n == head;
}
@@ -107,7 +116,7 @@
/*
* Return first element of the list or NULL if empty
*/
-static inline struct list *list_first(struct list *head)
+static inline struct list *list_first(const struct list *head)
{
return (list_empty(head) ? NULL : head->n);
}
@@ -115,7 +124,7 @@
/*
* Return last element of the list or NULL if empty
*/
-static inline struct list *list_last(struct list *head)
+static inline struct list *list_last(const struct list *head)
{
return (list_empty(head) ? NULL : head->p);
}
@@ -123,7 +132,7 @@
/*
* Return the previous element of the list, or NULL if we've reached the start.
*/
-static inline struct list *list_prev(struct list *head, struct list *elem)
+static inline struct list *list_prev(const struct list *head, const struct
list *elem)
{
return (list_start(head, elem) ? NULL : elem->p);
}
@@ -131,7 +140,7 @@
/*
* Return the next element of the list, or NULL if we've reached the end.
*/
-static inline struct list *list_next(struct list *head, struct list *elem)
+static inline struct list *list_next(const struct list *head, const struct
list *elem)
{
return (list_end(head, elem) ? NULL : elem->n);
}
@@ -204,6 +213,26 @@
#define list_iterate_items(v, head) list_iterate_items_gen(v, (head), list)
/*
+ * Walk a list, setting 'v' in turn to the containing structure of each item.
+ * The containing structure should be the same type as 'v'.
+ * The 'struct list' variable within the containing structure is 'field'.
+ * t must be defined as a temporary variable of the same type as v.
+ */
+#define list_iterate_items_gen_safe(v, t, head, field) \
+ for (v = list_struct_base((head)->n, typeof(*v), field), \
+ t = list_struct_base(v->field.n, typeof(*v), field); \
+ &v->field != (head); \
+ v = t, t = list_struct_base(v->field.n, typeof(*v), field))
+/*
+ * Walk a list, setting 'v' in turn to the containing structure of each item.
+ * The containing structure should be the same type as 'v'.
+ * The list should be 'struct list list' within the containing structure.
+ * t must be defined as a temporary variable of the same type as v.
+ */
+#define list_iterate_items_safe(v, t, head) \
+ list_iterate_items_gen_safe(v, t, (head), list)
+
+/*
* Walk a list backwards, setting 'v' in turn to the containing structure
* of each item.
* The containing structure should be the same type as 'v'.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/lib/libdevmapper.h
new/device-mapper.1.02.27/lib/libdevmapper.h
--- old/device-mapper.1.02.26/lib/libdevmapper.h 2008-04-20
02:11:08.000000000 +0200
+++ new/device-mapper.1.02.27/lib/libdevmapper.h 2008-06-25
00:53:48.000000000 +0200
@@ -740,6 +740,8 @@
#define DM_REPORT_OUTPUT_BUFFERED 0x00000002
#define DM_REPORT_OUTPUT_HEADINGS 0x00000004
#define DM_REPORT_OUTPUT_FIELD_NAME_PREFIX 0x00000008
+#define DM_REPORT_OUTPUT_FIELD_UNQUOTED 0x00000010
+#define DM_REPORT_OUTPUT_COLUMNS_AS_ROWS 0x00000020
struct dm_report *dm_report_init(uint32_t *report_types,
const struct dm_report_object_type *types,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/lib/libdm-common.c
new/device-mapper.1.02.27/lib/libdm-common.c
--- old/device-mapper.1.02.26/lib/libdm-common.c 2007-12-14
20:49:27.000000000 +0100
+++ new/device-mapper.1.02.27/lib/libdm-common.c 2008-06-06
22:44:35.000000000 +0200
@@ -120,9 +120,9 @@
dmt->type = type;
dmt->minor = -1;
dmt->major = -1;
- dmt->uid = DEVICE_UID;
- dmt->gid = DEVICE_GID;
- dmt->mode = DEVICE_MODE;
+ dmt->uid = DM_DEVICE_UID;
+ dmt->gid = DM_DEVICE_GID;
+ dmt->mode = DM_DEVICE_MODE;
dmt->no_open_count = 0;
dmt->read_ahead = DM_READ_AHEAD_AUTO;
dmt->read_ahead_flags = 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/lib/libdm-deptree.c
new/device-mapper.1.02.27/lib/libdm-deptree.c
--- old/device-mapper.1.02.26/lib/libdm-deptree.c 2008-06-05
21:10:35.000000000 +0200
+++ new/device-mapper.1.02.27/lib/libdm-deptree.c 2008-06-25
16:24:17.000000000 +0200
@@ -937,7 +937,7 @@
log_verbose("Suspending %s (%" PRIu32 ":%" PRIu32 ")%s%s",
name, major, minor,
skip_lockfs ? "" : " with filesystem sync",
- no_flush ? "" : " without device flush");
+ no_flush ? "" : " with device flush");
if (!(dmt = dm_task_create(DM_DEVICE_SUSPEND))) {
log_error("Suspend dm_task creation failed for %s", name);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/lib/libdm-report.c
new/device-mapper.1.02.27/lib/libdm-report.c
--- old/device-mapper.1.02.26/lib/libdm-report.c 2008-06-06
21:07:47.000000000 +0200
+++ new/device-mapper.1.02.27/lib/libdm-report.c 2008-06-25
02:10:36.000000000 +0200
@@ -513,6 +513,14 @@
rh->flags |= output_flags & DM_REPORT_OUTPUT_MASK;
+ /* With columns_as_rows we must buffer and not align. */
+ if (output_flags & DM_REPORT_OUTPUT_COLUMNS_AS_ROWS) {
+ if (!(output_flags & DM_REPORT_OUTPUT_BUFFERED))
+ rh->flags |= DM_REPORT_OUTPUT_BUFFERED;
+ if (output_flags & DM_REPORT_OUTPUT_ALIGNED)
+ rh->flags &= ~DM_REPORT_OUTPUT_ALIGNED;
+ }
+
if (output_flags & DM_REPORT_OUTPUT_BUFFERED)
rh->flags |= RH_SORT_REQUIRED;
@@ -793,23 +801,152 @@
/*
* Produce report output
*/
-int dm_report_output(struct dm_report *rh)
+static int _output_field(struct dm_report *rh, struct dm_report_field *field)
{
- struct list *fh, *rowh, *ftmp, *rtmp;
- struct row *row = NULL;
- struct dm_report_field *field;
- const char *repstr;
char *field_id;
- char buf[4096];
int32_t width;
uint32_t align;
+ const char *repstr;
+ char buf[4096];
- if (list_empty(&rh->rows))
- return 1;
+ if (rh->flags & DM_REPORT_OUTPUT_FIELD_NAME_PREFIX) {
+ if (!(field_id =
strdup(rh->fields[field->props->field_num].id))) {
+ log_error("dm_report: Failed to copy field name");
+ return 0;
+ }
- /* Sort rows */
- if ((rh->flags & RH_SORT_REQUIRED))
- _sort_rows(rh);
+ if (!dm_pool_grow_object(rh->mem, rh->output_field_name_prefix,
0)) {
+ log_error("dm_report: Unable to extend output line");
+ return 0;
+ }
+
+ if (!dm_pool_grow_object(rh->mem, _toupperstr(field_id), 0)) {
+ log_error("dm_report: Unable to extend output line");
+ return 0;
+ }
+
+ free(field_id);
+
+ if (!dm_pool_grow_object(rh->mem, "=", 1)) {
+ log_error("dm_report: Unable to extend output line");
+ return 0;
+ }
+
+ if (!(rh->flags & DM_REPORT_OUTPUT_FIELD_UNQUOTED) &&
+ !dm_pool_grow_object(rh->mem, "\'", 1)) {
+ log_error("dm_report: Unable to extend output line");
+ return 0;
+ }
+ }
+
+ repstr = field->report_string;
+ width = field->props->width;
+ if (!(rh->flags & DM_REPORT_OUTPUT_ALIGNED)) {
+ if (!dm_pool_grow_object(rh->mem, repstr, 0)) {
+ log_error("dm_report: Unable to extend output line");
+ return 0;
+ }
+ } else {
+ if (!(align = field->props->flags & DM_REPORT_FIELD_ALIGN_MASK))
+ align = (field->props->flags &
DM_REPORT_FIELD_TYPE_NUMBER) ?
+ DM_REPORT_FIELD_ALIGN_RIGHT :
DM_REPORT_FIELD_ALIGN_LEFT;
+ if (align & DM_REPORT_FIELD_ALIGN_LEFT) {
+ if (dm_snprintf(buf, sizeof(buf), "%-*.*s",
+ width, width, repstr) < 0) {
+ log_error("dm_report: left-aligned snprintf()
failed");
+ return 0;
+ }
+ if (!dm_pool_grow_object(rh->mem, buf, width)) {
+ log_error("dm_report: Unable to extend output
line");
+ return 0;
+ }
+ } else if (align & DM_REPORT_FIELD_ALIGN_RIGHT) {
+ if (dm_snprintf(buf, sizeof(buf), "%*.*s",
+ width, width, repstr) < 0) {
+ log_error("dm_report: right-aligned snprintf()
failed");
+ return 0;
+ }
+ if (!dm_pool_grow_object(rh->mem, buf, width)) {
+ log_error("dm_report: Unable to extend output
line");
+ return 0;
+ }
+ }
+ }
+
+ if ((rh->flags & DM_REPORT_OUTPUT_FIELD_NAME_PREFIX) &&
+ !(rh->flags & DM_REPORT_OUTPUT_FIELD_UNQUOTED))
+ if (!dm_pool_grow_object(rh->mem, "\'", 1)) {
+ log_error("dm_report: Unable to extend output line");
+ return 0;
+ }
+
+ return 1;
+}
+
+static int _output_as_rows(struct dm_report *rh)
+{
+ struct field_properties *fp;
+ struct dm_report_field *field;
+ struct row *row;
+
+ if (!dm_pool_begin_object(rh->mem, 512)) {
+ log_error("dm_report: Unable to allocate output line");
+ return 0;
+ }
+
+ list_iterate_items(fp, &rh->field_props) {
+ if (fp->flags & FLD_HIDDEN) {
+ list_iterate_items(row, &rh->rows) {
+ field = list_item(list_first(&row->fields),
struct dm_report_field);
+ list_del(&field->list);
+ }
+ continue;
+ }
+
+ if ((rh->flags & DM_REPORT_OUTPUT_HEADINGS)) {
+ if (!dm_pool_grow_object(rh->mem,
rh->fields[fp->field_num].heading, 0)) {
+ log_error("dm_report: Failed to extend row for
field name");
+ goto bad;
+ }
+ if (!dm_pool_grow_object(rh->mem, rh->separator, 0)) {
+ log_error("dm_report: Failed to extend row with
separator");
+ goto bad;
+ }
+ }
+
+ list_iterate_items(row, &rh->rows) {
+ if ((field = list_item(list_first(&row->fields), struct
dm_report_field))) {
+ if (!_output_field(rh, field))
+ goto bad;
+ list_del(&field->list);
+ }
+
+ if (!list_end(&rh->rows, &row->list))
+ if (!dm_pool_grow_object(rh->mem,
rh->separator, 0)) {
+ log_error("dm_report: Unable to extend
output line");
+ goto bad;
+ }
+ }
+
+ if (!dm_pool_grow_object(rh->mem, "\0", 1)) {
+ log_error("dm_report: Failed to terminate row");
+ goto bad;
+ }
+ log_print("%s", (char *) dm_pool_end_object(rh->mem));
+ }
+
+ return 1;
+
+ bad:
+ dm_pool_abandon_object(rh->mem);
+ return 0;
+}
+
+static int _output_as_columns(struct dm_report *rh)
+{
+ struct list *fh, *rowh, *ftmp, *rtmp;
+ struct row *row = NULL;
+ struct dm_report_field *field;
/* If headings not printed yet, calculate field widths and print them */
if (!(rh->flags & RH_HEADINGS_PRINTED))
@@ -827,75 +964,15 @@
if (field->props->flags & FLD_HIDDEN)
continue;
- if (rh->flags & DM_REPORT_OUTPUT_FIELD_NAME_PREFIX) {
- if (!(field_id =
strdup(rh->fields[field->props->field_num].id))) {
- log_error("dm_report: Failed to copy
field name");
- goto bad;
- }
-
- if (!dm_pool_grow_object(rh->mem,
rh->output_field_name_prefix, 0)) {
- log_error("dm_report: Unable to extend
output line");
- goto bad;
- }
-
- if (!dm_pool_grow_object(rh->mem,
_toupperstr(field_id), 0)) {
- log_error("dm_report: Unable to extend
output line");
- goto bad;
- }
-
- free(field_id);
-
- if (!dm_pool_grow_object(rh->mem, "=\'", 2)) {
- log_error("dm_report: Unable to extend
output line");
- goto bad;
- }
- }
-
- repstr = field->report_string;
- width = field->props->width;
- if (!(rh->flags & DM_REPORT_OUTPUT_ALIGNED)) {
- if (!dm_pool_grow_object(rh->mem, repstr, 0)) {
- log_error("dm_report: Unable to extend
output line");
- goto bad;
- }
- } else {
- if (!(align = field->props->flags &
DM_REPORT_FIELD_ALIGN_MASK))
- align = (field->props->flags &
DM_REPORT_FIELD_TYPE_NUMBER) ?
- DM_REPORT_FIELD_ALIGN_RIGHT :
DM_REPORT_FIELD_ALIGN_LEFT;
- if (align & DM_REPORT_FIELD_ALIGN_LEFT) {
- if (dm_snprintf(buf, sizeof(buf),
"%-*.*s",
- width, width, repstr)
< 0) {
- log_error("dm_report:
left-aligned snprintf() failed");
- goto bad;
- }
- if (!dm_pool_grow_object(rh->mem, buf,
width)) {
- log_error("dm_report: Unable to
extend output line");
- goto bad;
- }
- } else if (align & DM_REPORT_FIELD_ALIGN_RIGHT)
{
- if (dm_snprintf(buf, sizeof(buf),
"%*.*s",
- width, width, repstr)
< 0) {
- log_error("dm_report:
right-aligned snprintf() failed");
- goto bad;
- }
- if (!dm_pool_grow_object(rh->mem, buf,
width)) {
- log_error("dm_report: Unable to
extend output line");
- goto bad;
- }
- }
- }
+ if (!_output_field(rh, field))
+ goto bad;
- if (rh->flags & DM_REPORT_OUTPUT_FIELD_NAME_PREFIX)
- if (!dm_pool_grow_object(rh->mem, "\'", 1)) {
- log_error("dm_report: Unable to extend
output line");
- goto bad;
- }
-
if (!list_end(&row->fields, fh))
if (!dm_pool_grow_object(rh->mem,
rh->separator, 0)) {
log_error("dm_report: Unable to extend
output line");
goto bad;
}
+
list_del(&field->list);
}
if (!dm_pool_grow_object(rh->mem, "\0", 1)) {
@@ -915,3 +992,17 @@
dm_pool_abandon_object(rh->mem);
return 0;
}
+
+int dm_report_output(struct dm_report *rh)
+{
+ if (list_empty(&rh->rows))
+ return 1;
+
+ if ((rh->flags & RH_SORT_REQUIRED))
+ _sort_rows(rh);
+
+ if ((rh->flags & DM_REPORT_OUTPUT_COLUMNS_AS_ROWS))
+ return _output_as_rows(rh);
+ else
+ return _output_as_columns(rh);
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/lib/mm/dbg_malloc.c
new/device-mapper.1.02.27/lib/mm/dbg_malloc.c
--- old/device-mapper.1.02.26/lib/mm/dbg_malloc.c 2007-08-21
18:26:07.000000000 +0200
+++ new/device-mapper.1.02.27/lib/mm/dbg_malloc.c 2008-06-25
16:10:33.000000000 +0200
@@ -40,7 +40,7 @@
const char *file; /* File that allocated */
int line; /* Line that allocated */
void *magic; /* Address of this block */
-};
+} __attribute__((aligned(8)));
static struct {
unsigned block_serialno;/* Non-decreasing serialno of block */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/make.tmpl.in new/device-mapper.1.02.27/make.tmpl.in
--- old/device-mapper.1.02.26/make.tmpl.in 2007-10-03 12:48:27.000000000
+0200
+++ new/device-mapper.1.02.27/make.tmpl.in 2008-06-06 22:44:35.000000000
+0200
@@ -77,11 +77,11 @@
LDFLAGS += -L$(interfacedir)
CLDFLAGS += -L$(interfacedir)
-ifeq ("@COMPAT@", "yes")
+ifeq ("@DM_COMPAT@", "yes")
DEFS += -DDM_COMPAT
endif
-ifeq ("@DMIOCTLS@", "yes")
+ifeq ("@DM_IOCTLS@", "yes")
DEFS += -DDM_IOCTLS
endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/VERSION new/device-mapper.1.02.27/VERSION
--- old/device-mapper.1.02.26/VERSION 2008-06-06 21:13:37.000000000 +0200
+++ new/device-mapper.1.02.27/VERSION 2008-06-25 16:25:27.000000000 +0200
@@ -1 +1 @@
-1.02.26 (2008-06-06)
+1.02.27 (2008-06-25)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/device-mapper.1.02.26/WHATS_NEW new/device-mapper.1.02.27/WHATS_NEW
--- old/device-mapper.1.02.26/WHATS_NEW 2008-06-06 21:09:19.000000000 +0200
+++ new/device-mapper.1.02.27/WHATS_NEW 2008-06-25 16:24:17.000000000 +0200
@@ -1,3 +1,12 @@
+Version 1.02.27 - 25th June 2008
+================================
+ Align struct memblock in dbg_malloc for sparc.
+ Add --unquoted and --rows to dmsetup.
+ Avoid compiler warning about cast in dmsetup.c's OFFSET_OF macro.
+ Fix inverted no_flush debug message.
+ Remove --enable-jobs from configure. (Set at runtime instead.)
+ Bring configure.in and list.h into line with the lvm2 versions.
+
Version 1.02.26 - 6th June 2008
===============================
Initialise params buffer to empty string in _emit_segment.
++++++ wait_udev.diff ++++++
--- /var/tmp/diff_new_pack.Kb7565/_old 2008-09-13 00:15:04.000000000 +0200
+++ /var/tmp/diff_new_pack.Kb7565/_new 2008-09-13 00:15:04.000000000 +0200
@@ -1,6 +1,8 @@
---- lib/ioctl/libdm-iface.c
+Index: lib/ioctl/libdm-iface.c
+===================================================================
+--- lib/ioctl/libdm-iface.c.orig
+++ lib/ioctl/libdm-iface.c
-@@ -118,6 +118,63 @@
+@@ -118,6 +118,67 @@ static struct cmd_data _cmd_data_v4[] =
# define DM_EXISTS_FLAG 0x00000004
#endif
@@ -25,6 +27,7 @@
+ FILE* fp;
+ struct stat s;
+ int r;
++ int ite=30; /* Iterate 30 times. Otherwise, it's considered timed out */
+ unsigned long long seq;
+ /*
+ * len("/dev/.udev/queue/") + len(str(0xffffffffffffffff)) = 38
@@ -39,7 +42,7 @@
+ r = stat("/dev/.udev/uevent_seqnum", &s);
+ if (r) { return 1; }
+ if (!S_ISREG(s.st_mode)) { return 1; }
-+ while (1) {
++ while (ite-- > 0) {
+ fp = fopen("/dev/.udev/uevent_seqnum", "r");
+ if (fp == NULL) { return 1; }
+ fscanf(fp, "%llu\n", &seq);
@@ -47,16 +50,19 @@
+ if (seq >= end_seq) { break; }
+ usleep(200000);
+ }
++ if (ite <=0 ) return 1;
+
+ /* Loop to make sure all $seq are unlinked in /dev/.udev/queue then */
+ for (seq = start_seq; seq <= end_seq; seq++) {
-+ while (1) {
++ ite = 30
++ while (ite-- > 0) {
+ snprintf(filename, sizeof(filename),
"/dev/.udev/queue/%llu", seq);
+ r = open(filename, O_RDONLY);
+ if (r == -1 && errno == ENOENT) break;
+ if (r >= 0) close(r);
+ usleep(200000);
+ }
++ if (ite <=0 ) return 1;
+ }
+ return 0;
+}
@@ -64,7 +70,7 @@
static void *_align(void *ptr, unsigned int a)
{
register unsigned long agn = --a;
-@@ -642,6 +699,7 @@
+@@ -642,6 +703,7 @@ static int _dm_task_run_v1(struct dm_tas
{
struct dm_ioctl_v1 *dmi;
unsigned int command;
@@ -72,7 +78,7 @@
dmi = _flatten_v1(dmt);
if (!dmi) {
-@@ -668,6 +726,8 @@
+@@ -668,6 +730,8 @@ static int _dm_task_run_v1(struct dm_tas
dmi->name, dmi->uuid, dmt->newname ? " " : "",
dmt->newname ? dmt->newname : "",
dmi->data_size);
@@ -81,7 +87,7 @@
if (dmt->type == DM_DEVICE_LIST) {
if (!_dm_names_v1(dmi))
goto bad;
-@@ -687,10 +747,13 @@
+@@ -687,10 +751,13 @@ static int _dm_task_run_v1(struct dm_tas
#else /* Userspace alternative for testing */
#endif
@@ -95,7 +101,7 @@
switch (dmt->type) {
case DM_DEVICE_CREATE:
add_dev_node(dmt->dev_name, MAJOR(dmi->dev), MINOR(dmi->dev),
-@@ -1640,6 +1703,7 @@
+@@ -1640,6 +1707,7 @@ int dm_task_run(struct dm_task *dmt)
{
struct dm_ioctl *dmi;
unsigned command;
@@ -103,7 +109,7 @@
#ifdef DM_COMPAT
if (_dm_version == 1)
-@@ -1670,9 +1734,11 @@
+@@ -1670,9 +1738,11 @@ int dm_task_run(struct dm_task *dmt)
return 0;
repeat_ioctl:
@@ -115,7 +121,7 @@
if (dmi->flags & DM_BUFFER_FULL_FLAG) {
switch (dmt->type) {
case DM_DEVICE_LIST_VERSIONS:
-@@ -1689,6 +1755,8 @@
+@@ -1689,6 +1759,8 @@ repeat_ioctl:
}
}
@@ -123,4 +129,4 @@
+
switch (dmt->type) {
case DM_DEVICE_CREATE:
- add_dev_node(dmt->dev_name, MAJOR(dmi->dev), MINOR(dmi->dev),
+ if (dmt->dev_name && *dmt->dev_name)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |