summaryrefslogtreecommitdiff
path: root/sig.c
blob: 2b5ab5ecadd20d76e0913ebbe7539f85eedbee03 (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
29
30
31
32
#include <stdio.h>
#include <signal.h>

#include "sig.h"

void register_signal(int signal, void (*handler)(int))
{
	sigset_t block_mask;
	struct sigaction saction;

	sigfillset(&block_mask);

	saction.sa_handler = handler;
	saction.sa_mask = block_mask;
	saction.sa_flags = SA_RESTART;

	sigaction(signal, &saction, NULL);
}

void register_signal_f(int signal, void (*handler)(int), int flags)
{
	sigset_t block_mask;
	struct sigaction saction;

	sigfillset(&block_mask);

	saction.sa_handler = handler;
	saction.sa_mask = block_mask;
	saction.sa_flags = flags;

	sigaction(signal, &saction, NULL);
}
t.git/commit/fs/udf/udfdecl.h?id=a40ecd7b3ccf520ff02da93e8d1ba6cd55c2e359'>a40ecd7b3ccf520ff02da93e8d1ba6cd55c2e359 (patch) treedd5e340a20c85f7962a4e7861854e066586d1d02 /fs/udf/udfdecl.h parent8076c363da15e7c35a4094974d1b4bcc196b5fa9 (diff)
udf: Rename udf_warning to udf_warn
Rename udf_warning to udf_warn for consistency with normal logging uses of pr_warn. Rename function udf_warning to _udf_warn. Remove __func__ from uses and move __func__ to a new udf_warn macro that calls _udf_warn. Add \n's to uses of udf_warn, remove \n from _udf_warn. Coalesce formats. Reviewed-by: NamJae Jeon <linkinjeon@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udfdecl.h')