Wed Sep 19 21:19:15 2012 UTC ()
emulate ppoll which is essentially our pollts


(pooka)
diff -r1.76 -r1.77 src/sys/compat/linux/arch/alpha/syscalls.master
diff -r1.40 -r1.41 src/sys/compat/linux/arch/amd64/syscalls.master
diff -r1.48 -r1.49 src/sys/compat/linux/arch/arm/syscalls.master
diff -r1.107 -r1.108 src/sys/compat/linux/arch/i386/syscalls.master
diff -r1.73 -r1.74 src/sys/compat/linux/arch/m68k/syscalls.master
diff -r1.43 -r1.44 src/sys/compat/linux/arch/mips/syscalls.master
diff -r1.50 -r1.51 src/sys/compat/linux/arch/powerpc/syscalls.master
diff -r1.219 -r1.220 src/sys/compat/linux/common/linux_misc.c

cvs diff -r1.76 -r1.77 src/sys/compat/linux/arch/alpha/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/alpha/syscalls.master 2011/11/18 04:03:50 1.76
+++ src/sys/compat/linux/arch/alpha/syscalls.master 2012/09/19 21:19:14 1.77
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.76 2011/11/18 04:03:50 christos Exp $ 1 $NetBSD: syscalls.master,v 1.77 2012/09/19 21:19:14 pooka Exp $
2; 2;
3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4 4
5; NetBSD alpha COMPAT_LINUX system call name/number "master" file. 5; NetBSD alpha COMPAT_LINUX system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.) 6; (See syscalls.conf to see what it is processed into.)
7; 7;
8; Fields: number type [type-dependent ...] 8; Fields: number type [type-dependent ...]
9; number system call number, must be in order 9; number system call number, must be in order
10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
11; the compatibility options defined in syscalls.conf. 11; the compatibility options defined in syscalls.conf.
12; 12;
13; types: 13; types:
14; STD always included 14; STD always included
@@ -702,27 +702,29 @@ @@ -702,27 +702,29 @@
702451 UNIMPL mkdirat 702451 UNIMPL mkdirat
703452 UNIMPL mknodat 703452 UNIMPL mknodat
704453 UNIMPL fchownat 704453 UNIMPL fchownat
705454 UNIMPL futimesat 705454 UNIMPL futimesat
706455 UNIMPL fstatat64 706455 UNIMPL fstatat64
707456 UNIMPL unlinkat 707456 UNIMPL unlinkat
708457 UNIMPL renameat 708457 UNIMPL renameat
709458 UNIMPL linkat 709458 UNIMPL linkat
710459 UNIMPL symlinkat 710459 UNIMPL symlinkat
711460 UNIMPL readlinkat 711460 UNIMPL readlinkat
712461 UNIMPL fchmodat 712461 UNIMPL fchmodat
713462 UNIMPL faccessat 713462 UNIMPL faccessat
714463 UNIMPL pselect6 714463 UNIMPL pselect6
715464 UNIMPL ppoll 715464 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
 716 struct linux_timespec *timeout, \
 717 linux_sigset_t *sigset); }
716465 UNIMPL unshare 718465 UNIMPL unshare
717466 STD { int|linux_sys||set_robust_list( \ 719466 STD { int|linux_sys||set_robust_list( \
718 struct linux_robust_list_head *head, size_t len); } 720 struct linux_robust_list_head *head, size_t len); }
719467 STD { int|linux_sys||get_robust_list(int pid, \ 721467 STD { int|linux_sys||get_robust_list(int pid, \
720 struct linux_robust_list_head **head, \ 722 struct linux_robust_list_head **head, \
721 size_t *len); } 723 size_t *len); }
722468 UNIMPL splice 724468 UNIMPL splice
723469 UNIMPL sync_file_range 725469 UNIMPL sync_file_range
724470 UNIMPL tee 726470 UNIMPL tee
725471 UNIMPL vmsplice 727471 UNIMPL vmsplice
726472 UNIMPL move_pages 728472 UNIMPL move_pages
727473 UNIMPL getcpu 729473 UNIMPL getcpu
728474 UNIMPL epoll_wait 730474 UNIMPL epoll_wait

