From owner-freebsd-questions Mon Sep 13 12:17:18 1999 Delivered-To: freebsd-questions@freebsd.org Received: from sand2.global.net.uk (sand2.global.net.uk [195.147.246.100]) by hub.freebsd.org (Postfix) with ESMTP id 8C78F159D7 for ; Mon, 13 Sep 1999 12:16:13 -0700 (PDT) (envelope-from mark@globalnet.co.uk) Received: from p2fs02a02.client.global.net.uk ([195.147.146.48] helo=marder-1.) by sand2.global.net.uk with esmtp (Exim 2.05 #1) id 11QbaF-0001Be-00 for questions@freebsd.org; Mon, 13 Sep 1999 20:16:12 +0100 Received: (from mark@localhost) by marder-1. (8.9.2/8.8.8) id UAA02630 for questions@freebsd.org; Mon, 13 Sep 1999 20:07:53 +0100 (BST) (envelope-from mark) Date: Mon, 13 Sep 1999 20:07:53 +0100 From: Mark Ovens To: questions@freebsd.org Subject: Where's the source Luke? Message-ID: <19990913200752.A2529@marder-1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Can someone tell me where to find the source code for ioctl()? I've searched all the .c files under /usr/src/sys and have found plenty of functions called xxxx_ioctl, e.g. kbd_ioctl(), but not a plain ``ioctl()''. I'm beginning to think that a call to ioctl() gets mapped to some function specific to the device. The particular instance I'm interested in is in video_mode() in vidcontrol.c: if (*index < argc) { for (i = 0; modes[i].name != NULL; ++i) { if (!strcmp(argv[*index], modes[i].name)) { mode = modes[i].mode; break; } } if (modes[i].name == NULL) return; =====>> if (ioctl(0, mode, NULL) < 0) <<=============== warn("cannot set videomode"); Thanks. -- STATE-OF-THE-ART: Any computer you can't afford. OBSOLETE: Any computer you own. ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message