Delivered-To: freebsd-hackers@freebsd.org Received: from mail.surf1.de (mail.Surf1.de [194.25.165.21]) by hub.freebsd.org (Postfix) with ESMTP id 8F9B637BC55 for ; Sat, 6 May 2000 11:09:42 -0700 (PDT) (envelope-from alex@cichlids.com) Received: from cichlids.com (p3E9C1171.dip0.t-ipconnect.de [62.156.17.113]) by mail.surf1.de (8.9.3/8.9.3) with ESMTP id TAA22632 for ; Sat, 6 May 2000 19:08:24 +0200 Received: from cichlids.cichlids.com (cichlids.cichlids.com [192.168.0.10]) by cichlids.com (Postfix) with ESMTP id E5C58AC2C for ; Sat, 6 May 2000 20:14:25 +0200 (CEST) Received: (from alex@localhost) by cichlids.cichlids.com (8.9.3/8.9.3) id UAA08175 for hackers@freebsd.org; Sat, 6 May 2000 20:09:40 +0200 (CEST) (envelope-from alex) Date: Sat, 6 May 2000 20:09:40 +0200 From: Alexander Langer To: hackers@freebsd.org Subject: problem with ioctl handler in a module Message-ID: <20000506200940.A8087@cichlids.cichlids.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i X-PGP-Fingerprint: 44 28 CA 4C 46 5B D3 A8 A8 E3 BA F3 4E 60 7D 7F X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello! I have: int ziva_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc* pr) when this function catches a ioctl from userspace, called as: int foo = 199; ioctl(fd, 10, &foo); the u_long cmd contains 10, which is correct (so the ioctl-handler is called correctly). However, I can't get the value of the int. I tried something like: if (*((int *) arg) == 199) . But this doesn't work, is not executed. Somehow, I can't access the memory this way. Anyone knows, what I'm doing wrong? Thanks Alex -- I need a new ~/.sig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message