projects
/
my-code
/
hdw-sniff.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9dbed1c
)
O_APPEND for log file
author
hackbard
<hackbard>
Thu, 2 Jun 2005 21:35:50 +0000
(21:35 +0000)
committer
hackbard
<hackbard>
Thu, 2 Jun 2005 21:35:50 +0000
(21:35 +0000)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
fda8c45
..
4a878cf
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-193,7
+193,7
@@
int main(int argc, char **argv) {
++i;
break;
case 'l':
++i;
break;
case 'l':
- if((info.log_fd=open(argv[i+1],O_RDWR|O_CREAT))!=0)
+ if((info.log_fd=open(argv[i+1],O_RDWR|O_CREAT
|O_APPEND
))!=0)
printf("logfile -> %s\n",argv[i+1]);
else
puts("warning: can't write to logfile.");
printf("logfile -> %s\n",argv[i+1]);
else
puts("warning: can't write to logfile.");
@@
-231,7
+231,7
@@
int main(int argc, char **argv) {
system(sys_call);
if(info.log_fd==0) {
system(sys_call);
if(info.log_fd==0) {
- if((info.log_fd=open("/tmp/hdw-sniff.log",O_RDWR|O_CREAT))!=0)
+ if((info.log_fd=open("/tmp/hdw-sniff.log",O_RDWR|O_CREAT
|O_APPEND
))!=0)
puts("using logfile /tmp/hdw-sniff.log ...");
else {
puts("failed to open logfile ...");
puts("using logfile /tmp/hdw-sniff.log ...");
else {
puts("failed to open logfile ...");