From 236abf7d17506b9a8d92f6c5e72c60036f38960c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 16 Dec 2008 09:42:41 -0800 Subject: [PATCH 1/3] Remove assfail() chunk, it just complicates things and is never used --- .topdeps | 4 +--- .topmsg | 18 +++--------------- lib/libuutil/uu_misc.c | 12 ------------ 3 files changed, 4 insertions(+), 30 deletions(-) diff --git a/.topdeps b/.topdeps index 607c231780..7f16cbcdd5 100644 --- a/.topdeps +++ b/.topdeps @@ -1,3 +1 @@ -gcc-branch -fix-branch -feature-branch +zfs-branch diff --git a/.topmsg b/.topmsg index e9722e1075..e16740584b 100644 --- a/.topmsg +++ b/.topmsg @@ -1,19 +1,7 @@ From: Brian Behlendorf -Subject: [PATCH] zfs branch +Subject: [PATCH] linux unused -Merged result of all changes which are relevant to both Solaris -and Linux builds of the ZFS code. These are changes where there -is a reasonable chance they will be accepted upstream. - -Additionally, since this is effectively the root of the linux -ZFS tree the core linux build system is added here. This -includes autogen.sh, configure.ac, m4 macros, some scripts/*, -and makefiles for all the core ZFS components. Linux-only -features which require tweaks to the build system should appear -on the relevant topic branches. All autotools products which -result from autogen.sh are commited to the linux-configure-branch. - -This branch also contains the META, ChangeLog, AUTHORS, -README, and GIT files. +Track various large hunks which have been dropped simply +because they are not relevant to this port. Signed-off-by: Brian Behlendorf diff --git a/lib/libuutil/uu_misc.c b/lib/libuutil/uu_misc.c index d64c600345..b3b4a65133 100644 --- a/lib/libuutil/uu_misc.c +++ b/lib/libuutil/uu_misc.c @@ -208,18 +208,6 @@ uu_panic(const char *format, ...) (void) pause(); } -int -assfail(const char *astring, const char *file, int line) -{ -#if defined(__STDC__) && __STDC_VERSION__ - 0 >= 199901L - __assert_c99(astring, file, line, "unknown func"); -#else - __assert(astring, file, line); -#endif - /*NOTREACHED*/ - return (0); -} - static void uu_lockup(void) { From e7d7f1803f88ec9ed39b745a696c73d01b848952 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 16 Dec 2008 10:14:08 -0800 Subject: [PATCH 2/3] Remove unused hunk --- lib/libzfs/include/libzfs.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/libzfs/include/libzfs.h b/lib/libzfs/include/libzfs.h index c650865f30..7bbb2c200e 100644 --- a/lib/libzfs/include/libzfs.h +++ b/lib/libzfs/include/libzfs.h @@ -521,15 +521,6 @@ extern int zfs_iscsi_perm_check(libzfs_handle_t *, char *, ucred_t *); extern int zfs_deleg_share_nfs(libzfs_handle_t *, char *, char *, void *, void *, int, zfs_share_op_t); -/* - * When dealing with nvlists, verify() is extremely useful - */ -#ifdef NDEBUG -#define verify(EX) ((void)(EX)) -#else -#define verify(EX) assert(EX) -#endif - /* * Utility function to convert a number to a human-readable form. */ From bcbf74fead79a6d0f9a9714f5b0e080ce9c9b9c4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 17 Dec 2008 09:49:02 -0800 Subject: [PATCH 3/3] Remove assert/verify support from zfs_context, moved to assert.h --- lib/libzpool/include/sys/zfs_context.h | 59 +++----------------------- 1 file changed, 6 insertions(+), 53 deletions(-) diff --git a/lib/libzpool/include/sys/zfs_context.h b/lib/libzpool/include/sys/zfs_context.h index 526b8e1fa0..17e3a1dc94 100644 --- a/lib/libzpool/include/sys/zfs_context.h +++ b/lib/libzpool/include/sys/zfs_context.h @@ -102,59 +102,12 @@ extern void vpanic(const char *, __va_list); #define fm_panic panic -/* This definition is copied from assert.h. */ -#ifndef verify -#if defined(__STDC__) -#if __STDC_VERSION__ - 0 >= 199901L -#define verify(EX) (void)((EX) || \ - (__assert_c99(#EX, __FILE__, __LINE__, __func__), 0)) -#else -#define verify(EX) (void)((EX) || (__assert(#EX, __FILE__, __LINE__), 0)) -#endif /* __STDC_VERSION__ - 0 >= 199901L */ -#else -#define verify(EX) (void)((EX) || (_assert("EX", __FILE__, __LINE__), 0)) -#endif /* __STDC__ */ -#endif - -#undef VERIFY -#undef ASSERT - -#define VERIFY verify -#define ASSERT assert - -extern void __assert(const char *, const char *, int); - -#ifdef lint -#define VERIFY3_IMPL(x, y, z, t) if (x == z) ((void)0) -#else -/* BEGIN CSTYLED */ -#define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE) do { \ - const TYPE __left = (TYPE)(LEFT); \ - const TYPE __right = (TYPE)(RIGHT); \ - if (!(__left OP __right)) { \ - char *__buf = alloca(256); \ - (void) snprintf(__buf, 256, "%s %s %s (0x%llx %s 0x%llx)", \ - #LEFT, #OP, #RIGHT, \ - (u_longlong_t)__left, #OP, (u_longlong_t)__right); \ - __assert(__buf, __FILE__, __LINE__); \ - } \ -_NOTE(CONSTCOND) } while (0) -/* END CSTYLED */ -#endif /* lint */ - -#define VERIFY3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t) -#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t) -#define VERIFY3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t) - -#ifdef NDEBUG -#define ASSERT3S(x, y, z) ((void)0) -#define ASSERT3U(x, y, z) ((void)0) -#define ASSERT3P(x, y, z) ((void)0) -#else -#define ASSERT3S(x, y, z) VERIFY3S(x, y, z) -#define ASSERT3U(x, y, z) VERIFY3U(x, y, z) -#define ASSERT3P(x, y, z) VERIFY3P(x, y, z) -#endif +/* + * VERIFY/ASSERT + * + * The verify/assert support moved to libspl/include/assert.h so only + * one version of the code needs to be maintained for all of user space. + */ /* * DTrace SDT probes have different signatures in userland than they do in