summaryrefslogtreecommitdiff
path: root/tools/lib/api/debug.c
blob: 5fa5cf500a1f960ad04ca8a8149e8ee7f1f39029 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdarg.h>
#include "debug.h"
#include "debug-internal.h"

static int __base_pr(const char *format, ...)
{
	va_list args;
	int err;

	va_start(args, format);
	err = vfprintf(stderr, format, args);
	va_end(args);
	return err;
}

libapi_print_fn_t __pr_warning = __base_pr;
libapi_print_fn_t __pr_info    = __base_pr;
libapi_print_fn_t __pr_debug;

void libapi_set_print(libapi_print_fn_t warn,
		      libapi_print_fn_t info,
		      libapi_print_fn_t debug)
{
	__pr_warning = warn;
	__pr_info    = info;
	__pr_debug   = debug;
}
t.git/commit/include/dt-bindings/reset/mt8135-resets.h?h=nds-private-remove&id=eeeefd41843218c55a8782a6920f044d9bf6207a'>eeeefd41843218c55a8782a6920f044d9bf6207a (patch) treec342eac46626e62745aa8e1a982626efca8b121d /include/dt-bindings/reset/mt8135-resets.h parentc14024dbb156c8392908aaa822097d27c6af8ec8 (diff)
block: don't try Write Same from __blkdev_issue_zeroout
Write Same can return an error asynchronously if it turns out the underlying SCSI device does not support Write Same, which makes a proper fallback to other methods in __blkdev_issue_zeroout impossible. Thus only issue a Write Same from blkdev_issue_zeroout an don't try it at all from __blkdev_issue_zeroout as a non-invasive workaround. Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Junichi Nomura <j-nomura@ce.jp.nec.com> Fixes: e73c23ff ("block: add async variant of blkdev_issue_zeroout") Tested-by: Junichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/dt-bindings/reset/mt8135-resets.h')