cvs diff -r1.40 -r1.41 src/sys/compat/linux/arch/amd64/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/amd64/syscalls.master 2011/11/18 04:03:50 1.40
+++ src/sys/compat/linux/arch/amd64/syscalls.master 2012/09/19 21:19:14 1.41
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.40 2011/11/18 04:03:50 christos Exp $ 1 $NetBSD: syscalls.master,v 1.41 2012/09/19 21:19:14 pooka Exp $
2 2
3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4 4
5; NetBSD amd64 COMPAT_LINUX system call name/number "master" file. 5; NetBSD amd64 COMPAT_LINUX system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.) 6; (See syscalls.conf to see what it is processed into.)
7; 7;
8; Fields: number type [type-dependent ...] 8; Fields: number type [type-dependent ...]
9; number system call number, must be in order 9; number system call number, must be in order
10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
11; the compatibility options defined in syscalls.conf. 11; the compatibility options defined in syscalls.conf.
12; 12;
13; types: 13; types:
14; STD always included 14; STD always included
@@ -466,27 +466,29 @@ @@ -466,27 +466,29 @@
466258 UNIMPL mkdirat 466258 UNIMPL mkdirat
467259 UNIMPL mknodat 467259 UNIMPL mknodat
468260 UNIMPL fchownat 468260 UNIMPL fchownat
469261 UNIMPL futimesat 469261 UNIMPL futimesat
470262 UNIMPL newfstatat 470262 UNIMPL newfstatat
471263 UNIMPL unlinkat 471263 UNIMPL unlinkat
472264 UNIMPL renameat 472264 UNIMPL renameat
473265 UNIMPL linkat 473265 UNIMPL linkat
474266 UNIMPL symlinkat 474266 UNIMPL symlinkat
475267 UNIMPL readlinkat 475267 UNIMPL readlinkat
476268 UNIMPL fchmodat 476268 UNIMPL fchmodat
477269 UNIMPL faccessat 477269 UNIMPL faccessat
478270 UNIMPL pselect6 478270 UNIMPL pselect6
479271 UNIMPL ppoll 479271 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
 480 struct linux_timespec *timeout, \
 481 linux_sigset_t *sigset); }
480272 UNIMPL unshare 482272 UNIMPL unshare
481273 STD { int|linux_sys||set_robust_list( \ 483273 STD { int|linux_sys||set_robust_list( \
482 struct linux_robust_list_head *head, size_t len); } 484 struct linux_robust_list_head *head, size_t len); }
483274 STD { int|linux_sys||get_robust_list(int pid, \ 485274 STD { int|linux_sys||get_robust_list(int pid, \
484 struct linux_robust_list_head **head, \ 486 struct linux_robust_list_head **head, \
485 size_t *len); } 487 size_t *len); }
486275 UNIMPL splice 488275 UNIMPL splice
487276 UNIMPL tee 489276 UNIMPL tee
488277 UNIMPL sync_file_range 490277 UNIMPL sync_file_range
489278 UNIMPL vmsplice 491278 UNIMPL vmsplice
490279 UNIMPL move_pages 492279 UNIMPL move_pages
491280 UNIMPL utimensat 493280 UNIMPL utimensat
492281 UNIMPL epoll_pwait 494281 UNIMPL epoll_pwait

cvs diff -r1.48 -r1.49 src/sys/compat/linux/arch/arm/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/arm/syscalls.master 2011/11/18 04:03:50 1.48
+++ src/sys/compat/linux/arch/arm/syscalls.master 2012/09/19 21:19:14 1.49
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.48 2011/11/18 04:03:50 christos Exp $ 1 $NetBSD: syscalls.master,v 1.49 2012/09/19 21:19:14 pooka Exp $
2 2
3; Derived from sys/compat/linux/arch/*/syscalls.master 3; Derived from sys/compat/linux/arch/*/syscalls.master
4; and from Linux 2.4.12 arch/arm/kernel/calls.S 4; and from Linux 2.4.12 arch/arm/kernel/calls.S
5 5
6; NetBSD/arm COMPAT_LINUX system call name/number "master" file. 6; NetBSD/arm COMPAT_LINUX system call name/number "master" file.
7; (See syscalls.conf to see what it is processed into.) 7; (See syscalls.conf to see what it is processed into.)
8; 8;
9; Fields: number type [type-dependent ...] 9; Fields: number type [type-dependent ...]
10; number system call number, must be in order 10; number system call number, must be in order
11; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 11; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
12; the compatibility options defined in syscalls.conf. 12; the compatibility options defined in syscalls.conf.
13; 13;
14; types: 14; types:
@@ -507,27 +507,29 @@ @@ -507,27 +507,29 @@
507323 UNIMPL mkdirat 507323 UNIMPL mkdirat
508324 UNIMPL mknodat 508324 UNIMPL mknodat
509325 UNIMPL fchownat 509325 UNIMPL fchownat
510326 UNIMPL futimesat 510326 UNIMPL futimesat
511327 UNIMPL fstatat64 511327 UNIMPL fstatat64
512328 UNIMPL unlinkat 512328 UNIMPL unlinkat
513329 UNIMPL renameat 513329 UNIMPL renameat
514330 UNIMPL linkat 514330 UNIMPL linkat
515331 UNIMPL symlinkat 515331 UNIMPL symlinkat
516332 UNIMPL readlinkat 516332 UNIMPL readlinkat
517333 UNIMPL fchmodat 517333 UNIMPL fchmodat
518334 UNIMPL faccessat 518334 UNIMPL faccessat
519335 UNIMPL pselect6 519335 UNIMPL pselect6
520336 UNIMPL ppoll 520336 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
 521 struct linux_timespec *timeout, \
 522 linux_sigset_t *sigset); }
