[PATCH] implementations of the 13 openat syscalls + inotify (fwd)
Dmitry V. Levin
ldv at altlinux.org
Tue Mar 28 14:29:02 UTC 2006
On Tue, Mar 28, 2006 at 09:56:27PM +0200, Bernhard Kaindl wrote:
> Hi,
>
> I fixed two bugs and added support for i386. I tested i386 using
> 32-bit compatabilty syscalls on x86_64, and the strace output
> of the glibc *at testcases match also. That looks correct.
[...]
> As the output for i386 and x86_64 matched the
> *at implementation looks finished to me and
> ready for inclusion in the CVS.
Bernhard, thank you for the patch.
Here is my brief comment.
> +static const struct xlat inotify_modes[] = {
> + { 0x00000001, "IN_ACCESS" },
> + { 0x00000002, "IN_MODIFY" },
> + { 0x00000004, "IN_ATTRIB" },
> + { 0x00000008, "IN_CLOSE_WRITE" },
> + { 0x00000010, "IN_CLOSE_NOWRITE" },
> + { 0x00000020, "IN_OPEN" },
> + { 0x00000040, "IN_MOVED_FROM" },
> + { 0x00000080, "IN_MOVED_TO" },
> + { 0x00000100, "IN_CREATE" },
> + { 0x00000200, "IN_DELETE" },
> + { 0x00000400, "IN_DELETE_SELF" },
> + { 0x00000800, "IN_MOVE_SELF" },
> + { 0x00002000, "IN_UNMOUNT" },
> + { 0x00004000, "IN_Q_OVERFLOW" },
> + { 0x00008000, "IN_IGNORED" },
> + { 0x40000000, "IN_ISDIR" },
> + { 0x80000000, "IN_ONESHOT" }
> +};
Looks like IN_ONLYDIR, IN_DONT_FOLLOW and IN_MASK_ADD are missing.
> +static inline void printdfd(dfd)
> +int dfd;
> +{
> + if (dfd == AT_FDCWD)
> + tprintf("AT_FDCWD, ");
> + else
> + tprintf("%d, ", dfd);
> +}
The AT_FDCWD constant may be not available with not very fresh kernel
headers, you probably should add something like this before first use:
#ifndef AT_FDCWD
#define AT_FDCWD -100
#endif
> +static const struct xlat fstatatflags[] = {
> + { AT_SYMLINK_NOFOLLOW, "AT_SYMLINK_NOFOLLOW" },
> + { 0, NULL },
> +};
Likewise.
> +static const struct xlat unlinkatflags[] = {
> + { AT_REMOVEDIR, "AT_REMOVEDIR" },
> + { 0, NULL },
> +};
Likewise.
> --- strace-4.5.14/syscallent.sh 2003-03-31 03:03:34.000000000 +0200
> +++ strace-4.5.14-i386/syscallent.sh 2006-03-28 16:51:09.000000000 +0200
> @@ -48,22 +48,31 @@ s/^#[ ]*define[ ][ ]*__NR_\([^ ]*\)[ ]*[
> s = s "}, /* " call " */"
> print s
> }
> + if (call >= 294) {
> f = "sys_" $1
> n = $1
> - s = "\t{ -1,\t0,\t"
> + filter = "|sed \"s/\t\t/\t/g\"|cut -f4";
> + grep = "grep " f " /usr/src/linux-2.6.16-rc5/arch/mips/kernel/scall32-o32.S" filter;
This change looks more like quick hack.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20060328/5b77b6a1/attachment.bin>
More information about the Strace-devel
mailing list