2005-05-31  Dmitry V. Levin  <ldv@altlinux.org>

	* bjm.c (sys_query_module) [LINUX]: Unitize "out of memory"
	errors reporting style.
	* strace.c (rebuild_pollv) [USE_PROCFS]: Likewise.
	* system.c (sys_capget, sys_capset) [SYS_capget]: Likewise.
	* util.c (printstr): Likewise.
	(dumpiov) [HAVE_SYS_UIO_H]: Likewise.
	(fixvfork) [SUNOS4]: Likewise.
	* desc.c (decode_select): Continue to decode syscall arguments
	in case of OOM condition.
	* file.c (sys_getdents): Likewise.
	(sys_getdents64) [_LFS64_LARGEFILE]: Likewise.
	(sys_getdirentries) [FREEBSD]: Likewise.
	* mem.c (sys_mincore): Changed type of variables which deal with
	malloc size from int to unsigned long.
	Fixes RH#159308.
diff --git a/file.c b/file.c
index 485d95f..8a3432f 100644
--- a/file.c
+++ b/file.c
@@ -2042,11 +2042,12 @@
 	}
 	len = tcp->u_rval;
 	if ((buf = malloc(len)) == NULL) {
-		tprintf("out of memory\n");
+		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
+		fprintf(stderr, "out of memory\n");
 		return 0;
 	}
 	if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
-		tprintf("{...}, %lu", tcp->u_arg[2]);
+		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
 		free(buf);
 		return 0;
 	}
@@ -2125,11 +2126,12 @@
 	}
 	len = tcp->u_rval;
 	if ((buf = malloc(len)) == NULL) {
-		tprintf("out of memory\n");
+		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
+		fprintf(stderr, "out of memory\n");
 		return 0;
 	}
 	if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
-		tprintf("{...}, %lu", tcp->u_arg[2]);
+		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
 		free(buf);
 		return 0;
 	}
@@ -2193,11 +2195,12 @@
 	}
 	len = tcp->u_rval;
 	if ((buf = malloc(len)) == NULL) {
-		tprintf("out of memory\n");
+		tprintf("%#lx, %lu, %#lx", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
+		fprintf(stderr, "out of memory\n");
 		return 0;
 	}
 	if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
-		tprintf("{...}, %lu, %#lx", tcp->u_arg[2], tcp->u_arg[3]);
+		tprintf("%#lx, %lu, %#lx", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
 		free(buf);
 		return 0;
 	}