521337 UNIMPL unshare 523337 UNIMPL unshare
522338 STD { int|linux_sys||set_robust_list( \ 524338 STD { int|linux_sys||set_robust_list( \
523 struct linux_robust_list_head *head, size_t len); } 525 struct linux_robust_list_head *head, size_t len); }
524339 STD { int|linux_sys||get_robust_list(int pid, \ 526339 STD { int|linux_sys||get_robust_list(int pid, \
525 struct linux_robust_list_head **head, \ 527 struct linux_robust_list_head **head, \
526 size_t *len); } 528 size_t *len); }
527340 UNIMPL splice 529340 UNIMPL splice
528341 UNIMPL sync_file_range2 530341 UNIMPL sync_file_range2
529342 UNIMPL tee 531342 UNIMPL tee
530343 UNIMPL vmsplice 532343 UNIMPL vmsplice
531344 UNIMPL move_pages 533344 UNIMPL move_pages
532345 UNIMPL getcpu 534345 UNIMPL getcpu
533346 UNIMPL epoll_wait 535346 UNIMPL epoll_wait

cvs diff -r1.107 -r1.108 src/sys/compat/linux/arch/i386/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/i386/syscalls.master 2011/11/18 04:03:50 1.107
+++ src/sys/compat/linux/arch/i386/syscalls.master 2012/09/19 21:19:14 1.108
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.107 2011/11/18 04:03:50 christos Exp $ 1 $NetBSD: syscalls.master,v 1.108 2012/09/19 21:19:14 pooka Exp $
2 2
3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4 4
5; NetBSD i386 COMPAT_LINUX system call name/number "master" file. 5; NetBSD i386 COMPAT_LINUX system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.) 6; (See syscalls.conf to see what it is processed into.)
7; 7;
8; Fields: number type [type-dependent ...] 8; Fields: number type [type-dependent ...]
9; number system call number, must be in order 9; number system call number, must be in order
10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
11; the compatibility options defined in syscalls.conf. 11; the compatibility options defined in syscalls.conf.
12; 12;
13; types: 13; types:
14; STD always included 14; STD always included
@@ -480,27 +480,29 @@ @@ -480,27 +480,29 @@
480296 UNIMPL mkdirat 480296 UNIMPL mkdirat
481297 UNIMPL mknodat 481297 UNIMPL mknodat
482298 UNIMPL fchownat 482298 UNIMPL fchownat
483299 UNIMPL futimesat 483299 UNIMPL futimesat
484300 UNIMPL fstatat64 484300 UNIMPL fstatat64
485301 UNIMPL unlinkat 485301 UNIMPL unlinkat
486302 UNIMPL renameat 486302 UNIMPL renameat
487303 UNIMPL linkat 487303 UNIMPL linkat
488304 UNIMPL symlinkat 488304 UNIMPL symlinkat
489305 UNIMPL readlinkat 489305 UNIMPL readlinkat
490306 UNIMPL fchmodat 490306 UNIMPL fchmodat
491307 UNIMPL faccessat 491307 UNIMPL faccessat
492308 UNIMPL pselect6 492308 UNIMPL pselect6
493309 UNIMPL ppoll 493309 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
 494 struct linux_timespec *timeout, \
 495 linux_sigset_t *sigset); }
