Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libspl: staticify buf and pagesize, rename aok to libspl_assert_ok #12050

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -8493,7 +8493,7 @@ main(int argc, char **argv)
dump_opt[c] += verbose;
}

aok = (dump_opt['A'] == 1) || (dump_opt['A'] > 2);
libspl_assert_ok = (dump_opt['A'] == 1) || (dump_opt['A'] > 2);
zfs_recover = (dump_opt['A'] > 1);

argc -= optind;
Expand Down
2 changes: 0 additions & 2 deletions include/sys/zfs_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ extern void vpanic(const char *, va_list) __NORETURN;

#define fm_panic panic

extern int aok;

/*
* DTrace SDT probes have different signatures in userland than they do in
* the kernel. If they're being used in kernel code, re-define them out of
Expand Down
4,815 changes: 2,829 additions & 1,986 deletions lib/libnvpair/libnvpair.abi

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/libspl/assert.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <assert.h>

int aok = 0;
int libspl_assert_ok = 0;

/* printf version of libspl_assert */
void
Expand All @@ -39,7 +39,7 @@ libspl_assertf(const char *file, const char *func, int line,
fprintf(stderr, "\n");
fprintf(stderr, "ASSERT at %s:%d:%s()", file, line, func);
va_end(args);
if (aok) {
if (libspl_assert_ok) {
return;
}
abort();
Expand Down
2 changes: 1 addition & 1 deletion lib/libspl/include/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <stdarg.h>

/* Set to non-zero to avoid abort()ing on an assertion failure */
extern int aok;
extern int libspl_assert_ok;

/* printf version of libspl_assert */
extern void libspl_assertf(const char *file, const char *func, int line,
Expand Down
2 changes: 1 addition & 1 deletion lib/libspl/os/linux/getmntany.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#define BUFSIZE (MNT_LINE_MAX + 2)

__thread char buf[BUFSIZE];
static __thread char buf[BUFSIZE];

#define DIFF(xx) ( \
(mrefp->xx != NULL) && \
Expand Down
2 changes: 1 addition & 1 deletion lib/libspl/page.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <unistd.h>

size_t pagesize = 0;
static size_t pagesize = 0;

size_t
spl_pagesize(void)
Expand Down
2,098 changes: 1,378 additions & 720 deletions lib/libuutil/libuutil.abi

Large diffs are not rendered by default.

5,638 changes: 3,690 additions & 1,948 deletions lib/libzfs_core/libzfs_core.abi

Large diffs are not rendered by default.