Re: textvp_fullpath

2008-08-15 Thread Uladzislau Rezki
On 14 August 2008 21:43:29 Roman Divacky wrote:
 On Thu, Aug 14, 2008 at 09:20:12PM +0300, Uladzislau Rezki wrote:
  Hello folks,
 
  I'm using textvp_fullpath function to get full path from vnode up to
  root dir. The problem is that, sometimes it works, sometimes no.
 
  I know that textvp_fullpath goes through the cache of the vnode and
  try to build full path.
 
  Are there any other ways to get full path?
  I haven't had any ideas yet, that is why I am asking you.

 no... the vnode-full_path lookup is unreliable by definition
Yes , I've already got it.

 in FreeBSD... what exactly are you trying to acomplish? I believe
 there might be other way to do whatever you want to do..

Well, I will try to describe it in more detail what i want to do, see below:

The main task is, to pass information from the kernel space to user land
about modification of file system via character device.

For instance, we do something like that:
echo 123  /etc/passwd

we intercept the write system call and from this point we are within our own 
call:

static int
our_own_write_syscall (struct proc *p, struct write_args *uap)
{
struct vnode *vn = NULL;
struct file *file;
int sys_error;

/* do system call */
sys_error = write(p, uap);
if (sys_error != 0)
goto leave_call;

/* get the file */
file = p-p_fd-fd_ofiles[uap-fd];

/* get the vnode */
vn = (struct vnode *) file-f_data;
...
}

We have to to do a few thinks:

1) do original write sys call;
2) get full path (/etc/passwd);
3) put all this information to user land through the character device.

I get stuck in point 2. I need to get full path, but how ...

Thanks in advance.

--
Uladzislau Rezki
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tilt/horizontal scroll support

2008-08-15 Thread Andriy Gapon
on 13/08/2008 19:29 Rui Paulo said the following:
 
 Well, perhaps the best way is to teach sysmouse about horizontal scrolling
 and then add a quirk WRT your mouse ?
 
 sysmouse(4) really needs to grow horizontal scrolling since nowadays every
 mouse has it.

Rui,

I agree, this would be a perfect solution.
What scares me is backward compatibility. I think that I do not
understand how to do it right. So that older userland software works
with newer kernels and newer userland works with older kernels.
As I understand there are interfaces of hardware mouse drivers, then
there is moused, then there is sysmouse interface and then there are
user applications like X server.
Knowledge of horizontal scrolling needs to be added to all components in
the chain and it is better be done in backward-compatible fashion.
And I really do not know to do this properly.
Would it be just adding some new bytes to the protocol or growing a new
protocol (level) or something else...

P.S. I replaced usb ml with arch@ in cc.

-- 
Andriy Gapon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


startup options

2008-08-15 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I was wondering if it was possible, with a machine that has about 2 year old
dual AMD64 processors and an up-to-date AMI BIOS, to get the machine to be able
to start up from a power shutdown, after some sort of a network signal?

If it might be possible, could you maybe put me onto the path of whatever info
there might be on that subject?
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkil6/YACgkQz62J6PPcoOk0wQCfTxUcKLOdhsOUvpwVNYOw74Ly
V04AoISC3BGQsnlJeCUsdSc/VxK+K0D6
=FsXX
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: startup options

2008-08-15 Thread Vincent Hoffman
Chuck Robey wrote:
 I was wondering if it was possible, with a machine that has about 2
 year old
 dual AMD64 processors and an up-to-date AMI BIOS, to get the machine
 to be able
 to start up from a power shutdown, after some sort of a network signal?

 If it might be possible, could you maybe put me onto the path of
 whatever info
 there might be on that subject?
Wake on LAN is I believe a work in progress.
http://wiki.freebsd.org/WakeOnLan
its not an area I have much knowledge of though so other might be able
to help more.

Vince
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: startup options

2008-08-15 Thread Stefan Sperling
On Fri, Aug 15, 2008 at 10:00:25PM +0100, Vincent Hoffman wrote:
 Chuck Robey wrote:
  I was wondering if it was possible, with a machine that has about 2
  year old
  dual AMD64 processors and an up-to-date AMI BIOS, to get the machine
  to be able
  to start up from a power shutdown, after some sort of a network signal?
 
  If it might be possible, could you maybe put me onto the path of
  whatever info
  there might be on that subject?
 Wake on LAN is I believe a work in progress.
 http://wiki.freebsd.org/WakeOnLan
 its not an area I have much knowledge of though so other might be able
 to help more.

That page pretty much summarises the state of affairs, yes.

Basically, you need a VIA-based ethernet card card (vr driver)
and -CURRENT, or a vr card with 7.0 and patches from here:
http://www.stsp.name/wol/FreeBSD-8-CURRENT-wol-backported-to-7.0/
All of those. Except the patch for pxe.c, that's there by accident.

If you don't have a vr card, you will likely need to do some
hacking. Follow the links from the wiki page for more information.

Stefan
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: startup options

2008-08-15 Thread Sam Leffler

Stefan Sperling wrote:

On Fri, Aug 15, 2008 at 10:00:25PM +0100, Vincent Hoffman wrote:
  

Chuck Robey wrote:


I was wondering if it was possible, with a machine that has about 2
year old
dual AMD64 processors and an up-to-date AMI BIOS, to get the machine
to be able
to start up from a power shutdown, after some sort of a network signal?

If it might be possible, could you maybe put me onto the path of
whatever info
there might be on that subject?
  

Wake on LAN is I believe a work in progress.
http://wiki.freebsd.org/WakeOnLan
its not an area I have much knowledge of though so other might be able
to help more.



That page pretty much summarises the state of affairs, yes.

Basically, you need a VIA-based ethernet card card (vr driver)
and -CURRENT, or a vr card with 7.0 and patches from here:
http://www.stsp.name/wol/FreeBSD-8-CURRENT-wol-backported-to-7.0/
All of those. Except the patch for pxe.c, that's there by accident.

If you don't have a vr card, you will likely need to do some
hacking. Follow the links from the wiki page for more information.

  

trouble% cd sys/dev/
trouble% grep -l IFCAP_WOL */*.c
age/if_age.c
jme/if_jme.c
re/if_re.c
stge/if_stge.c
vr/if_vr.c

So 5 drivers right now support WOL.  Jack said em had support a while 
back but he seems to have not hooked it up.


   Sam

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: textvp_fullpath

2008-08-15 Thread Robert Watson


On Fri, 15 Aug 2008, Uladzislau Rezki wrote:


We have to to do a few thinks:

1) do original write sys call;
2) get full path (/etc/passwd);
3) put all this information to user land through the character device.

I get stuck in point 2. I need to get full path, but how ...


In FreeBSD 6.2 and higher, the kernel event auditing facility provides exactly 
this service already.  Take a look at the auditpipe(4) facility for details of 
the run-time monitoring aspect of that.


Robert N M Watson
Computer Laboratory
University of Cambridge
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]