X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=BAYES_00,J_CHICKENPOX_18,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Bert Subject: IOCTL using Date: Wed, 11 Mar 2009 22:57:05 +0000 (UTC) Lines: 31 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com When compiled on Cygwin's gcc the code below (which asks the baud rate of a serial port) shows the error "Funtion Not Implemented". I tried several serial port ioctl functions in - all gave the same error. I hope I'm doing something really dumb, any tips? #include #include #include #include int main() { int fd, result; SERIAL_BAUD_RATE x; /* baud rate structure in ntddser.h */ fd = open ( "/dev/com4" , O_RDWR | O_NOCTTY | O_NDELAY); if ( fd<0 ) { perror ("Can't open port - "); exit(-1); } result=ioctl(fd,IOCTL_SERIAL_GET_BAUD_RATE,&x,sizeof(x)); if(result<0){perror("IOCTL failed because "); exit(-1);} else printf ( "Baud rate is %d.\n", result, x.BaudRate ); } -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/