++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.");
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 ...");