1 |
--- a/pickdns-data.c |
2 |
+++ b/pickdns-data.c |
3 |
@@ -123,7 +123,7 @@ void syntaxerror(const char *why) |
4 |
} |
5 |
void die_datatmp(void) |
6 |
{ |
7 |
- strerr_die2sys(111,FATAL,"unable to create data.tmp: "); |
8 |
+ strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: "); |
9 |
} |
10 |
|
11 |
int main() |
12 |
@@ -142,7 +142,7 @@ int main() |
13 |
if (fd == -1) strerr_die2sys(111,FATAL,"unable to open data: "); |
14 |
buffer_init(&b,buffer_unixread,fd,bspace,sizeof bspace); |
15 |
|
16 |
- fdcdb = open_trunc("data.tmp"); |
17 |
+ fdcdb = open_trunc("data.cdb.tmp"); |
18 |
if (fdcdb == -1) die_datatmp(); |
19 |
if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp(); |
20 |
|
21 |
@@ -223,8 +223,8 @@ int main() |
22 |
if (cdb_make_finish(&cdb) == -1) die_datatmp(); |
23 |
if (fsync(fdcdb) == -1) die_datatmp(); |
24 |
if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */ |
25 |
- if (rename("data.tmp","data.cdb") == -1) |
26 |
- strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: "); |
27 |
+ if (rename("data.cdb.tmp","data.cdb") == -1) |
28 |
+ strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: "); |
29 |
|
30 |
_exit(0); |
31 |
} |
32 |
--- a/rbldns-data.c |
33 |
+++ b/rbldns-data.c |
34 |
@@ -42,7 +42,7 @@ void syntaxerror(const char *why) |
35 |
} |
36 |
void die_datatmp(void) |
37 |
{ |
38 |
- strerr_die2sys(111,FATAL,"unable to create data.tmp: "); |
39 |
+ strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: "); |
40 |
} |
41 |
|
42 |
int main() |
43 |
@@ -59,7 +59,7 @@ int main() |
44 |
if (fd == -1) strerr_die2sys(111,FATAL,"unable to open data: "); |
45 |
buffer_init(&b,buffer_unixread,fd,bspace,sizeof bspace); |
46 |
|
47 |
- fdcdb = open_trunc("data.tmp"); |
48 |
+ fdcdb = open_trunc("data.cdb.tmp"); |
49 |
if (fdcdb == -1) die_datatmp(); |
50 |
if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp(); |
51 |
|
52 |
@@ -121,8 +121,8 @@ int main() |
53 |
if (cdb_make_finish(&cdb) == -1) die_datatmp(); |
54 |
if (fsync(fdcdb) == -1) die_datatmp(); |
55 |
if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */ |
56 |
- if (rename("data.tmp","data.cdb") == -1) |
57 |
- strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: "); |
58 |
+ if (rename("data.cdb.tmp","data.cdb") == -1) |
59 |
+ strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: "); |
60 |
|
61 |
_exit(0); |
62 |
} |
63 |
--- a/tinydns-data.c |
64 |
+++ b/tinydns-data.c |
65 |
@@ -27,7 +27,7 @@ |
66 |
|
67 |
void die_datatmp(void) |
68 |
{ |
69 |
- strerr_die2sys(111,FATAL,"unable to create data.tmp: "); |
70 |
+ strerr_die2sys(111,FATAL,"unable to create data.cdb.tmp: "); |
71 |
} |
72 |
void nomem(void) |
73 |
{ |
74 |
@@ -207,7 +207,7 @@ int main() |
75 |
|
76 |
buffer_init(&b,buffer_unixread,fddata,bspace,sizeof bspace); |
77 |
|
78 |
- fdcdb = open_trunc("data.tmp"); |
79 |
+ fdcdb = open_trunc("data.cdb.tmp"); |
80 |
if (fdcdb == -1) die_datatmp(); |
81 |
if (cdb_make_start(&cdb,fdcdb) == -1) die_datatmp(); |
82 |
|
83 |
@@ -487,8 +487,8 @@ int main() |
84 |
if (cdb_make_finish(&cdb) == -1) die_datatmp(); |
85 |
if (fsync(fdcdb) == -1) die_datatmp(); |
86 |
if (close(fdcdb) == -1) die_datatmp(); /* NFS stupidity */ |
87 |
- if (rename("data.tmp","data.cdb") == -1) |
88 |
- strerr_die2sys(111,FATAL,"unable to move data.tmp to data.cdb: "); |
89 |
+ if (rename("data.cdb.tmp","data.cdb") == -1) |
90 |
+ strerr_die2sys(111,FATAL,"unable to move data.cdb.tmp to data.cdb: "); |
91 |
|
92 |
_exit(0); |
93 |
} |