Sorry , uiomove does not written no of bytes copied from user_space to kernel space or from kernel space to userspace .My understanding was wrong . uiomove returns 0 on success . Regards, Rashmi
On 12/12/05, rashmi ns <[EMAIL PROTECTED]> wrote: > Hello Team, > when i use "uiomove" in the character device > interface the no of bytes transfrerred between kernel and userspace is > zero .but the actual data transferred when trraced through > "uio->resid" is correct .can any one explain why this is happening ? > > /*Character Device Interfaces*/ > static struct cdevsw hdlc_cdevsw = { > > .d_maj = CDEV_MAJOR, > .d_open = hdlc_open, > .d_read = hdlc_read, > .d_write = hdlc_write, > .d_ioctl = hdlc_ioctl, > .d_close = hdlc_close, > .d_version = D_VERSION, > }; > static int hdlc_write(dev_t dev, struct uio *uio, int ioflag) > { > int towrite,written; /*char device inf*/ > written=uiomove((void *)write_tx_buffer,towrite,uio); > uprintf("uio->resid=%d",uio->uio_resid); > uprintf("No of bytes written =%d",written); > > > > > } > > Thanks and Regards, > Rashmi.N.S > _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"