494310 UNIMPL unshare 496310 UNIMPL unshare
495311 STD { int|linux_sys||set_robust_list( \ 497311 STD { int|linux_sys||set_robust_list( \
496 struct linux_robust_list_head *head, size_t len); } 498 struct linux_robust_list_head *head, size_t len); }
497312 STD { int|linux_sys||get_robust_list(int pid, \ 499312 STD { int|linux_sys||get_robust_list(int pid, \
498 struct linux_robust_list_head **head, \ 500 struct linux_robust_list_head **head, \
499 size_t *len); } 501 size_t *len); }
500313 UNIMPL splice 502313 UNIMPL splice
501314 UNIMPL sync_file_range 503314 UNIMPL sync_file_range
502315 UNIMPL tee 504315 UNIMPL tee
503316 UNIMPL vmsplice 505316 UNIMPL vmsplice
504317 UNIMPL move_pages 506317 UNIMPL move_pages
505318 UNIMPL getcpu 507318 UNIMPL getcpu
506319 UNIMPL epoll_wait 508319 UNIMPL epoll_wait

cvs diff -r1.73 -r1.74 src/sys/compat/linux/arch/m68k/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/m68k/syscalls.master 2011/11/18 04:03:50 1.73
+++ src/sys/compat/linux/arch/m68k/syscalls.master 2012/09/19 21:19:14 1.74
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.73 2011/11/18 04:03:50 christos Exp $ 1 $NetBSD: syscalls.master,v 1.74 2012/09/19 21:19:14 pooka Exp $
2 2
3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4 4
5; NetBSD m68k COMPAT_LINUX system call name/number "master" file. 5; NetBSD m68k COMPAT_LINUX system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.) 6; (See syscalls.conf to see what it is processed into.)
7; 7;
8; Fields: number type [type-dependent ...] 8; Fields: number type [type-dependent ...]
9; number system call number, must be in order 9; number system call number, must be in order
10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
11; the compatibility options defined in syscalls.conf. 11; the compatibility options defined in syscalls.conf.
12; 12;
13; types: 13; types:
14; STD always included 14; STD always included
@@ -488,27 +488,29 @@ @@ -488,27 +488,29 @@
488289 UNIMPL mkdirat 488289 UNIMPL mkdirat
489290 UNIMPL mknodat 489290 UNIMPL mknodat
490291 UNIMPL fchownat 490291 UNIMPL fchownat
491292 UNIMPL futimesat 491292 UNIMPL futimesat
492293 UNIMPL fstatat64 492293 UNIMPL fstatat64
493294 UNIMPL unlinkat 493294 UNIMPL unlinkat
494295 UNIMPL renameat 494295 UNIMPL renameat
495296 UNIMPL linkat 495296 UNIMPL linkat
496297 UNIMPL symlinkat 496297 UNIMPL symlinkat
497298 UNIMPL readlinkat 497298 UNIMPL readlinkat
498299 UNIMPL fchmodat 498299 UNIMPL fchmodat
499300 UNIMPL faccessat 499300 UNIMPL faccessat
500301 UNIMPL pselect6 500301 UNIMPL pselect6
501302 UNIMPL ppoll 501302 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
 502 struct linux_timespec *timeout, \
 503 linux_sigset_t *sigset); }
502303 UNIMPL unshare 504303 UNIMPL unshare
503304 STD { int|linux_sys||set_robust_list( \ 505304 STD { int|linux_sys||set_robust_list( \
504 struct linux_robust_list_head *head, size_t len); } 506 struct linux_robust_list_head *head, size_t len); }
505305 STD { int|linux_sys||get_robust_list(int pid, \ 507305 STD { int|linux_sys||get_robust_list(int pid, \
506 struct linux_robust_list_head **head, \ 508 struct linux_robust_list_head **head, \
507 size_t *len); } 509 size_t *len); }
508306 UNIMPL splice 510306 UNIMPL splice
509307 UNIMPL sync_file_range 511307 UNIMPL sync_file_range
510308 UNIMPL tee 512308 UNIMPL tee
511309 UNIMPL vmsplice 513309 UNIMPL vmsplice
512310 UNIMPL move_pages 514310 UNIMPL move_pages
513311 STD { int|linux_sys||sched_setaffinity(pid_t pid, \ 515311 STD { int|linux_sys||sched_setaffinity(pid_t pid, \
514 unsigned int len, unsigned long *mask); } 516 unsigned int len, unsigned long *mask); }

