Skip to contentSkip to conversation

flock support

PATCH New Rusty Russell 1 participant 1 message Apr 23, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 flock support

I thought about using thunk stuff, but if glibc plays games with struct flock, that'll break badly, so I opencoded it.

Cheers!
Rusty.

syscall-i386.h +16 -0
diff -urpN --exclude TAGS -X /home/rusty/current-dontdiff --minimal qemu-0.1.6-debug/syscall-i386.h qemu-0.1.6-fcntl/syscall-i386.h
@@ -935,6 +935,22 @@ union target_semun {
     unsigned int __pad;	/* really void* */
 };
 
+struct target_flock {
+	short l_type;
+	short l_whence;
+	target_ulong l_start;
+	target_ulong l_len;
+	int l_pid;
+};
+
+struct target_flock64 {
+	short  l_type;
+	short  l_whence;
+	unsigned long long l_start;
+	unsigned long long l_len;
+	int  l_pid;
+};
+
 /* soundcard defines (XXX: move them to generic file syscall_defs.h) */
 
 #define TARGET_SNDCTL_COPR_HALT           0xc0144307
syscall.c +49 -2

81 lines not on this page · raw message

--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.