master - tests: replance hostname call
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6f057e3c6640f2...
Commit: 6f057e3c6640f25676b0c5d0fe93912ac91244bf
Parent: c07fb7678ecb7ecf54e9acc4c2f3ef6138cec90f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 12 10:39:57 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 12 16:24:40 2014 +0200
tests: replance hostname call
---
test/shell/lvchange-thin.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvchange-thin.sh b/test/shell/lvchange-thin.sh
index 0b4c15d..c6fd813 100644
--- a/test/shell/lvchange-thin.sh
+++ b/test/shell/lvchange-thin.sh
@@ -98,7 +98,7 @@ not lvchange --resync --addtag foo $vg/$lv1
#
# Play with tags and activation
#
-TAG=$(hostname)
+TAG=$(uname -n)
aux lvmconf 'activation/volume_list = [ "$vg/$lv2", "@mytag", "$vg2" ]'
lvchange -ay $vg/$lv1
10 years
master - cleanup: drop unused header
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c07fb7678ecb7e...
Commit: c07fb7678ecb7ecf54e9acc4c2f3ef6138cec90f
Parent: 506ade802b6e7f8c2afb027cd969bbb105afabd1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri May 9 17:10:26 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 12 16:24:40 2014 +0200
cleanup: drop unused header
---
lib/locking/file_locking.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c
index 10431ab..d332101 100644
--- a/lib/locking/file_locking.c
+++ b/lib/locking/file_locking.c
@@ -22,7 +22,6 @@
#include "lvm-string.h"
#include "lvm-flock.h"
#include "lvmcache.h"
-#include "lvm-signal.h"
#include <limits.h>
#include <unistd.h>
10 years
master - cleanup: cast int to typedef
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=506ade802b6e7f...
Commit: 506ade802b6e7f8c2afb027cd969bbb105afabd1
Parent: 90c44f5371b85edb05d4c4ebbd9e0254971d13f4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri May 9 16:13:48 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 12 16:24:40 2014 +0200
cleanup: cast int to typedef
---
tools/vgchange.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 2856b28..d24b17e 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -590,7 +590,7 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv)
if (arg_count(cmd, activate_ARG) &&
(arg_count(cmd, monitor_ARG) || arg_count(cmd, poll_ARG))) {
- if (!is_change_activating(arg_uint_value(cmd, activate_ARG, 0))) {
+ if (!is_change_activating((activation_change_t) arg_uint_value(cmd, activate_ARG, 0))) {
log_error("Only -ay* allowed with --monitor or --poll.");
return EINVALID_CMD_LINE;
}
10 years
master - conf: document new thin_check option
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=90c44f5371b85e...
Commit: 90c44f5371b85edb05d4c4ebbd9e0254971d13f4
Parent: 8b95c82fed667b4095b1358ac5697fd43cd61e11
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 12 14:12:55 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 12 16:24:40 2014 +0200
conf: document new thin_check option
---
conf/example.conf.in | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index d5ddb1c..bc1758d 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -693,8 +693,10 @@ global {
# option "-q" is for quiet output.
# With thin_check version 2.1 or newer you can add "--ignore-non-fatal-errors"
# to let it pass through ignorable errors and fix them later.
+ # With thin_check version 3.2 or newer you should add
+ # "--clear-needs-check-flag".
#
- # thin_check_options = [ "-q" ]
+ # thin_check_options = [ "-q", "--clear-needs-check-flag" ]
# Full path of the utility called to repair a thin metadata device
# is in a state that allows it to be used.
10 years
master - coverity: catch unwanted path
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8b95c82fed667b...
Commit: 8b95c82fed667b4095b1358ac5697fd43cd61e11
Parent: 2e1192f6914ddbe1cf560a02158bdb58584efa26
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri May 9 17:10:51 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 12 16:24:39 2014 +0200
coverity: catch unwanted path
We validate this path already earlier.
---
lib/metadata/lv_manip.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index b47e2d2..2005826 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -6140,6 +6140,11 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
if (seg_is_thin_volume(lp)) {
/* Ensure all stacked messages are submitted */
+ if (!lp->pool) {
+ log_error(INTERNAL_ERROR "Undefined pool for thin volume segment.");
+ return NULL;
+ }
+
if (!(lvl = find_lv_in_vg(vg, lp->pool))) {
log_error("Unable to find existing pool LV %s in VG %s.",
lp->pool, vg->name);
10 years
master - configure: improve needs_check thin_check test
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2e1192f6914ddb...
Commit: 2e1192f6914ddbe1cf560a02158bdb58584efa26
Parent: 5b787a24f024d2589583fc356f343bb981c169e2
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon May 12 14:51:23 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 12 16:24:39 2014 +0200
configure: improve needs_check thin_check test
Improve testing for needs_check - when old tools are installed,
issue proper warning from configure, but stop sending needs_check
flag to the old tool.
---
configure | 55 +++++++++++++++++++++++++++----------------------------
configure.in | 43 +++++++++++++++++++++----------------------
2 files changed, 48 insertions(+), 50 deletions(-)
diff --git a/configure b/configure
index 44eab6f..dd5ec64 100755
--- a/configure
+++ b/configure
@@ -7208,8 +7208,6 @@ $as_echo "#define THIN_INTERNAL 1" >>confdefs.h
*) as_fn_error $? "--with-thin parameter invalid ($THIN)" "$LINENO" 5 ;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether thin_check supports the needs-check flag" >&5
-$as_echo_n "checking whether thin_check supports the needs-check flag... " >&6; }
# Check whether --enable-thin_check_needs_check was given.
if test "${enable_thin_check_needs_check+set}" = set; then :
enableval=$enable_thin_check_needs_check; THIN_CHECK_NEEDS_CHECK=$enableval
@@ -7217,14 +7215,6 @@ else
THIN_CHECK_NEEDS_CHECK=yes
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $THIN_CHECK_NEEDS_CHECK" >&5
-$as_echo "$THIN_CHECK_NEEDS_CHECK" >&6; }
-
-if test x$THIN_CHECK_NEEDS_CHECK = xyes; then
-
-$as_echo "#define THIN_CHECK_NEEDS_CHECK 1" >>confdefs.h
-
-fi
# Test if necessary thin tools are available
# if not - use plain defaults and warn user
@@ -7335,24 +7325,23 @@ fi
$as_echo "$as_me: WARNING: thin_check not found in path $PATH" >&2;}
THIN_CHECK_CMD=/usr/sbin/thin_check
THIN_CONFIGURE_WARN=y
- else
- if test x$THIN_CHECK_NEEDS_CHECK = xyes; then
- THIN_CHECK_VSN=`"$THIN_CHECK_CMD" -V 2>/dev/null`
- THIN_CHECK_VSN_MAJOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}'`
- THIN_CHECK_VSN_MINOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}'`
-
- if test -z "$THIN_CHECK_VSN_MAJOR" -o -z "$THIN_CHECK_VSN_MINOR" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found thin_check version \"$THIN_CHECK_VSN\"" >&5
-$as_echo "$as_me: WARNING: Found thin_check version \"$THIN_CHECK_VSN\"" >&2;}
- THIN_CHECK_VERSION_WARN=y
- else
- if test "$THIN_CHECK_VSN_MAJOR" -eq 0 -a "$THIN_CHECK_VSN_MINOR" -lt 3 ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found thin_check version \"$THIN_CHECK_VSN\"" >&5
-$as_echo "$as_me: WARNING: Found thin_check version \"$THIN_CHECK_VSN\"" >&2;}
- THIN_CHECK_VERSION_WARN=y
- fi
- fi
- fi
+ fi
+ fi
+ if test "$THIN_CHECK_NEEDS_CHECK" = yes; then
+ THIN_CHECK_VSN=`"$THIN_CHECK_CMD" -V 2>/dev/null`
+ THIN_CHECK_VSN_MAJOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}'`
+ THIN_CHECK_VSN_MINOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}'`
+
+ if test -z "$THIN_CHECK_VSN_MAJOR" -o -z "$THIN_CHECK_VSN_MINOR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $THIN_CHECK_CMD: Bad version \"$THIN_CHECK_VSN\" found" >&5
+$as_echo "$as_me: WARNING: $THIN_CHECK_CMD: Bad version \"$THIN_CHECK_VSN\" found" >&2;}
+ THIN_CHECK_VERSION_WARN=y
+ THIN_CHECK_NEEDS_CHECK=no
+ elif test "$THIN_CHECK_VSN_MAJOR" -eq 0 -a "$THIN_CHECK_VSN_MINOR" -lt 3; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $THIN_CHECK_CMD: Old version \"$THIN_CHECK_VSN\" found" >&5
+$as_echo "$as_me: WARNING: $THIN_CHECK_CMD: Old version \"$THIN_CHECK_VSN\" found" >&2;}
+ THIN_CHECK_VERSION_WARN=y
+ THIN_CHECK_NEEDS_CHECK=no
fi
fi
# Empty means a config way to ignore thin checking
@@ -7572,6 +7561,16 @@ $as_echo "$as_me: WARNING: thin_repair not found in path $PATH" >&2;}
;;
esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether thin_check supports the needs-check flag" >&5
+$as_echo_n "checking whether thin_check supports the needs-check flag... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $THIN_CHECK_NEEDS_CHECK" >&5
+$as_echo "$THIN_CHECK_NEEDS_CHECK" >&6; }
+if test "$THIN_CHECK_NEEDS_CHECK" = yes; then
+
+$as_echo "#define THIN_CHECK_NEEDS_CHECK 1" >>confdefs.h
+
+fi
+
cat >>confdefs.h <<_ACEOF
#define THIN_CHECK_CMD "$THIN_CHECK_CMD"
diff --git a/configure.in b/configure.in
index 09ca1b5..3a8e5d9 100644
--- a/configure.in
+++ b/configure.in
@@ -433,16 +433,10 @@ case "$THIN" in
esac
dnl -- thin_check needs-check flag
-AC_MSG_CHECKING(whether thin_check supports the needs-check flag)
AC_ARG_ENABLE(thin_check_needs_check,
AC_HELP_STRING([--disable-thin_check_needs_check],
[required if thin_check version is < 0.3.0]),
THIN_CHECK_NEEDS_CHECK=$enableval, THIN_CHECK_NEEDS_CHECK=yes)
-AC_MSG_RESULT($THIN_CHECK_NEEDS_CHECK)
-
-if test x$THIN_CHECK_NEEDS_CHECK = xyes; then
- AC_DEFINE([THIN_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'thin_check' tool requires the --clear-needs-check-flag option])
-fi
# Test if necessary thin tools are available
# if not - use plain defaults and warn user
@@ -455,22 +449,21 @@ case "$THIN" in
AC_MSG_WARN([thin_check not found in path $PATH])
THIN_CHECK_CMD=/usr/sbin/thin_check
THIN_CONFIGURE_WARN=y
- else
- if test x$THIN_CHECK_NEEDS_CHECK = xyes; then
- THIN_CHECK_VSN=`"$THIN_CHECK_CMD" -V 2>/dev/null`
- THIN_CHECK_VSN_MAJOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}'`
- THIN_CHECK_VSN_MINOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}'`
-
- if test -z "$THIN_CHECK_VSN_MAJOR" -o -z "$THIN_CHECK_VSN_MINOR" ; then
- AC_MSG_WARN(Found thin_check version "$THIN_CHECK_VSN")
- THIN_CHECK_VERSION_WARN=y
- else
- if test "$THIN_CHECK_VSN_MAJOR" -eq 0 -a "$THIN_CHECK_VSN_MINOR" -lt 3 ; then
- AC_MSG_WARN(Found thin_check version "$THIN_CHECK_VSN")
- THIN_CHECK_VERSION_WARN=y
- fi
- fi
- fi
+ fi
+ fi
+ if test "$THIN_CHECK_NEEDS_CHECK" = yes; then
+ THIN_CHECK_VSN=`"$THIN_CHECK_CMD" -V 2>/dev/null`
+ THIN_CHECK_VSN_MAJOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $1}'`
+ THIN_CHECK_VSN_MINOR=`echo "$THIN_CHECK_VSN" | $AWK -F '.' '{print $2}'`
+
+ if test -z "$THIN_CHECK_VSN_MAJOR" -o -z "$THIN_CHECK_VSN_MINOR"; then
+ AC_MSG_WARN([$THIN_CHECK_CMD: Bad version "$THIN_CHECK_VSN" found])
+ THIN_CHECK_VERSION_WARN=y
+ THIN_CHECK_NEEDS_CHECK=no
+ elif test "$THIN_CHECK_VSN_MAJOR" -eq 0 -a "$THIN_CHECK_VSN_MINOR" -lt 3; then
+ AC_MSG_WARN([$THIN_CHECK_CMD: Old version "$THIN_CHECK_VSN" found])
+ THIN_CHECK_VERSION_WARN=y
+ THIN_CHECK_NEEDS_CHECK=no
fi
fi
# Empty means a config way to ignore thin checking
@@ -494,6 +487,12 @@ case "$THIN" in
;;
esac
+AC_MSG_CHECKING([whether thin_check supports the needs-check flag])
+AC_MSG_RESULT([$THIN_CHECK_NEEDS_CHECK])
+if test "$THIN_CHECK_NEEDS_CHECK" = yes; then
+ AC_DEFINE([THIN_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'thin_check' tool requires the --clear-needs-check-flag option])
+fi
+
AC_DEFINE_UNQUOTED([THIN_CHECK_CMD], ["$THIN_CHECK_CMD"],
[The path to 'thin_check', if available.])
10 years
master - configure: drop siginterrupt
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5b787a24f024d2...
Commit: 5b787a24f024d2589583fc356f343bb981c169e2
Parent: e416d84e1093655786b09450154779ee7896f11d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Jul 6 11:22:29 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon May 12 16:24:39 2014 +0200
configure: drop siginterrupt
Not used anymore
---
configure | 11 -----------
configure.in | 1 -
lib/misc/configure.h.in | 3 ---
lib/misc/lvm-wrappers.h | 15 ---------------
4 files changed, 0 insertions(+), 30 deletions(-)
diff --git a/configure b/configure
index de93e77..44eab6f 100755
--- a/configure
+++ b/configure
@@ -5563,17 +5563,6 @@ else
fi
done
-for ac_func in siginterrupt
-do :
- ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt"
-if test "x$ac_cv_func_siginterrupt" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGINTERRUPT 1
-_ACEOF
-
-fi
-done
-
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
diff --git a/configure.in b/configure.in
index e3ddde1..09ca1b5 100644
--- a/configure.in
+++ b/configure.in
@@ -134,7 +134,6 @@ AC_CHECK_FUNCS([ftruncate gethostname getpagesize \
gettimeofday memset mkdir mkfifo rmdir munmap nl_langinfo setenv setlocale \
strcasecmp strchr strcspn strspn strdup strncasecmp strerror strrchr \
strstr strtol strtoul uname], , [AC_MSG_ERROR(bailing out)])
-AC_CHECK_FUNCS(siginterrupt)
AC_FUNC_ALLOCA
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_CHOWN
diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in
index 507aae1..ead131c 100644
--- a/lib/misc/configure.h.in
+++ b/lib/misc/configure.h.in
@@ -288,9 +288,6 @@
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
-/* Define to 1 if you have the `siginterrupt' function. */
-#undef HAVE_SIGINTERRUPT
-
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
diff --git a/lib/misc/lvm-wrappers.h b/lib/misc/lvm-wrappers.h
index 9368e25..137cbdb 100644
--- a/lib/misc/lvm-wrappers.h
+++ b/lib/misc/lvm-wrappers.h
@@ -37,19 +37,4 @@ int read_urandom(void *buf, size_t len);
*/
unsigned lvm_even_rand(unsigned *seed, unsigned max);
-# ifndef HAVE_SIGINTERRUPT
-# define siginterrupt(sig, flag) \
- do { \
- int ret; \
- struct sigaction act; \
- (void) sigaction(sig, NULL, &act); \
- if (flag) \
- act.sa_flags &= SA_RESTART; \
- else \
- act.sa_flags |= SA_RESTART; \
- ret = sigaction(sig, &act, NULL); \
- return ret; \
- while (0)
-# endif
-
#endif
10 years
master - cleanup: use enum return codes
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e416d84e109365...
Commit: e416d84e1093655786b09450154779ee7896f11d
Parent: 2cc02c570e489426568e57ad0b8fdbd9eedccf87
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 7 13:52:01 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 7 14:17:46 2014 +0200
cleanup: use enum return codes
---
lib/misc/lvm-string.c | 16 ++++++++--------
lib/misc/lvm-string.h | 12 ++++++++----
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/lib/misc/lvm-string.c b/lib/misc/lvm-string.c
index cdee02b..be6298b 100644
--- a/lib/misc/lvm-string.c
+++ b/lib/misc/lvm-string.c
@@ -65,29 +65,29 @@ int validate_tag(const char *n)
return 1;
}
-static int _validate_name(const char *n)
+static name_error_t _validate_name(const char *n)
{
register char c;
register int len = 0;
if (!n || !*n)
- return -1;
+ return NAME_INVALID_EMPTY;
/* Hyphen used as VG-LV separator - ambiguity if LV starts with it */
if (*n == '-')
- return -2;
+ return NAME_INVALID_HYPEN;
if ((*n == '.') && (!n[1] || (n[1] == '.' && !n[2]))) /* ".", ".." */
- return -3;
+ return NAME_INVALID_DOTS;
while ((len++, c = *n++))
if (!isalnum(c) && c != '.' && c != '_' && c != '-' && c != '+')
- return -4;
+ return NAME_INVALID_CHARSET;
if (len > NAME_LEN)
- return -5;
+ return NAME_INVALID_LENGTH;
- return 0;
+ return NAME_VALID;
}
/*
@@ -98,7 +98,7 @@ static int _validate_name(const char *n)
*/
int validate_name(const char *n)
{
- return (_validate_name(n) < 0 ? 0 : 1);
+ return (_validate_name(n) == NAME_VALID) ? 1 : 0;
}
static const char *_lvname_has_reserved_prefix(const char *lvname)
diff --git a/lib/misc/lvm-string.h b/lib/misc/lvm-string.h
index a4f112f..6a13e9e 100644
--- a/lib/misc/lvm-string.h
+++ b/lib/misc/lvm-string.h
@@ -25,10 +25,14 @@ struct dm_pool;
struct pool;
struct logical_volume;
-typedef enum name_error { NAME_VALID = 0, NAME_INVALID_EMPTY = -1,
- NAME_INVALID_HYPEN = -2, NAME_INVALID_DOTS = -3,
- NAME_INVALID_CHARSET = -4, NAME_INVALID_LENGTH = -5}
- name_error_t;
+typedef enum name_error {
+ NAME_VALID = 0,
+ NAME_INVALID_EMPTY = -1,
+ NAME_INVALID_HYPEN = -2,
+ NAME_INVALID_DOTS = -3,
+ NAME_INVALID_CHARSET = -4,
+ NAME_INVALID_LENGTH = -5
+} name_error_t;
int emit_to_buffer(char **buffer, size_t *size, const char *fmt, ...)
__attribute__ ((format(printf, 3, 4)));
10 years
master - cleanup: constify pointers
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2cc02c570e4894...
Commit: 2cc02c570e489426568e57ad0b8fdbd9eedccf87
Parent: 9845f8c7674892d7760526b36e45c6425bd1950f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 7 13:09:59 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 7 14:17:46 2014 +0200
cleanup: constify pointers
---
lib/device/dev-type.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index 9d610d4..e0cae45 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -460,9 +460,9 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
uint32_t types_to_exclude, uint32_t types_no_prompt,
int yes, force_t force)
{
- static const char _msg_failed_offset[] = "Failed to get offset of the %s signature on %s.";
- static const char _msg_failed_length[] = "Failed to get length of the %s signature on %s.";
- static const char _msg_wiping[] = "Wiping %s signature on %s.";
+ static const char const _msg_failed_offset[] = "Failed to get offset of the %s signature on %s.";
+ static const char const _msg_failed_length[] = "Failed to get length of the %s signature on %s.";
+ static const char const _msg_wiping[] = "Wiping %s signature on %s.";
const char *offset = NULL, *type = NULL, *magic = NULL,
*usage = NULL, *label = NULL, *uuid = NULL;
loff_t offset_value;
10 years
master - clenaup: drop unused assigns
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9845f8c7674892...
Commit: 9845f8c7674892d7760526b36e45c6425bd1950f
Parent: 9bccaf7ae40ca0d17e5d1b65f7c7aaf2d78eb2b9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed May 7 11:58:43 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed May 7 14:17:46 2014 +0200
clenaup: drop unused assigns
---
lib/metadata/cache_manip.c | 2 +-
tools/lvcreate.c | 1 -
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c
index 6a0f0f6..0e2569c 100644
--- a/lib/metadata/cache_manip.c
+++ b/lib/metadata/cache_manip.c
@@ -123,7 +123,7 @@ struct logical_volume *lv_cache_create(struct logical_volume *pool,
return_NULL;
cache_lv = origin;
- if (!(origin = insert_layer_for_lv(cmd, cache_lv, CACHE, "_corig")))
+ if (!insert_layer_for_lv(cmd, cache_lv, CACHE, "_corig"))
return_NULL;
seg = first_seg(cache_lv);
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index 0e009b1..2156265 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -323,7 +323,6 @@ static int _determine_cache_argument(struct volume_group *vg,
lp->poolmetadataspare = arg_int_value(vg->cmd,
poolmetadataspare_ARG,
DEFAULT_POOL_METADATA_SPARE);
- lp->origin = lp->origin;
}
return 1;
10 years