cvs diff -r1.43 -r1.44 src/sys/compat/linux/arch/mips/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/mips/syscalls.master 2011/11/18 04:03:51 1.43
+++ src/sys/compat/linux/arch/mips/syscalls.master 2012/09/19 21:19:15 1.44
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.43 2011/11/18 04:03:51 christos Exp $  1 $NetBSD: syscalls.master,v 1.44 2012/09/19 21:19:15 pooka Exp $
2 2
3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4 4
5; Derived from NetBSD's sys/compat/linux/arch/powerpc/syscalls.master 5; Derived from NetBSD's sys/compat/linux/arch/powerpc/syscalls.master
6; from Linux's arch/mips/kernel/syscalls.h 6; from Linux's arch/mips/kernel/syscalls.h
7 7
8; NetBSD mips COMPAT_LINUX system call name/number "master" file. 8; NetBSD mips COMPAT_LINUX system call name/number "master" file.
9; (See syscalls.conf to see what it is processed into.) 9; (See syscalls.conf to see what it is processed into.)
10; 10;
11; Expect problems with 11; Expect problems with
12; 48 signal: undefined in Linux??? 12; 48 signal: undefined in Linux???
13; 86 uselib: needs a.out 13; 86 uselib: needs a.out
14; 14;
@@ -477,27 +477,29 @@ @@ -477,27 +477,29 @@
477289 UNIMPL mkdirat 477289 UNIMPL mkdirat
478290 UNIMPL mknodat 478290 UNIMPL mknodat
479291 UNIMPL fchownat 479291 UNIMPL fchownat
480292 UNIMPL futimesat 480292 UNIMPL futimesat
481293 UNIMPL fstatat64 481293 UNIMPL fstatat64
482294 UNIMPL unlinkat 482294 UNIMPL unlinkat
483295 UNIMPL renameat 483295 UNIMPL renameat
484296 UNIMPL linkat 484296 UNIMPL linkat
485297 UNIMPL symlinkat 485297 UNIMPL symlinkat
486298 UNIMPL readlinkat 486298 UNIMPL readlinkat
487299 UNIMPL fchmodat 487299 UNIMPL fchmodat
488300 UNIMPL faccessat 488300 UNIMPL faccessat
489301 UNIMPL pselect6 489301 UNIMPL pselect6
490302 UNIMPL ppoll 490302 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
 491 struct linux_timespec *timeout, \
 492 linux_sigset_t *sigset); }
491303 UNIMPL unshare 493303 UNIMPL unshare
492304 UNIMPL splice 494304 UNIMPL splice
493305 UNIMPL sync_file_range 495305 UNIMPL sync_file_range
494306 UNIMPL tee 496306 UNIMPL tee
495307 UNIMPL vmsplice 497307 UNIMPL vmsplice
496308 UNIMPL move_pages 498308 UNIMPL move_pages
497309 STD { int|linux_sys||set_robust_list( \ 499309 STD { int|linux_sys||set_robust_list( \
498 struct linux_robust_list_head *head, size_t len); } 500 struct linux_robust_list_head *head, size_t len); }
499310 STD { int|linux_sys||get_robust_list(int pid, \ 501310 STD { int|linux_sys||get_robust_list(int pid, \
500 struct linux_robust_list_head **head, \ 502 struct linux_robust_list_head **head, \
501 size_t *len); } 503 size_t *len); }
502311 UNIMPL kexec_load 504311 UNIMPL kexec_load
503312 UNIMPL getcpu 505312 UNIMPL getcpu

