Sign In
Sign Up
Search is temporarily disabled. See
ticket
for more info.
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
List overview
Download
lvm2-commits
December 2018
----- 2024 -----
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
lvm2-commits@lists.fedorahosted.org
5 participants
96 discussions
Start a n
N
ew thread
master - makefiles: ensure test dir can run unit-test
by Zdenek Kabelac
01 Dec '18
01 Dec '18
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=250e05a9656bf8888ac6e…
Commit: 250e05a9656bf8888ac6e399791c46369e77d667 Parent: a1e5b8832b99d977fda326e914a5d6d834316f42 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sat Dec 1 00:44:22 2018 +0100 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Sat Dec 1 01:05:53 2018 +0100 makefiles: ensure test dir can run unit-test --- test/Makefile.in | 4 ++-- test/unit/Makefile | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Makefile.in b/test/Makefile.in index e471a11..69e2cfc 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -169,7 +169,7 @@ endif run-unit-test unit-test: @echo " [MAKE] $<" - $(Q) $(MAKE) -C unit $(@) + $(Q) $(MAKE) -C $(top_builddir) $(@) DATADIR = $(datadir)/lvm2-testsuite EXECDIR = $(libexecdir)/lvm2-testsuite @@ -314,7 +314,7 @@ lib/dm-version-expected: $(top_srcdir)/VERSION_DM .lib-dir-stamp CMDS = lvm $(shell cat $(top_builddir)/tools/.commands 2>/dev/null) LIB = $(addprefix lib/, $(LIB_SECURETEST) $(LIB_DMSECURETEST) $(LIB_SHARED) $(LIB_LOCAL) $(LIB_NOT) $(LIB_LINK_NOT) $(LIB_FLAVOURS)) -.tests-stamp: $(ALL) $(LIB) $(SUBDIRS) lib/version-expected lib/dm-version-expected +.tests-stamp: $(ALL) $(LIB) $(SUBDIRS) lib/version-expected lib/dm-version-expected unit-test @echo " [TEST-STAMP]" @if test "$(srcdir)" != . ; then \ echo "Linking tests to builddir."; \ diff --git a/test/unit/Makefile b/test/unit/Makefile index 909cef2..0ba98ee 100644 --- a/test/unit/Makefile +++ b/test/unit/Makefile @@ -41,9 +41,10 @@ CLEAN_TARGETS += $(UNIT_DEPENDS) $(UNIT_OBJECTS) \ test/unit/unit-test: $(UNIT_OBJECTS) lib/liblvm-internal.a libdaemon/client/libdaemonclient.a $(INTERNAL_LIBS) @echo " [LD] $@" $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) \ - -o $@ $+ $(LIBS) $(DMEVENT_LIBS) $(SYSTEMD_LIBS) -lm -ldl -laio + -o $@ $+ $(DMEVENT_LIBS) $(SYSTEMD_LIBS) $(LIBS) -ldl -laio -.PHONEY: run-unit-test +.PHONEY: run-unit-test unit-test +unit-test: test/unit/unit-test run-unit-test: test/unit/unit-test @echo Running unit tests LD_LIBRARY_PATH=libdm test/unit/unit-test run
1
0
0
0
master - makefiles: avoid clustering out
by Zdenek Kabelac
01 Dec '18
01 Dec '18
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a1e5b8832b99d977fda32…
Commit: a1e5b8832b99d977fda326e914a5d6d834316f42 Parent: 38c7ba315dd4aa2c87a777225b3f3ca333ebe350 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Fri Nov 30 21:59:08 2018 +0100 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Sat Dec 1 01:05:53 2018 +0100 makefiles: avoid clustering out When ctags package is not installed, avoid cluttering output from failing 'which' command. --- Makefile.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.in b/Makefile.in index dd8a526..e64836f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -179,7 +179,7 @@ endif include $(top_srcdir)/device_mapper/Makefile include $(top_srcdir)/base/Makefile -ifneq ($(shell which ctags),) +ifneq ($(shell which ctags 2>/dev/null),) .PHONY: tags tags: test -z "$(shell find $(top_srcdir) -type f -name '*.[ch]' -newer tags 2>/dev/null | head -1)" || $(RM) tags
1
0
0
0
master - device_mapper: move internal header to front
by Zdenek Kabelac
01 Dec '18
01 Dec '18
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=38c7ba315dd4aa2c87a77…
Commit: 38c7ba315dd4aa2c87a777225b3f3ca333ebe350 Parent: 65eb29503b7cfe0f509c5b4d6146dd7961d1f8ba Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sat Dec 1 00:43:53 2018 +0100 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Sat Dec 1 01:04:27 2018 +0100 device_mapper: move internal header to front --- device_mapper/ioctl/libdm-iface.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device_mapper/ioctl/libdm-iface.c b/device_mapper/ioctl/libdm-iface.c index eb6e9db..f86d3b3 100644 --- a/device_mapper/ioctl/libdm-iface.c +++ b/device_mapper/ioctl/libdm-iface.c @@ -15,9 +15,11 @@ #include "base/memory/zalloc.h" #include "device_mapper/misc/dmlib.h" +#include "device_mapper/misc/dm-ioctl.h" #include "device_mapper/ioctl/libdm-targets.h" #include "device_mapper/libdm-common.h" +#include <stdio.h> /* getline() */ #include <stddef.h> #include <fcntl.h> #include <dirent.h> @@ -35,8 +37,6 @@ # define MKDEV(x,y) makedev(((dev_t)x),((dev_t)y)) #endif -#include "device_mapper/misc/dm-ioctl.h" - /* * Ensure build compatibility. * The hard-coded versions here are the highest present
1
0
0
0
master - libdm: optimize dm_pool_strndup
by Zdenek Kabelac
01 Dec '18
01 Dec '18
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=65eb29503b7cfe0f509c5…
Commit: 65eb29503b7cfe0f509c5b4d6146dd7961d1f8ba Parent: 93dfb5dd3eb1b6f96f227cba961abfaa00d2f300 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sat Dec 1 00:35:41 2018 +0100 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Sat Dec 1 01:04:27 2018 +0100 libdm: optimize dm_pool_strndup --- libdm/mm/pool.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libdm/mm/pool.c b/libdm/mm/pool.c index a8fe732..26f43a7 100644 --- a/libdm/mm/pool.c +++ b/libdm/mm/pool.c @@ -59,11 +59,13 @@ char *dm_pool_strdup(struct dm_pool *p, const char *str) char *dm_pool_strndup(struct dm_pool *p, const char *str, size_t n) { + size_t slen = strlen(str); + size_t len = (slen < n) ? slen : n; char *ret = dm_pool_alloc(p, n + 1); if (ret) { - strncpy(ret, str, n); - ret[n] = '\0'; + ret[len] = '\0'; + memcpy(ret, str, len); } return ret;
1
0
0
0
master - device_mapper: optimize dm_pool_strndup
by Zdenek Kabelac
01 Dec '18
01 Dec '18
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=93dfb5dd3eb1b6f96f227…
Commit: 93dfb5dd3eb1b6f96f227cba961abfaa00d2f300 Parent: c61c4271a4d9cc990f19614d1d2e7d203d57ebfd Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sat Dec 1 00:34:29 2018 +0100 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Sat Dec 1 01:04:27 2018 +0100 device_mapper: optimize dm_pool_strndup --- device_mapper/mm/pool.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/device_mapper/mm/pool.c b/device_mapper/mm/pool.c index 20d7fd9..b6478c5 100644 --- a/device_mapper/mm/pool.c +++ b/device_mapper/mm/pool.c @@ -59,11 +59,13 @@ char *dm_pool_strdup(struct dm_pool *p, const char *str) char *dm_pool_strndup(struct dm_pool *p, const char *str, size_t n) { + size_t slen = strlen(str); + size_t len = (slen < n) ? slen : n; char *ret = dm_pool_alloc(p, n + 1); if (ret) { - strncpy(ret, str, n); - ret[n] = '\0'; + ret[len] = '\0'; + memcpy(ret, str, len); } return ret;
1
0
0
0
master - device_mapper: fix incorrect dm_strncpy usage
by Zdenek Kabelac
01 Dec '18
01 Dec '18
Gitweb:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c61c4271a4d9cc990f196…
Commit: c61c4271a4d9cc990f19614d1d2e7d203d57ebfd Parent: 6a4a6a7cd7ef83b6283284637e3b28476fbc7712 Author: Zdenek Kabelac <zkabelac(a)redhat.com> AuthorDate: Sat Dec 1 00:41:24 2018 +0100 Committer: Zdenek Kabelac <zkabelac(a)redhat.com> CommitterDate: Sat Dec 1 01:04:27 2018 +0100 device_mapper: fix incorrect dm_strncpy usage Patch 668c9d0762fc6736a1e9372785544eda6a939806 introduced regression, since the code here would actually always return failing result. Replace it with more simple call to strndup(). --- device_mapper/vdo/status.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/device_mapper/vdo/status.c b/device_mapper/vdo/status.c index 53dfe4d..40e69ba 100644 --- a/device_mapper/vdo/status.c +++ b/device_mapper/vdo/status.c @@ -203,16 +203,11 @@ bool dm_vdo_status_parse(struct dm_pool *mem, const char *input, goto bad; } - if (!(s->device = (!mem) ? malloc((e - b) + 1) : dm_pool_alloc(mem, (e - b) + 1))) { + if (!(s->device = (!mem) ? strndup(b, (te - b)) : dm_pool_alloc(mem, (te - b)))) { _set_error(result, "out of memory"); goto bad; } - if (!dm_strncpy(s->device, b, te - b + 1)) { - _set_error(result, "copy device"); - goto bad; - } - b = _eat_space(te, e); #define XX(p, f, fn) if (!_parse_field(&b, e, p, f, fn, result)) goto bad;
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
10
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
Results per page:
10
25
50
100
200