/[pkgs]/devel/ElectricFence/ElectricFence-2.2.2-banner.patch
ViewVC logotype

Contents of /devel/ElectricFence/ElectricFence-2.2.2-banner.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Wed Mar 28 18:25:42 2007 UTC (2 years, 7 months ago) by pmachata
Branch: MAIN
CVS Tags: ElectricFence-2_2_2-25_fc9, F-12-split, F-10-split, F-7-split, F-11-split, ElectricFence-2_2_2-25, ElectricFence-2_2_2-23, ElectricFence-2_2_2-26_fc11, ElectricFence-2_2_2-27_fc12, F-9-split, F-8-split, HEAD
File MIME type: text/x-patch
- Detect for EF_DISABLE_BANNER env. var before printing out the
  banner.  (Patch adapted from Debian repositories.)
- Resolves: #233702
1 diff -urp ElectricFence-2.2.2/efence.c ElectricFence-2.2.2-pm/efence.c
2 --- ElectricFence-2.2.2/efence.c 2007-03-28 20:16:43.000000000 +0200
3 +++ ElectricFence-2.2.2-pm/efence.c 2007-03-28 20:16:01.000000000 +0200
4 @@ -47,7 +47,7 @@
5 #undef calloc
6 #endif
7
8 -static const char version[] = "\n Electric Fence 2.2.0"
9 +static const char version[] = "\n Electric Fence 2.2.2"
10 " Copyright (C) 1987-1999 Bruce Perens <bruce@perens.com>\n";
11
12 /*
13 @@ -82,6 +82,13 @@ struct _Slot {
14 };
15 typedef struct _Slot Slot;
16
17 + /*
18 + * EF_DISABLE_BANNER is a global variable used to control whether
19 + * Electric Fence prints its usual startup message. If the value is
20 + * -1, it will be set from the environment default to 0 at run time.
21 + */
22 +int EF_DISABLE_BANNER = -1;
23 +
24 /*
25 * EF_ALIGNMENT is a global variable used to control the default alignment
26 * of buffers returned by malloc(), calloc(), and realloc(). It is all-caps
27 @@ -280,7 +287,15 @@ initialize(void)
28 char * string;
29 Slot * slot;
30
31 - EF_Print(version);
32 + if ( EF_DISABLE_BANNER == -1 ) {
33 + if ( (string = getenv("EF_DISABLE_BANNER")) != 0 )
34 + EF_DISABLE_BANNER = atoi(string);
35 + else
36 + EF_DISABLE_BANNER = 0;
37 + }
38 +
39 + if ( EF_DISABLE_BANNER == 0 )
40 + EF_Print(version);
41
42 #ifdef USE_SEMAPHORE
43 if (sem_init != NULL && !pthread_initialization && sem_init(&EF_sem, 0, 1) >= 0) {

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2