Date: Tue, 4 Mar 2008 17:02:12 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 136828 for review Message-ID: <200803041702.m24H2CFS024804@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=136828 Change 136828 by rdivacky@rdivacky_witten on 2008/03/04 17:01:27 Some comment changes + printf and change from EINVAL to ENOSYS for some operation we dont support yet. Suggested by: netchild Affected files ... .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/compat/linux/linux_epoll.c#10 edit Differences ... ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/compat/linux/linux_epoll.c#10 (text+ko) ==== @@ -57,7 +57,9 @@ if (args->size <= 0) return (EINVAL); - /* args->size is unused. Linux ignores it as well. */ + /* + * args->size is unused. Linux just tests it + * and then forgets it as well. */ return (kqueue(td, &k_args)); } @@ -140,7 +142,9 @@ /* * Copyin callback used by kevent. This copies already - * converted filters to the kevent internal memory. + * converted filters from kernel memory to the kevent + * internal kernel memory. Hence the memcpy instead of + * copyin. */ static int linux_kev_copyin(void *arg, struct kevent *kevp, int count) @@ -193,7 +197,8 @@ break; case LINUX_EPOLL_CTL_MOD: /* TODO: DELETE && ADD maybe? */ - return (EINVAL); + printf("linux_epoll_ctl: CTL_MOD not yet implemented.\n"); + return (ENOSYS); break; case LINUX_EPOLL_CTL_DEL: kev.flags = EV_DELETE | EV_DISABLE; @@ -241,6 +246,9 @@ error = kern_kevent(td, args->epfd, 0, args->maxevents, &k_ops, &ts); - /* translation? */ + /* + * kern_keven might return ENOMEM which is not expected from epoll_wait. + * Maybe we should translate that but I don't think it matters at all. + */ return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803041702.m24H2CFS024804>