cvs diff -r1.50 -r1.51 src/sys/compat/linux/arch/powerpc/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/powerpc/syscalls.master 2011/11/18 04:03:51 1.50
+++ src/sys/compat/linux/arch/powerpc/syscalls.master 2012/09/19 21:19:15 1.51
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.50 2011/11/18 04:03:51 christos Exp $  1 $NetBSD: syscalls.master,v 1.51 2012/09/19 21:19:15 pooka Exp $
2 2
3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4 4
5; Derived from NetBSD's sys/compat/linux/arch/i386/syscalls.master 5; Derived from NetBSD's sys/compat/linux/arch/i386/syscalls.master
6; sys/compat/linux/arch/m68k/syscalls.master 6; sys/compat/linux/arch/m68k/syscalls.master
7; and from Linux's arch/ppc/kernel/misc.S 7; and from Linux's arch/ppc/kernel/misc.S
8; 8;
9; We have problems for a few syscalls, specially: 9; We have problems for a few syscalls, specially:
10; 142 ppc_select -> sys_new_select -> sys_select (Conflicts with 82 ???). 10; 142 ppc_select -> sys_new_select -> sys_select (Conflicts with 82 ???).
11; 11;
12; Expect problems with the following, which have an architecture dependent 12; Expect problems with the following, which have an architecture dependent
13; implementation in Linux/powerpc: 13; implementation in Linux/powerpc:
14; 29 pause 14; 29 pause
@@ -466,27 +466,29 @@ @@ -466,27 +466,29 @@
466268 UNIMPL kexec_load 466268 UNIMPL kexec_load
467269 UNIMPL add_key 467269 UNIMPL add_key
468270 UNIMPL request_key 468270 UNIMPL request_key
469271 UNIMPL keyctl 469271 UNIMPL keyctl
470272 UNIMPL waitid 470272 UNIMPL waitid
471273 UNIMPL ioprio_set 471273 UNIMPL ioprio_set
472274 UNIMPL ioprio_get 472274 UNIMPL ioprio_get
473275 UNIMPL inotify_init 473275 UNIMPL inotify_init
474276 UNIMPL inotify_add_watch 474276 UNIMPL inotify_add_watch
475277 UNIMPL inotify_rm_watch 475277 UNIMPL inotify_rm_watch
476278 UNIMPL spu_run 476278 UNIMPL spu_run
477279 UNIMPL spu_create 477279 UNIMPL spu_create
478280 UNIMPL pselect6 478280 UNIMPL pselect6
479281 UNIMPL ppoll 479281 STD { int|linux_sys||ppoll(struct pollfd *fds, int nfds, \
 480 struct linux_timespec *timeout, \
 481 linux_sigset_t *sigset); }
480282 UNIMPL unshare 482282 UNIMPL unshare
481283 UNIMPL splice 483283 UNIMPL splice
482284 UNIMPL tee 484284 UNIMPL tee
483285 UNIMPL vmsplice 485285 UNIMPL vmsplice
484286 UNIMPL openat 486286 UNIMPL openat
485287 UNIMPL mkdirat 487287 UNIMPL mkdirat
486288 UNIMPL mknodat 488288 UNIMPL mknodat
487289 UNIMPL fchownat 489289 UNIMPL fchownat
488290 UNIMPL futimesat 490290 UNIMPL futimesat
489291 UNIMPL fstatat64 491291 UNIMPL fstatat64
490292 UNIMPL unlinkat 492292 UNIMPL unlinkat
491293 UNIMPL renameat 493293 UNIMPL renameat
492294 UNIMPL linkat 494294 UNIMPL linkat

cvs diff -r1.219 -r1.220 src/sys/compat/linux/common/linux_misc.c (expand / switch to unified diff)

