From 96dc2f3c56dba9cedaa46319e5a4c4170011b449 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 3 Oct 1998 20:28:03 +0000 Subject: [PATCH] Remove stray debugging printfs --- sys/compat/linux/common/linux_cdrom.c | 6 ++-- sys/compat/linux/common/linux_exec_elf32.c | 32 ++++++---------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/sys/compat/linux/common/linux_cdrom.c b/sys/compat/linux/common/linux_cdrom.c index dc6e44700b0e..c54f4ac0656a 100644 --- a/sys/compat/linux/common/linux_cdrom.c +++ b/sys/compat/linux/common/linux_cdrom.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_cdrom.c,v 1.3 1998/10/03 20:17:40 christos Exp $ */ +/* $NetBSD: linux_cdrom.c,v 1.4 1998/10/03 20:28:03 christos Exp $ */ /* * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -280,7 +280,7 @@ linux_ioctl_cdrom(p, uap, retval) break; default: - printf("linux_ioctl: unknown format msf/lba\n"); + DPRINTF(("linux_ioctl: unknown format msf/lba\n")); return EINVAL; } @@ -332,7 +332,7 @@ linux_ioctl_cdrom(p, uap, retval) break; default: - printf("linux_ioctl: unimplemented ioctl %08lx\n", com); + DPRINTF(("linux_ioctl: unimplemented ioctl %08lx\n", com)); return EINVAL; } diff --git a/sys/compat/linux/common/linux_exec_elf32.c b/sys/compat/linux/common/linux_exec_elf32.c index 15151d094c1f..9f674054c4db 100644 --- a/sys/compat/linux/common/linux_exec_elf32.c +++ b/sys/compat/linux/common/linux_exec_elf32.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.32 1998/10/03 20:17:41 christos Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.33 1998/10/03 20:28:03 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -159,8 +159,6 @@ ELFNAME2(linux,gcc_signature)(p, epp, eh) Elf_Shdr *sh; int error; -printf("XAXlinuxgccsig.\n"); -DELAY(500000); error = ENOEXEC; sh = (Elf_Shdr *) malloc(shsize, M_TEMP, M_WAITOK); @@ -222,15 +220,12 @@ ELFNAME2(linux,signature)(p, epp, eh) Elf_Phdr *ephp = &ph[i]; u_int32_t ostype; -/* XAX -use interp field. -/lib/ld-linux -1234567890123 = 13 -*/ -printf("inloop:%d is %d\n", i, ephp->p_type); if (ephp->p_type != Elf_pt_interp /* XAX pt_note */ -/* ephp->p_flags != 0 || - ephp->p_filesz < sizeof(Elf_Note))*/ ) +#if 0 + || ephp->p_flags != 0 + || ephp->p_filesz < sizeof(Elf_Note)) +#endif + ) continue; notep = (Elf_Note *)malloc(ephp->p_filesz, M_TEMP, M_WAITOK); @@ -240,43 +235,35 @@ printf("inloop:%d is %d\n", i, ephp->p_type); testp = (char *)notep; testp[16] = '\0'; - printf("interp:%s\n", testp); - if (testp[8] == 'l' && testp[9] == 'i' && testp[12] == 'x') { -printf("okok\n"); + if (strncmp(&testp[8], "linux", 5) != 0) { error = 0; goto out3; } goto out2; -printf("checkosverfor:%d\n", ELF_NOTE_TYPE_OSVERSION); /* XXX XAX Should handle NETBSD_TYPE_EMULNAME */ if (notep->type != ELF_NOTE_TYPE_OSVERSION) { free(notep, M_TEMP); continue; } -printf("checksize: n=%d, d=%d\n", notep->namesz, notep->descsz); /* Check the name and description sizes. */ if (notep->namesz != ELF_NOTE_GNU_NAMESZ || notep->descsz != ELF_NOTE_GNU_DESCSZ) goto out2; -printf("checkname: %s\n", (char *)(notep + sizeof(Elf_Note))); /* Is the name "GNU\0"? */ if (memcmp((notep + sizeof(Elf_Note)), ELF_NOTE_GNU_NAME, ELF_NOTE_GNU_NAMESZ)) goto out2; /* Make sure the OS is Linux */ - ostype = (u_int32_t)(*((u_int32_t *)notep + sizeof(Elf_Note) - + notep->namesz)) - & ELF_NOTE_GNU_OSMASK; -printf("ostype:%d\n", ostype); + ostype = (u_int32_t)(*((u_int32_t *)notep + sizeof(Elf_Note) + + notep->namesz)) & ELF_NOTE_GNU_OSMASK; if (ostype != ELF_NOTE_GNU_OSLINUX) goto out2; -printf("allok\n"); /* All checks succeeded. */ error = 0; goto out3; @@ -325,7 +312,6 @@ ELFNAME2(linux,probe)(p, epp, eh, itp, pos) } epp->ep_emul = &ELFNAMEEND(emul_linux); *pos = ELF_NO_ADDR; -printf("ret0\n"); return 0; }