Re: Warnings compiling a KLD #including vnode.h

2006-01-29 Thread Sergey Uvarov
Pranav Peshwe wrote: Hello, I am trying to write a pretty simple KLD.It compiles and works correctly. But,if i #include vnode.h in the KLD then i get a number of warnings saying : @/sys/vnode.h:597: warning: "struct vop_lease_args" declared inside parameter list @/sys/vnode.h:597: warn

about PR kern/83375

2005-11-01 Thread Sergey Uvarov
Hello hackers, yesterday, while playing with ptys on 5.3 kernel, I was hit by bug #83375. I have reproduced it quite easely: % /usr/libexec/getty Pc ttyp2 & % /usr/libexec/getty Pc ttyp2 --- kernel panic ttyp2 - not used slave pty I was curious and did some investigation why it happen

Re: accept: Invalid argument

2005-09-06 Thread Sergey Uvarov
Did you issue listen(2) call before accepting connections? Sergey. erkan kolemen wrote: Hi, In a daemon loop, i am using accept() to accept incoming connections. while(1) { if((fd = accept(socketd, (struct sockaddr *) &addr, &addrlen)) == -1) { syslog(LOG_ERR, "accept: %s", strerror(errno))

vn_fullpath() again

2005-09-05 Thread Sergey Uvarov
Hello hackers, all knows that vn_fullpath() is unreliable. However I really need to get a filename for a given vnode. To simplify the task, I do not care of synthetic file systems or hardlinks. I have looked through archives in hope to find a better solution. It seems that linux_getcwd() app

Re: preferable way to control kernel module

2005-08-11 Thread Sergey Uvarov
John Baldwin wrote: On Thursday 11 August 2005 12:16 pm, Dirk GOUDERS wrote: > > Thank you for advise. But I wonder: what is wrong with syscall > > approach (via SYSCALL_MODULE macro)? > > I just haven't done one personally. I think there's also a lot more > potenti al > for collisions when tr

Re: preferable way to control kernel module

2005-08-10 Thread Sergey Uvarov
I'm writing a kernel module for my own needs. AFAIK the following methods could be used: 1) allocate not used system call with help of SYSCALL_MODULE macro 2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an appropriate sysctl handler(s) 3) add a file in /dev and use ioctl(2) call

Re: preferable way to control kernel module

2005-08-10 Thread Sergey Uvarov
John Baldwin wrote: On Wednesday 10 August 2005 04:29 pm, Sergey Uvarov wrote: Hello hackers, I'm writing a kernel module for my own needs. AFAIK the following methods could be used: 1) allocate not used system call with help of SYSCALL_MODULE macro 2) allocate proprieatry oi

preferable way to control kernel module

2005-08-10 Thread Sergey Uvarov
Hello hackers, I'm writing a kernel module for my own needs. AFAIK the following methods could be used: 1) allocate not used system call with help of SYSCALL_MODULE macro 2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an appropriate sysctl handler(s) 3) add a file in /dev a

file locking

2005-07-27 Thread Sergey Uvarov
Hello hackers, man page for flock(2) and fcntl(2) reads that a system call returns EOPNOTSUPP if file descriptor refers to an object that does not support file locking. However, it seems that it is not always true. For example, if underlying object is a device or a fifo returned error code d