From owner-svn-ports-all@freebsd.org Tue Jun 18 02:29:27 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3487315CBBAD; Tue, 18 Jun 2019 02:29:27 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D05688D8ED; Tue, 18 Jun 2019 02:29:26 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A70FB6B29; Tue, 18 Jun 2019 02:29:26 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5I2TQVt002865; Tue, 18 Jun 2019 02:29:26 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5I2TQUL002864; Tue, 18 Jun 2019 02:29:26 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201906180229.x5I2TQUL002864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Tue, 18 Jun 2019 02:29:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r504463 - in head/comms/quisk: . files X-SVN-Group: ports-head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in head/comms/quisk: . files X-SVN-Commit-Revision: 504463 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D05688D8ED X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2019 02:29:27 -0000 Author: shurd Date: Tue Jun 18 02:29:26 2019 New Revision: 504463 URL: https://svnweb.freebsd.org/changeset/ports/504463 Log: Fix SDR-IQ Support Previously, only if the device name started with the literal string "/dev/ttyUSB" was the device treated as a tty. The new patch uses isatty() to decide if the device is a tty. Added: head/comms/quisk/files/patch-sdriqpkg_sdriq.c (contents, props changed) Modified: head/comms/quisk/Makefile Modified: head/comms/quisk/Makefile ============================================================================== --- head/comms/quisk/Makefile Tue Jun 18 02:01:23 2019 (r504462) +++ head/comms/quisk/Makefile Tue Jun 18 02:29:26 2019 (r504463) @@ -3,6 +3,7 @@ PORTNAME= quisk DISTVERSION= 4.1.40 +PORTREVISION= 1 CATEGORIES= comms hamradio MASTER_SITES= CHEESESHOP Added: head/comms/quisk/files/patch-sdriqpkg_sdriq.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/quisk/files/patch-sdriqpkg_sdriq.c Tue Jun 18 02:29:26 2019 (r504463) @@ -0,0 +1,41 @@ +--- sdriqpkg/sdriq.c.orig 2018-08-02 14:01:30 UTC ++++ sdriqpkg/sdriq.c +@@ -629,14 +658,14 @@ static void quisk_open_sdriq_dev(const c + { + struct termios newtio; + +- if (!strncmp(name, "/dev/ttyUSB", 11)) { // use ftdi_sio driver +- quisk_sdriq_fd = open(name, O_RDWR | O_NOCTTY); +- if (quisk_sdriq_fd < 0) { +- strncpy(buf, "Open SDR-IQ : ", bufsize); +- strncat(buf, strerror(errno), bufsize - strlen(buf) - 1); +- quisk_sdriq_fd = INVALID_HANDLE_VALUE; +- return; +- } ++ quisk_sdriq_fd = open(name, O_RDWR | O_NOCTTY | O_NONBLOCK); ++ if (quisk_sdriq_fd < 0) { ++ strncpy(buf, "Open SDR-IQ : ", bufsize); ++ strncat(buf, strerror(errno), bufsize - strlen(buf) - 1); ++ quisk_sdriq_fd = INVALID_HANDLE_VALUE; ++ return; ++ } ++ if (isatty(quisk_sdriq_fd)) { + bzero(&newtio, sizeof(newtio)); + newtio.c_cflag = CS8 | CLOCAL | CREAD; + newtio.c_iflag = IGNPAR; +@@ -649,15 +678,6 @@ static void quisk_open_sdriq_dev(const c + tcflush(quisk_sdriq_fd, TCIFLUSH); + tcsetattr(quisk_sdriq_fd, TCSANOW, &newtio); + } +- else { // use ft245 or similar driver +- quisk_sdriq_fd = open(name, O_RDWR | O_NONBLOCK); +- if (quisk_sdriq_fd < 0) { +- strncpy(buf, "Open SDR-IQ: ", bufsize); +- strncat(buf, strerror(errno), bufsize - strlen(buf) - 1); +- quisk_sdriq_fd = INVALID_HANDLE_VALUE; +- return; +- } +- } + return; + } + #endif