From: Robert W. <ro...@us...> - 2005-12-22 20:18:43
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/getdents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10801/testcases/kernel/syscalls/getdents Modified Files: getdents01.c Log Message: Applied Coldfire patch from Jody McIntyre: - Make the fdopen workaround blackfin-specific (not needed on Coldfire.) - getdents01: gcc 2.95 does not like declarations in the middle of functions, so move getdents to the top. - Add LDFLAGS to the following Makefiles: - Add -D_USC_LIB_ for Coldfire builds to the following Makefiles: creat, execve, fchdir, kill, mkdir, open, rename, rmdir, sched_setscheduler, vhangup, ipc/lib. This avoids symbol conflicts reported by gcc 2.95. - Skip the following syscall tests on Coldfire: madvise, mlock, munlock. These system calls are not implemented. - IPC: Modify the headers and Makefiles to avoid duplicate definitions of msgkey on Coldfire. - msgctl08, msgctl09: Lower MAXNPROCS to a value that will fit in the Coldfire's memory. - mallopt01: Define __MALLOC_STANDARD__ on Coldfire. - Skip mmap01 on Coldfire since it requires sbrk(), which is not available. - rename02: Remove private do_file_setup and use the library version to avoid symbol conflicts. - kill07: Declare semkey as extern on Coldfire to avoid symbol conflicts. - kill11: Move *msg declaration since gcc 2.95 does not understand C99. - sigaction01: Move -lc in the Makefile after -lpthread. Index: getdents01.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/getdents/getdents01.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** getdents01.c 12 Jan 2005 16:17:55 -0000 1.12 --- getdents01.c 22 Dec 2005 20:18:23 -0000 1.13 *************** *** 83,86 **** --- 83,100 ---- struct dirent *dirp; + /* + * Here's a case where invoking the system call directly + * doesn't seem to work. getdents.h has an assembly + * macro to do the job. + * + * equivalent to - getdents(fd, dirp, count); + * if we could call getdents that way. + */ + + #if defined(__ia64__) + #define getdents(arg1, arg2, arg3) syscall(__NR_getdents, arg1, arg2, arg3) + #else + _syscall3(int, getdents, uint, fd, struct dirent *, dirp, uint, count); + #endif /* parse standard options */ *************** *** 122,140 **** tst_brkm(TBROK, cleanup, "open of directory failed"); } ! ! /* ! * Here's a case where invoking the system call directly ! * doesn't seem to work. getdents.h has an assembly ! * macro to do the job. ! * ! * equivalent to - getdents(fd, dirp, count); ! * if we could call getdents that way. ! */ ! ! #if defined(__ia64__) ! #define getdents(arg1, arg2, arg3) syscall(__NR_getdents, arg1, arg2, arg3) ! #else ! _syscall3(int, getdents, uint, fd, struct dirent *, dirp, uint, count); ! #endif rval = getdents(fd, dirp, count); if (rval < 0) { /* call returned an error */ --- 136,140 ---- tst_brkm(TBROK, cleanup, "open of directory failed"); } ! rval = getdents(fd, dirp, count); if (rval < 0) { /* call returned an error */ |