--- src/sys/compat/linux/common/linux_misc.c 2011/10/14 09:23:28 1.219
+++ src/sys/compat/linux/common/linux_misc.c 2012/09/19 21:19:15 1.220
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_misc.c,v 1.219 2011/10/14 09:23:28 hannken Exp $ */ 1/* $NetBSD: linux_misc.c,v 1.220 2012/09/19 21:19:15 pooka Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Frank van der Linden and Eric Haszlakiewicz; by Jason R. Thorpe 8 * by Frank van der Linden and Eric Haszlakiewicz; by Jason R. Thorpe
9 * of the Numerical Aerospace Simulation Facility, NASA Ames Research Center. 9 * of the Numerical Aerospace Simulation Facility, NASA Ames Research Center.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -47,42 +47,43 @@ @@ -47,42 +47,43 @@
47 * linux_sys_readdir : linux_misc_notalpha.c 47 * linux_sys_readdir : linux_misc_notalpha.c
48 * linux_sys_setresgid : linux_misc_notalpha.c 48 * linux_sys_setresgid : linux_misc_notalpha.c
49 * linux_sys_time : linux_misc_notalpha.c 49 * linux_sys_time : linux_misc_notalpha.c
50 * linux_sys_utime : linux_misc_notalpha.c 50 * linux_sys_utime : linux_misc_notalpha.c
51 * linux_sys_waitpid : linux_misc_notalpha.c 51 * linux_sys_waitpid : linux_misc_notalpha.c
52 * linux_sys_old_mmap : linux_oldmmap.c 52 * linux_sys_old_mmap : linux_oldmmap.c
53 * linux_sys_oldolduname : linux_oldolduname.c 53 * linux_sys_oldolduname : linux_oldolduname.c
54 * linux_sys_oldselect : linux_oldselect.c 54 * linux_sys_oldselect : linux_oldselect.c
55 * linux_sys_olduname : linux_olduname.c 55 * linux_sys_olduname : linux_olduname.c
56 * linux_sys_pipe : linux_pipe.c 56 * linux_sys_pipe : linux_pipe.c
57 */ 57 */
58 58
59#include <sys/cdefs.h> 59#include <sys/cdefs.h>
60__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.219 2011/10/14 09:23:28 hannken Exp $"); 60__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.220 2012/09/19 21:19:15 pooka Exp $");
61 61
62#include <sys/param.h> 62#include <sys/param.h>
63#include <sys/systm.h> 63#include <sys/systm.h>
64#include <sys/namei.h> 64#include <sys/namei.h>
65#include <sys/proc.h> 65#include <sys/proc.h>
66#include <sys/dirent.h> 66#include <sys/dirent.h>
67#include <sys/file.h> 67#include <sys/file.h>
68#include <sys/stat.h> 68#include <sys/stat.h>
69#include <sys/filedesc.h> 69#include <sys/filedesc.h>
70#include <sys/ioctl.h> 70#include <sys/ioctl.h>
71#include <sys/kernel.h> 71#include <sys/kernel.h>
72#include <sys/malloc.h> 72#include <sys/malloc.h>
73#include <sys/mbuf.h> 73#include <sys/mbuf.h>
74#include <sys/mman.h> 74#include <sys/mman.h>
75#include <sys/mount.h> 75#include <sys/mount.h>
 76#include <sys/poll.h>
76#include <sys/prot.h> 77#include <sys/prot.h>
77#include <sys/reboot.h> 78#include <sys/reboot.h>
78#include <sys/resource.h> 79#include <sys/resource.h>
79#include <sys/resourcevar.h> 80#include <sys/resourcevar.h>
80#include <sys/select.h> 81#include <sys/select.h>
81#include <sys/signal.h> 82#include <sys/signal.h>
82#include <sys/signalvar.h> 83#include <sys/signalvar.h>
83#include <sys/socket.h> 84#include <sys/socket.h>
84#include <sys/time.h> 85#include <sys/time.h>
85#include <sys/times.h> 86#include <sys/times.h>
86#include <sys/vnode.h> 87#include <sys/vnode.h>
87#include <sys/uio.h> 88#include <sys/uio.h>
88#include <sys/wait.h> 89#include <sys/wait.h>
@@ -109,26 +110,27 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc.c @@ -109,26 +110,27 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc.c
109 110
110#include <compat/linux/common/linux_fcntl.h> 111#include <compat/linux/common/linux_fcntl.h>
111#include <compat/linux/common/linux_mmap.h> 112#include <compat/linux/common/linux_mmap.h>
112#include <compat/linux/common/linux_dirent.h> 113#include <compat/linux/common/linux_dirent.h>
113#include <compat/linux/common/linux_util.h> 114#include <compat/linux/common/linux_util.h>
114#include <compat/linux/common/linux_misc.h> 115#include <compat/linux/common/linux_misc.h>
115#ifndef COMPAT_LINUX32 116#ifndef COMPAT_LINUX32
116#include <compat/linux/common/linux_statfs.h> 117#include <compat/linux/common/linux_statfs.h>
117#include <compat/linux/common/linux_limit.h> 118#include <compat/linux/common/linux_limit.h>
118#endif 119#endif
119#include <compat/linux/common/linux_ptrace.h> 120#include <compat/linux/common/linux_ptrace.h>
120#include <compat/linux/common/linux_reboot.h> 121#include <compat/linux/common/linux_reboot.h>
121#include <compat/linux/common/linux_emuldata.h> 122#include <compat/linux/common/linux_emuldata.h>
 123#include <compat/linux/common/linux_sched.h>
122 124
123#include <compat/linux/linux_syscallargs.h> 125#include <compat/linux/linux_syscallargs.h>
124 126
125#ifndef COMPAT_LINUX32 127#ifndef COMPAT_LINUX32
126const int linux_ptrace_request_map[] = { 128const int linux_ptrace_request_map[] = {
127 LINUX_PTRACE_TRACEME, PT_TRACE_ME, 129 LINUX_PTRACE_TRACEME, PT_TRACE_ME,
128 LINUX_PTRACE_PEEKTEXT, PT_READ_I, 130 LINUX_PTRACE_PEEKTEXT, PT_READ_I,
129 LINUX_PTRACE_PEEKDATA, PT_READ_D, 131 LINUX_PTRACE_PEEKDATA, PT_READ_D,
130 LINUX_PTRACE_POKETEXT, PT_WRITE_I, 132 LINUX_PTRACE_POKETEXT, PT_WRITE_I,
131 LINUX_PTRACE_POKEDATA, PT_WRITE_D, 133 LINUX_PTRACE_POKEDATA, PT_WRITE_D,
132 LINUX_PTRACE_CONT, PT_CONTINUE, 134 LINUX_PTRACE_CONT, PT_CONTINUE,
133 LINUX_PTRACE_KILL, PT_KILL, 135 LINUX_PTRACE_KILL, PT_KILL,
134 LINUX_PTRACE_ATTACH, PT_ATTACH, 136 LINUX_PTRACE_ATTACH, PT_ATTACH,
@@ -910,26 +912,62 @@ linux_select1(struct lwp *l, register_t  @@ -910,26 +912,62 @@ linux_select1(struct lwp *l, register_t
910 if (uts.tv_sec < 0) 912 if (uts.tv_sec < 0)
911 timespecclear(&uts); 913 timespecclear(&uts);
912 } else 914 } else
913 timespecclear(&uts); 915 timespecclear(&uts);
914 ltv.tv_sec = uts.tv_sec; 916 ltv.tv_sec = uts.tv_sec;
915 ltv.tv_usec = uts.tv_nsec / 1000; 917 ltv.tv_usec = uts.tv_nsec / 1000;
916 if ((error = copyout(&ltv, timeout, sizeof(ltv)))) 918 if ((error = copyout(&ltv, timeout, sizeof(ltv))))
917 return error; 919 return error;
918 } 920 }
919 921
920 return 0; 922 return 0;
921} 923}
922 924
 925int
 926linux_sys_ppoll(struct lwp *l,
 927 const struct linux_sys_ppoll_args *uap, register_t *retval)
 928{
 929 /* {
 930 syscallarg(struct pollfd *) fds;
 931 syscallarg(int) nfds;
 932 syscallarg(struct linux_timespec *) timeout;
 933 syscallarg(linux_sigset_t *) sigset;
 934 } */
 935 struct linux_timespec lts0, *lts;
 936 struct timespec ts0, *ts = NULL;
 937 linux_sigset_t lsigmask0, *lsigmask;
 938 sigset_t sigmask0, *sigmask = NULL;
 939 int error;
 940
 941 lts = SCARG(uap, timeout);
 942 if (lts) {
 943 if ((error = copyin(lts, &lts0, sizeof(lts0))) != 0)
 944 return error;
 945 linux_to_native_timespec(&ts0, &lts0);
 946 ts = &ts0;
 947 }
 948
 949 lsigmask = SCARG(uap, sigset);
 950 if (lsigmask) {
 951 if ((error = copyin(lsigmask, &lsigmask0, sizeof(lsigmask0))))
 952 return error;
 953 linux_to_native_sigset(&sigmask0, &lsigmask0);
 954 sigmask = &sigmask0;
 955 }
 956
 957 return pollcommon(retval, SCARG(uap, fds), SCARG(uap, nfds),
 958 ts, sigmask);
 959}
 960
923/* 961/*
924 * Set the 'personality' (emulation mode) for the current process. Only 962 * Set the 'personality' (emulation mode) for the current process. Only
925 * accept the Linux personality here (0). This call is needed because 963 * accept the Linux personality here (0). This call is needed because
926 * the Linux ELF crt0 issues it in an ugly kludge to make sure that 964 * the Linux ELF crt0 issues it in an ugly kludge to make sure that
927 * ELF binaries run in Linux mode, not SVR4 mode. 965 * ELF binaries run in Linux mode, not SVR4 mode.
928 */ 966 */
929int 967int
930linux_sys_personality(struct lwp *l, const struct linux_sys_personality_args *uap, register_t *retval) 968linux_sys_personality(struct lwp *l, const struct linux_sys_personality_args *uap, register_t *retval)
931{ 969{
932 /* { 970 /* {
933 syscallarg(unsigned long) per; 971 syscallarg(unsigned long) per;
934 } */ 972 } */
935 struct linux_emuldata *led; 973 struct linux_emuldata *led;