From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 01:44:04 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F87F33D for ; Sun, 15 Feb 2015 01:44:04 +0000 (UTC) Received: from mail-yh0-x229.google.com (mail-yh0-x229.google.com [IPv6:2607:f8b0:4002:c01::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDC83114 for ; Sun, 15 Feb 2015 01:44:03 +0000 (UTC) Received: by mail-yh0-f41.google.com with SMTP id 29so11340854yhl.0 for ; Sat, 14 Feb 2015 17:44:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=YAQLCrS/18OKuZgikaoH2f840LcWx9bXjFrzRYy6lks=; b=eXtsh3mnZUSgeiW5+6OerU1QP7Wt9A6rBhzgFkiIH1+5SaA/ASNqAqpkeJu3FaSxG3 1/IiIIFqUkeAAD/E240l9fveJfl6eiehZUrqzEZBHx7UYffjydtWRKepYvZeppXh0WFd d3h4EyYoMayoSQ91fRfhrRQJaeszj0ujy1lYYGLqWWhtvBSrL4Dd2SmMJbwX0C8U2H2y 2LSRKVBmBxRP+HGuUBAJEJOmwwPP9nn/6/brxSUxQymk74oJLV735Kppf39fghcP8Q7w fOqxguhwdnk6qBMfgLzhv+845E0cbhBo3AKAzqHMUXLcm7cnpb3i4mHmGHl53KiAkR4F tfWA== X-Received: by 10.236.66.133 with SMTP id h5mr13010192yhd.28.1423964642981; Sat, 14 Feb 2015 17:44:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.170.118.13 with HTTP; Sat, 14 Feb 2015 17:43:32 -0800 (PST) From: Yue Chen Date: Sat, 14 Feb 2015 20:43:32 -0500 Message-ID: Subject: Suggestions for communication between FreeBSD user-space and kernel modules To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 01:44:04 -0000 Dear all, I am working on a project that needs to read some text or binary files, and let my kernel module get the information. What is the best (convenient and efficient) way to implement this? It seems painful if reading files in a kernel module directly. For Linux, there are ways like netlink, virtual filesystems, e.g. /proc, /sys, configfs, relayfs, debugfs, poll() / epoll() / select() related; to send info to/from kernel space. I searched the Internet but most results are for Linux only. One possible way for FreeBSD is to use /dev/kmem, but that is to write information directly to a certain memory address, seems to be error-prone. Any help would be highly appreciated. Best, Yue From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 02:53:55 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6895C166 for ; Sun, 15 Feb 2015 02:53:55 +0000 (UTC) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11CACA81 for ; Sun, 15 Feb 2015 02:53:54 +0000 (UTC) Received: by labms9 with SMTP id ms9so16916544lab.10 for ; Sat, 14 Feb 2015 18:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=N0oHKXZxNLRp1a8vyugdKODVRDOjl8AjTe+Q2ZybiqQ=; b=zLYO2ZCBgXthGnQmqHuGPEtQEDzyR/ixp6s+wRQS4s4vyulD7an4csiaSnnzF2A1aa YAdpEs5G9UpybIfBhZSSngMP0RaEikMtrN5m00k/EdoYOFhFuz60ueyTFYycN/tbjTS5 bEc/A8A152eUMUNGlgsvGP6LEdC4Rq1L5LSmf7wh3vtHTTWiKSSMcpdRsGeMvGycfswB MePY5V052S2SVegq0YiI8m1qLFpBuKe8Hiyzlp9na/ziJrVy5O7kjwyqVUTATkaVQAtS rVJDCoLyBs0czWtn48n29OJdHACtXDBXVbsRbUcDS5OalwAd9oAfcRIOuhmu7RB1VeYU k70Q== MIME-Version: 1.0 X-Received: by 10.152.21.100 with SMTP id u4mr1889259lae.41.1423968832799; Sat, 14 Feb 2015 18:53:52 -0800 (PST) Received: by 10.114.78.131 with HTTP; Sat, 14 Feb 2015 18:53:52 -0800 (PST) In-Reply-To: References: Date: Sat, 14 Feb 2015 21:53:52 -0500 Message-ID: Subject: Re: Suggestions for communication between FreeBSD user-space and kernel modules From: Ryan Stone To: Yue Chen Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 02:53:55 -0000 The two main interfaces for passing data between userland and the kernel in FreeBSD are syctls and ioctls (there are others but their use is rather specialized). sysctls are typically the simplest to set up, but aren't well suited for passing around complex structured data. sysctls are very easy to read and write from the command line, though, so they're popular for exposing individual tuning parameters. The kernel interfaces for creating sysctls are documented here: https://www.freebsd.org/cgi/man.cgi?query=sysctl&apropos=0&sektion=9&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html https://www.freebsd.org/cgi/man.cgi?query=sysctl_add_oid&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html ioctls are a little more complicated to use, but are more flexible in what kind of data they can accept. The man pages for this aren't as good, but the basic steps are: 1) Create a device node in /dev by calling make_dev() (https://www.freebsd.org/cgi/man.cgi?query=make_dev&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html) 2) In your userland application, call open(2) to get a file descriptor and then ioctl(2) on the file descriptor to pass data to/from the kernel 2) In the cdevsw structure, implement the ioctl method. This method will be called when the userland application calls ioctl(2) 3) The request argument using the macros in . _IOW is for ioctls that send data from userland to the kernel, _IOR is for ioctls that fetch data from the kernel and _IOWR is for ioctls that both send data from userland to the kernel and fetch data back in a single call. Try to use unique values for your ioctls requests. Some of the other possible methods include include mmap, which can be used to create shared memory between the kernel and userland; netgraph, which is networking-focused interface; and sockets, which can be a tricky interface to use correctly in the kernel. From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 04:07:35 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E5C4EC1 for ; Sun, 15 Feb 2015 04:07:35 +0000 (UTC) Received: from mail-yk0-x235.google.com (mail-yk0-x235.google.com [IPv6:2607:f8b0:4002:c07::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66E8A1C1 for ; Sun, 15 Feb 2015 04:07:35 +0000 (UTC) Received: by mail-yk0-f181.google.com with SMTP id 200so10755519ykr.12 for ; Sat, 14 Feb 2015 20:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=qoBf0MS5adPSdAHrQ2fyr/pv+36DnQL+yn49Z6Gkw7c=; b=fbLGfbGJTxdzjdA/XldZmkWmBa209ZUiySvpKTNaAb8tacx87iAV36YaKpST/PPhMd mN1AR8MF6Y6DDbKCyrtAkcuxNUeO8P5JRGEuwjkSsXqtV8vLWF8+nRu2myArLKSBn86g LBSsBoMW2t4SQRV1rg10VWxRlcf9Nb+7UvxIQwBERGeCM8WpvBSUwVbWTxPyxKZIyNsp ttCkefYHDoqvX6qaMeNusYjRvezfpK77rZczTgOT+2Khk0x1f8N70KdH+kfYEbyTP808 ja+oO+hFbJ0W3jMcFhVpyvDQAGiTV0l85xGORzd4GEURCAylDmsk5+HhuxxhlTf+3JmZ POeA== X-Received: by 10.236.37.99 with SMTP id x63mr12881445yha.108.1423973253974; Sat, 14 Feb 2015 20:07:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.170.118.13 with HTTP; Sat, 14 Feb 2015 20:07:02 -0800 (PST) In-Reply-To: References: From: Yue Chen Date: Sat, 14 Feb 2015 23:07:02 -0500 Message-ID: Subject: Re: Suggestions for communication between FreeBSD user-space and kernel modules To: Ryan Stone Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 04:07:35 -0000 Thank you so much for replying. I forgot to mention that I need to send several Megabytes of structured "uint64_t" data. Is the "ioctls" approach good to handle this situation, or "mmap" is better? And for > "2) In the cdevsw structure, implement the ioctl method. This method will be called when the userland application calls ioctl(2)", the ioctl method will be automatically called, right? Thanks again. On Sat, Feb 14, 2015 at 9:53 PM, Ryan Stone wrote: > The two main interfaces for passing data between userland and the > kernel in FreeBSD are syctls and ioctls (there are others but their > use is rather specialized). > > sysctls are typically the simplest to set up, but aren't well suited > for passing around complex structured data. sysctls are very easy to > read and write from the command line, though, so they're popular for > exposing individual tuning parameters. The kernel interfaces for > creating sysctls are documented here: > > https://www.freebsd.org/cgi/man.cgi?query=sysctl&apropos=0&sektion=9&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html > > https://www.freebsd.org/cgi/man.cgi?query=sysctl_add_oid&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html > > > ioctls are a little more complicated to use, but are more flexible in > what kind of data they can accept. The man pages for this aren't as > good, but the basic steps are: > > 1) Create a device node in /dev by calling make_dev() > ( > https://www.freebsd.org/cgi/man.cgi?query=make_dev&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html > ) > 2) In your userland application, call open(2) to get a file descriptor > and then ioctl(2) on the file descriptor to pass data to/from the > kernel > 2) In the cdevsw structure, implement the ioctl method. This method > will be called when the userland application calls ioctl(2) > 3) The request argument using the macros in . _IOW is > for ioctls that send data from userland to the kernel, _IOR is for > ioctls that fetch data from the kernel and _IOWR is for ioctls that > both send data from userland to the kernel and fetch data back in a > single call. Try to use unique values for your ioctls requests. > > > > Some of the other possible methods include include mmap, which can be > used to create shared memory between the kernel and userland; > netgraph, which is networking-focused interface; and sockets, which > can be a tricky interface to use correctly in the kernel. > From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 04:43:54 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7369424C for ; Sun, 15 Feb 2015 04:43:54 +0000 (UTC) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 468A86CD for ; Sun, 15 Feb 2015 04:43:54 +0000 (UTC) Received: by pdjy10 with SMTP id y10so27819794pdj.13 for ; Sat, 14 Feb 2015 20:43:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:content-transfer-encoding:message-id:date :subject:from:in-reply-to:references:to:cc; bh=FuHX+WukOjXKWF7CWMD8mm+YhcerODQB8X7vDAdWDnw=; b=AeFUhTe5xGOXBgUCUjSHYBO6KxqIjxstHdgAcqk5SXE2zcVAhImqP59sStBBuVCzP1 wXopiojDB1b8sSyFlRbf7moGH64L/Esho9ggc7zIIYKnobRkfkRBYxWhRM28IMgaTpzQ R5WyAD5v/rpJTLHOpvMbkvsLecPX3hPpVJxXLmvKUlxu+9sHOridlx9m6eBfJ73qJTzJ vJx9Rdz/gpZkVe1xHnlFCT6F8GEybKpm+ejAr3g1mizuivi04yN9c9NDyzHQ6xpVjyNl jNpmwEtoTWXO5WbZUD//dP48Izk3jNkczrLV8ABMuoUg861V6fS/1yIHdCZ2Nc27NNVl Fnaw== X-Received: by 10.70.27.33 with SMTP id q1mr29064817pdg.84.1423975433226; Sat, 14 Feb 2015 20:43:53 -0800 (PST) Received: from [127.0.0.1] ([39.249.67.238]) by mx.google.com with ESMTPSA id ki2sm10890330pdb.33.2015.02.14.20.43.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 14 Feb 2015 20:43:52 -0800 (PST) Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: BlackBerry Email (10.2.1.3442) Message-ID: <20150215044351.5988497.50786.18252@gmail.com> Date: Sun, 15 Feb 2015 11:43:51 +0700 Subject: Re: Suggestions for communication between FreeBSD user-space and kernel modules From: dmaryanto@gmail.com In-Reply-To: References: To: Ryan Stone , Yue Chen Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 04:43:54 -0000 ---- tail -f /var/log/travel.log http://arungi.selatsunda.co.id =A0 Original Message =A0 From: Ryan Stone Sent: Minggu, 15 Februari 2015 09.54 To: Yue Chen Cc: freebsd-hackers@freebsd.org Subject: Re: Suggestions for communication between FreeBSD user-space and k= ernel modules The two main interfaces for passing data between userland and the kernel in FreeBSD are syctls and ioctls (there are others but their use is rather specialized). sysctls are typically the simplest to set up, but aren't well suited for passing around complex structured data. sysctls are very easy to read and write from the command line, though, so they're popular for exposing individual tuning parameters. The kernel interfaces for creating sysctls are documented here: https://www.freebsd.org/cgi/man.cgi?query=3Dsysctl&apropos=3D0&sektion=3D9&= manpath=3DFreeBSD+10.1-RELEASE&arch=3Ddefault&format=3Dhtml https://www.freebsd.org/cgi/man.cgi?query=3Dsysctl_add_oid&apropos=3D0&sekt= ion=3D0&manpath=3DFreeBSD+10.1-RELEASE&arch=3Ddefault&format=3Dhtml ioctls are a little more complicated to use, but are more flexible in what kind of data they can accept. The man pages for this aren't as good, but the basic steps are: 1) Create a device node in /dev by calling make_dev() (https://www.freebsd.org/cgi/man.cgi?query=3Dmake_dev&apropos=3D0&sektion= =3D0&manpath=3DFreeBSD+10.1-RELEASE&arch=3Ddefault&format=3Dhtml) 2) In your userland application, call open(2) to get a file descriptor and then ioctl(2) on the file descriptor to pass data to/from the kernel 2) In the cdevsw structure, implement the ioctl method. This method will be called when the userland application calls ioctl(2) 3) The request argument using the macros in . _IOW is for ioctls that send data from userland to the kernel, _IOR is for ioctls that fetch data from the kernel and _IOWR is for ioctls that both send data from userland to the kernel and fetch data back in a single call. Try to use unique values for your ioctls requests. Some of the other possible methods include include mmap, which can be used to create shared memory between the kernel and userland; netgraph, which is networking-focused interface; and sockets, which can be a tricky interface to use correctly in the kernel. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 05:02:56 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03651496 for ; Sun, 15 Feb 2015 05:02:56 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D0E2C89D for ; Sun, 15 Feb 2015 05:02:55 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t1F52rhd002679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 14 Feb 2015 21:02:53 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t1F52r4r002678; Sat, 14 Feb 2015 21:02:53 -0800 (PST) (envelope-from jmg) Date: Sat, 14 Feb 2015 21:02:53 -0800 From: John-Mark Gurney To: Yue Chen Subject: Re: Suggestions for communication between FreeBSD user-space and kernel modules Message-ID: <20150215050252.GZ1953@funkthat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 14 Feb 2015 21:02:53 -0800 (PST) Cc: "freebsd-hackers@freebsd.org" , Ryan Stone X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 05:02:56 -0000 Yue Chen wrote this message on Sat, Feb 14, 2015 at 23:07 -0500: > Thank you so much for replying. > > I forgot to mention that I need to send several Megabytes of structured > "uint64_t" data. Is the "ioctls" approach good to handle this situation, or > "mmap" is better? ioctl is perfectly fine, but instead of passing the all of the data, you can just pass a pointer to the data, and then use copyin(9) to copy the data into kernel... > And for > > "2) In the cdevsw structure, implement the ioctl method. This method > will be called when the userland application calls ioctl(2)", > > the ioctl method will be automatically called, right? Correct... > On Sat, Feb 14, 2015 at 9:53 PM, Ryan Stone wrote: > > > The two main interfaces for passing data between userland and the > > kernel in FreeBSD are syctls and ioctls (there are others but their > > use is rather specialized). > > > > sysctls are typically the simplest to set up, but aren't well suited > > for passing around complex structured data. sysctls are very easy to > > read and write from the command line, though, so they're popular for > > exposing individual tuning parameters. The kernel interfaces for > > creating sysctls are documented here: > > > > https://www.freebsd.org/cgi/man.cgi?query=sysctl&apropos=0&sektion=9&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html > > > > https://www.freebsd.org/cgi/man.cgi?query=sysctl_add_oid&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html > > > > > > ioctls are a little more complicated to use, but are more flexible in > > what kind of data they can accept. The man pages for this aren't as > > good, but the basic steps are: > > > > 1) Create a device node in /dev by calling make_dev() > > ( > > https://www.freebsd.org/cgi/man.cgi?query=make_dev&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html > > ) > > 2) In your userland application, call open(2) to get a file descriptor > > and then ioctl(2) on the file descriptor to pass data to/from the > > kernel > > 2) In the cdevsw structure, implement the ioctl method. This method > > will be called when the userland application calls ioctl(2) > > 3) The request argument using the macros in . _IOW is > > for ioctls that send data from userland to the kernel, _IOR is for > > ioctls that fetch data from the kernel and _IOWR is for ioctls that > > both send data from userland to the kernel and fetch data back in a > > single call. Try to use unique values for your ioctls requests. > > > > > > > > Some of the other possible methods include include mmap, which can be > > used to create shared memory between the kernel and userland; > > netgraph, which is networking-focused interface; and sockets, which > > can be a tricky interface to use correctly in the kernel. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 15 11:33:31 2015 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB34C15D; Sun, 15 Feb 2015 11:33:31 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44B1ACDA; Sun, 15 Feb 2015 11:33:31 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id p9so22689794lbv.0; Sun, 15 Feb 2015 03:33:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/xA7Wyi3rxM3xLz3MrYJsIX92LBhhk75SgfvfyCFLz4=; b=a3J6KwESWG3wq3kKAz/HSC9cG7lTNZXy5lnv1n3V4RjafoZCL84kmHkRxswVgymkdH a7F/ugVLIA0QUy1pFNWOpvx4A4lpNI2ZqeMnx4E5Xd3howdrzgMZU4nUkddZUGuMBqxU /QLARQNz2vcvu2sNhfSQDRUr6KmaLHDBdu0mmpnG+Xf4gjol2kwG+hFqFb2/lDPR2t9K GnXzmaJ7VRzAXA11umlxgB65RJz1w5V9B/9PPwnlkbXknsX2aWxPOSl01mUB35NQFAQQ I3IREANEGS7Srng05cA/N+x6RTWYihkTubr+db9uz35CS5C77Vadxl7IYyrwmS09X8eM iKAA== X-Received: by 10.112.44.171 with SMTP id f11mr16971461lbm.65.1424000008752; Sun, 15 Feb 2015 03:33:28 -0800 (PST) Received: from [10.0.1.7] (broadband-5-228-253-252.nationalcablenetworks.ru. [5.228.253.252]) by mx.google.com with ESMTPSA id m8sm2365491laj.29.2015.02.15.03.33.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 15 Feb 2015 03:33:27 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: mmap() question From: Dmitry Sivachenko In-Reply-To: <95E0B821-BF9B-4EBF-A1E5-1DDCBB1C3D1B@gmail.com> Date: Sun, 15 Feb 2015 14:33:24 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <95E0B821-BF9B-4EBF-A1E5-1DDCBB1C3D1B@gmail.com> To: "hackers@freebsd.org" X-Mailer: Apple Mail (2.2070.6) Cc: Konstantin Belousov X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2015 11:33:31 -0000 > On 9 =D0=BE=D0=BA=D1=82. 2013 =D0=B3., at 15:42, Dmitry Sivachenko = wrote: >=20 > Hello! >=20 > I have a program which mmap()s a lot of large files (total size more = that RAM and I have no swap), but it needs only small parts of that = files at a time. >=20 > My understanding is that when using mmap when I access some memory = region OS reads the relevant portion of that file from disk and caches = the result in memory. If there is no free memory, OS will purge = previously read part of mmap'ed file to free memory for the new chunk. >=20 > But this is not the case. I use the following simple program which = gets list of files as command line arguments, mmap()s them all and then = selects random file and random 1K parts of that file and computes a XOR = of bytes from that region. > After some time the program dies: > pid 63251 (a.out), uid 1232, was killed: out of swap space There is another way to observe incorrect "out of swap space" process = kills I encountered yesterday (fresh 10/stable). I have a program which does mmap()+mlock() on ~200GB data file (total = RAM is 256GB). The goal was to update this data file to new version. I copied new file = while the program was running with old one, stopped program and run it = again with new data file (old file still on disk). On the first invocation, program crashed with "out of swap space" error. = I run it again, it crash again. On the 3rd try it started successfully. I suspect the reason is the same: there were a lot of "Active" memory = left after I stopped program and when program started to mlock new file, = memory pages corresponding to old mmap were still using RAM. If an old data file was deleted before I starting the program with new = one, these "Active" memory pages would become "Free" and crash would not = occur. >=20 > It seems I incorrectly understand how mmap() works, can you please = clarify what's going wrong? >=20 > I expect that program to run indefinitely, purging some regions out of = RAM and reading the relevant parts of files. >=20 > Thanks! >=20 > #include > #include > #include > #include > #include > #include > #include > #include > #include >=20 > struct f_data { > char *beg; > off_t size; > }; >=20 > int > main(int argc, char* argv[]) { > if (argc < 2) { > fprintf(stderr, "Usage: %s ...\n", argv[0]); > exit(0); > } > int i, j, fd; > struct stat st; > struct f_data FILES[500]; > int NUM_FILES; > void *p; > NUM_FILES =3D argc - 1; > for (i=3D1; i < argc; i++) { > printf("%s... ", argv[i]); > if ((fd =3D open(argv[i], O_RDONLY)) < 0) > errx(1, "open"); > if (fstat(fd, &st) !=3D 0) > errx(1, "fstat"); > if ((p =3D mmap(NULL, st.st_size, PROT_READ, MAP_NOCORE, fd, = 0)) =3D=3D MAP_FAILED) > errx(1, "mmap"); > FILES[i-1].beg =3D (char*)p; > FILES[i-1].size =3D st.st_size; > if (msync(p, st.st_size, MS_INVALIDATE) !=3D 0) > errx(1, "msync"); > printf("Ok.\n"); > } > char chk =3D 0; > while(1) { > int rf =3D floor((double)random() / 2147483647 * NUM_FILES); > off_t offs =3D floor((double)random() / 2147483647 * = (FILES[rf].size - 1024)); > for (j=3D0; j<1024; j++) > chk ^=3D *(FILES[rf].beg + offs + j); > } > return 0; > } >=20 From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 16 20:29:57 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50A47F4B for ; Mon, 16 Feb 2015 20:29:57 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 304C5C0A for ; Mon, 16 Feb 2015 20:29:56 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 29459192A3B for ; Mon, 16 Feb 2015 20:29:55 +0000 (UTC) Message-ID: <54E25342.9060308@ignoranthack.me> Date: Mon, 16 Feb 2015 12:29:54 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: -current static linking or overlinking ... Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 20:29:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Building the qemu bsd-user static targets on head seem to be "overlinking" or something that is pulling in multiple copies of symbols. I'm not confident in my terminology here so I could be using the wrong terms. This is a recent regression (last couple of months). e.g. checkout qemu source, configure with: ./configure --target-list="i386-bsd-user" --static and build with gmake, You'll see a bunch of this at random places where things are linked statically. I assume "something" has changed in the toolchain that requires a change to the QEMU build? CC stubs/vm-stop.o CC stubs/vmstate.o CC stubs/cpus.o CC stubs/kvm.o CC stubs/qmp_pc_dimm_device_list.o AR libqemustub.a LINK qemu-ga /usr/lib/libpthread.a(thr_spec.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_sig.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_init.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_rtld.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_fork.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_create.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_exit.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_error.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJU4lM/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kzgMIAKo9wf+3LzY+we0X8RrbVHMc XgzNVWCCJ5F+bYwNADoPlmLh1SFVIWem3DtnjZL9i/wIZD26F6hjAgoFQwg013P2 gIVDlXSVjuBIMs4Fv4P2DNUgLrciZwbVXBmpg8olPOW1+xYSbVRMUd102O2Ha6ry 3gsR/TYaFxoM72tWF6m7e4uOo1L6knPUmuhwavtuBOXMGyhSjWspM9Yr0ZSYkxTe ZuWOEoEfwKuibxLRf2yVD7r0AGl5nCr7fkky9Rutcs+eebaRfuznwAt05sjE2PWB pb4ksxWKnJYCNkfw/FDn63EjvFY80W3t1RM1ggyEVB5RzgqYLYpoXPSEpPZxLLI= =leTH -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 16 22:41:03 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2CDA810B; Mon, 16 Feb 2015 22:41:03 +0000 (UTC) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E357BD49; Mon, 16 Feb 2015 22:41:02 +0000 (UTC) Received: by mail-ob0-f172.google.com with SMTP id nt9so47049733obb.3; Mon, 16 Feb 2015 14:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=jNNg4ARYPqrtelK9X1lWV5TGpwMezAEN9PkKHfKFv7o=; b=ZP4h/Nw+fJgw7ybk2op4nhuA4guyefEYyRiqTqcminI/vDTpCn8CgomP4Bled34sKU kceQXB1Ct5z7DAfi3aPSHmdsrmAaXG4pGbKXFTTvmfBk07joRB39V7gCXYCCnF73pim2 hK7Wfg0wa1KnedeSBkI11saRQTO9Yjlje2KkwPI8AZSpnLZYOPHMCECdjdT8dqLPOYMe kF0xsRLPEpNBP/Pj3yODMHd181BtgHc7/pxg/tWmW+FE9+FHe7qje4G/DtvqYnBMtx7+ 74sJjdysBZzrRIh7fYjjuzfkiC10Y8VvVj0EqjoS7VFpFDSS0UoHpfjTvYCRfY+RDKQR Mw1w== MIME-Version: 1.0 X-Received: by 10.182.43.129 with SMTP id w1mr16886932obl.86.1424126462250; Mon, 16 Feb 2015 14:41:02 -0800 (PST) Received: by 10.76.68.10 with HTTP; Mon, 16 Feb 2015 14:41:02 -0800 (PST) Date: Mon, 16 Feb 2015 17:41:02 -0500 Message-ID: Subject: zfs set running_with_scissors=on zroot From: Zaphod Beeblebrox To: FreeBSD Hackers , freebsd-fs Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 22:41:03 -0000 I've been struggling for awhile with zdb and friends recovering some data from a curiously problematic old ZFS array and I had an idea: Why not add a 'running_with_scissors' or maybe more properly named 'read_what_you_got_anyways' flag to zfs. Maybe this produces some garbage for a problem file or maybe it doesn't I see two scenarios where this is useful: 1) where ZFS has declared an "error" somewhere where a scrub will eventually remove that error. 2) where ZFS is having some sort of problem and the user just wants to try pushing through it. My concept of "how this would work" is that the flag would stop the machinery that would normally stop the data from being delivered. Note that case (1) might also be ameliorated by a flag or behavior that rechecked only the blocks and checksums of data in question. Right now, if ZFS has "declared" something bad, it will return an error when you access it --- even if a subsequent "scrub" would remove that flag --- that scrub can take many, many hours. From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 16 23:50:38 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5CA5DE2; Mon, 16 Feb 2015 23:50:38 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33EBA3D7; Mon, 16 Feb 2015 23:50:38 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t1GNoWV2073379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Feb 2015 01:50:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t1GNoWV2073379 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t1GNoWUr073377; Tue, 17 Feb 2015 01:50:32 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 17 Feb 2015 01:50:32 +0200 From: Konstantin Belousov To: sbruno@freebsd.org Subject: Re: -current static linking or overlinking ... Message-ID: <20150216235032.GP34251@kib.kiev.ua> References: <54E25342.9060308@ignoranthack.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54E25342.9060308@ignoranthack.me> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 23:50:38 -0000 On Mon, Feb 16, 2015 at 12:29:54PM -0800, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Building the qemu bsd-user static targets on head seem to be > "overlinking" or something that is pulling in multiple copies of > symbols. I'm not confident in my terminology here so I could be using > the wrong terms. > > This is a recent regression (last couple of months). > > e.g. checkout qemu source, configure with: > ./configure --target-list="i386-bsd-user" --static > > and build with gmake, You'll see a bunch of this at random places where > things are linked statically. I assume "something" has changed in the > toolchain that requires a change to the QEMU build? > > CC stubs/vm-stop.o > CC stubs/vmstate.o > CC stubs/cpus.o > CC stubs/kvm.o > CC stubs/qmp_pc_dimm_device_list.o > AR libqemustub.a > LINK qemu-ga > /usr/lib/libpthread.a(thr_spec.o): warning: multiple common of `__cleanup' > /usr/lib/crt1.o: warning: previous common is here > /usr/lib/libpthread.a(thr_sig.o): warning: multiple common of `__cleanup' > /usr/lib/crt1.o: warning: previous common is here > /usr/lib/libpthread.a(thr_init.o): warning: multiple common of `__cleanup' > /usr/lib/crt1.o: warning: previous common is here > /usr/lib/libpthread.a(thr_rtld.o): warning: multiple common of `__cleanup' > /usr/lib/crt1.o: warning: previous common is here > /usr/lib/libpthread.a(thr_fork.o): warning: multiple common of `__cleanup' > /usr/lib/crt1.o: warning: previous common is here > /usr/lib/libpthread.a(thr_create.o): warning: multiple common of > `__cleanup' > /usr/lib/crt1.o: warning: previous common is here > /usr/lib/libpthread.a(thr_exit.o): warning: multiple common of `__cleanup' > /usr/lib/crt1.o: warning: previous common is here > /usr/lib/libpthread.a(thr_error.o): warning: multiple common of > `__cleanup' > /usr/lib/crt1.o: warning: previous common is here This should fix it. You must rebuild the world to test. diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 71fc8df..e4bf4a6 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -271,7 +271,7 @@ void _malloc_first_thread(void); /* * Function to clean up streams, called from abort() and exit(). */ -void (*__cleanup)(void) __hidden; +extern void (*__cleanup)(void) __hidden; /* * Get kern.osreldate to detect ABI revisions. Explicitly From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 00:19:07 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FDAE845 for ; Tue, 17 Feb 2015 00:19:07 +0000 (UTC) Received: from mail-pd0-f179.google.com (exprod5og108.obsmtp.com [64.18.0.186]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 106F490F for ; Tue, 17 Feb 2015 00:19:06 +0000 (UTC) Received: from mail-pd0-f179.google.com ([209.85.192.179]) (using TLSv1) by exprod5ob108.postini.com ([64.18.4.12]) with SMTP ID DSNKVOKI+M/RsKlKpUBG9e7/S4HwJUUMnuCF@postini.com; Mon, 16 Feb 2015 16:19:07 PST Received: by pdjz10 with SMTP id z10so39717358pdj.0 for ; Mon, 16 Feb 2015 16:19:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type; bh=ih1xECg3PBa2kXRhwO2yxxw59CZtlAv2ppaaWdWkSLE=; b=HkJcepzbuwxcGKgs/FcILamNywBAPVegayFnMJJMzQiN3dGL01UUl22knJw/Jm5xgq zzGu2uY/ZR2WyUHQvHZXRXv0jZ/2ro9rzzFf845L2kQW0qLdB+1Ugc0FFCVuU3vIsaAg HFVPBZn+T2VJV4U3RABysWEjqvEe9uhAZ1FG6Vv2FNvhDf1YWFbRTl5+nh8Xi1M+TfnD tqMgzVRNHLPWJqG5CBQC3ZumIJmrFxoXpUA824WfgPHChllzaaGmS9KlyW6iqMbf6sRY tQ0fxcUxQTQaRQAP7WgXACf1HPcIQ+ybNcnLexYZlasnH2VZwuKkHBNZh9u6dUZ99TrU DSvg== X-Received: by 10.66.251.105 with SMTP id zj9mr44519941pac.4.1424118564504; Mon, 16 Feb 2015 12:29:24 -0800 (PST) X-Gm-Message-State: ALoCoQmQbwxqjxWatvkt8xGOKL5w8g7cTi6Z2Bi1NVKGl8xYyP4//NA+hnb+y2awVJwHeru1g6KoXXTHuZZEdAzrPz9D+nszUucLFOxYgHP2nfphhRg1CW2gBroHljwse3DeRoYy6aZNmEdYcogCPN4UcHAdEfV3/g== X-Received: by 10.66.251.105 with SMTP id zj9mr44519926pac.4.1424118564416; Mon, 16 Feb 2015 12:29:24 -0800 (PST) Received: from [192.168.200.212] ([50.136.155.142]) by mx.google.com with ESMTPSA id qm12sm15607202pdb.36.2015.02.16.12.29.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 12:29:23 -0800 (PST) Message-ID: <54E25322.3010304@llnw.com> Date: Mon, 16 Feb 2015 12:29:22 -0800 From: Sean Bruno User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: -current static linking or overlinking ... Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Tue, 17 Feb 2015 00:59:31 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 00:19:07 -0000 Building the qemu bsd-user static targets on head seem to be "overlinking" or something that is pulling in multiple copies of symbols. I'm not confident in my terminology here so I could be using the wrong terms. This is a recent regression (last couple of months). e.g. checkout qemu source, configure with: ./configure --target-list="i386-bsd-user" --static and build with gmake, You'll see a bunch of this at random places where things are linked statically. I assume "something" has changed in the toolchain that requires a change to the QEMU build? CC stubs/vm-stop.o CC stubs/vmstate.o CC stubs/cpus.o CC stubs/kvm.o CC stubs/qmp_pc_dimm_device_list.o AR libqemustub.a LINK qemu-ga /usr/lib/libpthread.a(thr_spec.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_sig.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_init.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_rtld.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_fork.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_create.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_exit.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here /usr/lib/libpthread.a(thr_error.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here -- The information in this message may be confidential. It is intended solely for the addressee(s). If you are not the intended recipient, any disclosure, copying or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 02:28:47 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57DB053F for ; Tue, 17 Feb 2015 02:28:47 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34512800 for ; Tue, 17 Feb 2015 02:28:46 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 62755192A3B; Tue, 17 Feb 2015 02:28:45 +0000 (UTC) Message-ID: <54E2A75C.9060404@ignoranthack.me> Date: Mon, 16 Feb 2015 18:28:44 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: -current static linking or overlinking ... References: <54E25342.9060308@ignoranthack.me> <20150216235032.GP34251@kib.kiev.ua> In-Reply-To: <20150216235032.GP34251@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 02:28:47 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 02/16/15 15:50, Konstantin Belousov wrote: > On Mon, Feb 16, 2015 at 12:29:54PM -0800, Sean Bruno wrote: >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 >> >> Building the qemu bsd-user static targets on head seem to be >> "overlinking" or something that is pulling in multiple copies of >> symbols. I'm not confident in my terminology here so I could be >> using the wrong terms. >> >> This is a recent regression (last couple of months). >> >> e.g. checkout qemu source, configure with: ./configure >> --target-list="i386-bsd-user" --static >> >> and build with gmake, You'll see a bunch of this at random >> places where things are linked statically. I assume "something" >> has changed in the toolchain that requires a change to the QEMU >> build? >> >> CC stubs/vm-stop.o CC stubs/vmstate.o CC stubs/cpus.o CC >> stubs/kvm.o CC stubs/qmp_pc_dimm_device_list.o AR >> libqemustub.a LINK qemu-ga /usr/lib/libpthread.a(thr_spec.o): >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: >> previous common is here /usr/lib/libpthread.a(thr_sig.o): >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: >> previous common is here /usr/lib/libpthread.a(thr_init.o): >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: >> previous common is here /usr/lib/libpthread.a(thr_rtld.o): >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: >> previous common is here /usr/lib/libpthread.a(thr_fork.o): >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: >> previous common is here /usr/lib/libpthread.a(thr_create.o): >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: >> previous common is here /usr/lib/libpthread.a(thr_exit.o): >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: >> previous common is here /usr/lib/libpthread.a(thr_error.o): >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: >> previous common is here > > This should fix it. You must rebuild the world to test. > > diff --git a/lib/libc/include/libc_private.h > b/lib/libc/include/libc_private.h index 71fc8df..e4bf4a6 100644 --- > a/lib/libc/include/libc_private.h +++ > b/lib/libc/include/libc_private.h @@ -271,7 +271,7 @@ void > _malloc_first_thread(void); /* * Function to clean up streams, > called from abort() and exit(). */ -void (*__cleanup)(void) > __hidden; +extern void (*__cleanup)(void) __hidden; > > /* * Get kern.osreldate to detect ABI revisions. Explicitly > This patch eliminates the libpthread.a warnings, which is the majority of the warnings. I believe I am now dealing with the previously existing warning messages now. There are still a few left from libc.a/crt1.o when building static. GEN trace/generated-helpers.c CC arm-bsd-user/trace/generated-helpers.o LINK arm-bsd-user/qemu-arm /usr/lib/libc.a(exit.o): warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: previous common is here GEN aarch64-bsd-user/config-target.h CC aarch64-bsd-user/exec.o sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJU4qdZXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kgKIIAKJw+J7rF+IpoUru3ULSGxMd AylcKISTNjkj6irCI7agZxyQV+/nxlIRa5t/WbZb74oAE4WBI2PRou4PUpWimk5C bpk4I+TbH0dT6LUDAVaL48qTIy9QUsHmlUZ4ANphyengW8Mgk5rCPbXG61fH4eMi 8MeT79iDoEPTxzCAC0gyw3IjQ+5rx6jQ/TXwX4Ao4mlXsbGdYJSJDIzs9gXVwa+6 vMPB1GPjyB8hOfX7/CU8Isjw+oFZiqVETevck4spxqNQS90GEUuURufSE5HCQE7Z 65S5Y8tbXoOBP4GToqMC2YpwwvcOLz30wtVuJLjN55obVm6qrOokL+ulhQvTY/0= =8/tU -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 06:27:48 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0674B72E for ; Tue, 17 Feb 2015 06:27:48 +0000 (UTC) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D088DFE0 for ; Tue, 17 Feb 2015 06:27:47 +0000 (UTC) Received: by mail-ig0-f178.google.com with SMTP id hl2so28013392igb.5 for ; Mon, 16 Feb 2015 22:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Vxm+cSnlJ7ecGEFvQU9a7vgOzAaqj2D7tFgSbclQ4h8=; b=Kj+UKR1xDRmKYfBKqTiI7gUH0PHA8XjnxqhlpL2W6jHthdqMDCNVnH/mxrSIgRZzoj DTDujH7vbMWj1A054RnbNuXcOjydChXHSxC6w7U9PPqxiCPHYEmETjLDTCNPsHe0rNIw HdLeu8lM8DuRqCkLO35iEN6BH3FUTUXzsJrqc8GvgZm0MKLZR0IudMI1fK9kvn1qkBuK T07fCThmD26oNC+5OM3TJJj/VY+i9/syVLPoLrwH96FuZGFeSGeBNbKGSIV+TY8B2FB2 zRBoaVbubF+POMfmdE6vvGvlAX/wvZtsx6ozQ1Dh4Gphus6JlySz7IboQPkrRwq95/2j 3K/A== MIME-Version: 1.0 X-Received: by 10.42.21.78 with SMTP id j14mr33727783icb.43.1424154466837; Mon, 16 Feb 2015 22:27:46 -0800 (PST) Received: by 10.36.55.213 with HTTP; Mon, 16 Feb 2015 22:27:46 -0800 (PST) Date: Tue, 17 Feb 2015 01:27:46 -0500 Message-ID: Subject: Kernel Panic From: Robert Simmons To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 06:27:48 -0000 I'm experiencing a kernel panic on a VM: panic: CPU0 does not support X87 or SSE: 0 This is on OpenStack (using KVM). Is there a kernel option that I can set that will allow this VM to boot without panic? From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 08:55:17 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F32736A; Tue, 17 Feb 2015 08:55:17 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCFDDD2; Tue, 17 Feb 2015 08:55:16 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t1H8t6qI013522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Feb 2015 10:55:06 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t1H8t6qI013522 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t1H8t6mK013521; Tue, 17 Feb 2015 10:55:06 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 17 Feb 2015 10:55:06 +0200 From: Konstantin Belousov To: sbruno@freebsd.org Subject: Re: -current static linking or overlinking ... Message-ID: <20150217085506.GQ34251@kib.kiev.ua> References: <54E25342.9060308@ignoranthack.me> <20150216235032.GP34251@kib.kiev.ua> <54E2A75C.9060404@ignoranthack.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54E2A75C.9060404@ignoranthack.me> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 08:55:17 -0000 On Mon, Feb 16, 2015 at 06:28:44PM -0800, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 02/16/15 15:50, Konstantin Belousov wrote: > > On Mon, Feb 16, 2015 at 12:29:54PM -0800, Sean Bruno wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 > >> > >> Building the qemu bsd-user static targets on head seem to be > >> "overlinking" or something that is pulling in multiple copies of > >> symbols. I'm not confident in my terminology here so I could be > >> using the wrong terms. > >> > >> This is a recent regression (last couple of months). > >> > >> e.g. checkout qemu source, configure with: ./configure > >> --target-list="i386-bsd-user" --static > >> > >> and build with gmake, You'll see a bunch of this at random > >> places where things are linked statically. I assume "something" > >> has changed in the toolchain that requires a change to the QEMU > >> build? > >> > >> CC stubs/vm-stop.o CC stubs/vmstate.o CC stubs/cpus.o CC > >> stubs/kvm.o CC stubs/qmp_pc_dimm_device_list.o AR > >> libqemustub.a LINK qemu-ga /usr/lib/libpthread.a(thr_spec.o): > >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: > >> previous common is here /usr/lib/libpthread.a(thr_sig.o): > >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: > >> previous common is here /usr/lib/libpthread.a(thr_init.o): > >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: > >> previous common is here /usr/lib/libpthread.a(thr_rtld.o): > >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: > >> previous common is here /usr/lib/libpthread.a(thr_fork.o): > >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: > >> previous common is here /usr/lib/libpthread.a(thr_create.o): > >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: > >> previous common is here /usr/lib/libpthread.a(thr_exit.o): > >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: > >> previous common is here /usr/lib/libpthread.a(thr_error.o): > >> warning: multiple common of `__cleanup' /usr/lib/crt1.o: warning: > >> previous common is here > > > > This should fix it. You must rebuild the world to test. > > > > diff --git a/lib/libc/include/libc_private.h > > b/lib/libc/include/libc_private.h index 71fc8df..e4bf4a6 100644 --- > > a/lib/libc/include/libc_private.h +++ > > b/lib/libc/include/libc_private.h @@ -271,7 +271,7 @@ void > > _malloc_first_thread(void); /* * Function to clean up streams, > > called from abort() and exit(). */ -void (*__cleanup)(void) > > __hidden; +extern void (*__cleanup)(void) __hidden; > > > > /* * Get kern.osreldate to detect ABI revisions. Explicitly > > > > > This patch eliminates the libpthread.a warnings, which is the majority > of the warnings. I believe I am now dealing with the previously > existing warning messages now. > > There are still a few left from libc.a/crt1.o when building static. > GEN trace/generated-helpers.c > CC arm-bsd-user/trace/generated-helpers.o > LINK arm-bsd-user/qemu-arm > /usr/lib/libc.a(exit.o): warning: multiple common of `__cleanup' > /usr/lib/crt1.o: warning: previous common is here > GEN aarch64-bsd-user/config-target.h > CC aarch64-bsd-user/exec.o > I really do not see how is this possible except inconsistent buildworld or installworld. The patch is committed as r278889. From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 08:58:57 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 097E46BC for ; Tue, 17 Feb 2015 08:58:57 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BDA9106 for ; Tue, 17 Feb 2015 08:58:56 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t1H8wpoQ014650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Feb 2015 10:58:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t1H8wpoQ014650 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t1H8wpGd014649; Tue, 17 Feb 2015 10:58:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 17 Feb 2015 10:58:51 +0200 From: Konstantin Belousov To: Robert Simmons Subject: Re: Kernel Panic Message-ID: <20150217085851.GS34251@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 08:58:57 -0000 On Tue, Feb 17, 2015 at 01:27:46AM -0500, Robert Simmons wrote: > I'm experiencing a kernel panic on a VM: > panic: CPU0 does not support X87 or SSE: 0 > This is on OpenStack (using KVM). > > Is there a kernel option that I can set that will allow this VM to > boot without panic? The panic indicates that machine you trying to boot on is not compliant with the Intel specification. You may try the luck with setting hw.use_xsave=0 at the loader prompt, but I expect that you get other problems. From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 17:32:46 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6253797F; Tue, 17 Feb 2015 17:32:46 +0000 (UTC) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AE4F60E; Tue, 17 Feb 2015 17:32:43 +0000 (UTC) Received: by mail-ig0-f169.google.com with SMTP id hl2so44126830igb.0; Tue, 17 Feb 2015 09:32:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Esp6ALfgRzIjazBg9paVjvrEYj0fv+fZMk9A409kV9A=; b=Lr9qbR2NlphKw2Tyi5FMb2T6nP37qv8Q9vBkdV/OrNrmvV8Hw637YTBSBc5nakGnG6 EoUwPKCdnV4dnQCypPaHKrTPnBoLVVcylZ4+oY2QCbK3kcKugz5ikGA1kuHB6+Rz/M8x TUdkohKfd+tkBGQPYHUDo1wG03ixN9PLZx4sZEm741Z7o8/7FRYgDbWDLTXv5PCSlJe2 VYCaZuP51QakxpYdpFaE1lH1RKcPvEDnvuu7S96jnDpXc7MGELTZIDW2FUKNye+bMTfw gjiieSSzuK0VrkJUb29VCArDHCwnFSksP9zJxvEIc52eg1LpqRwoXsAfZHXZO56JE2Db R35A== X-Received: by 10.107.3.20 with SMTP id 20mr36046172iod.92.1424194362609; Tue, 17 Feb 2015 09:32:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.107.138 with HTTP; Tue, 17 Feb 2015 09:32:22 -0800 (PST) In-Reply-To: <4E4BF84E-F6FD-4D25-8B2C-2B443894697B@gmail.com> References: <4E4BF84E-F6FD-4D25-8B2C-2B443894697B@gmail.com> From: Luca Pizzamiglio Date: Tue, 17 Feb 2015 18:32:22 +0100 Message-ID: Subject: Re: pcie Realtek 8168G issues (re driver) To: Ben Perrault Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers , "freebsd-network@freebsd.org" , FreeBSD Current , "freebsd-hardware@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 17:32:46 -0000 Hi Ben, thanks for the tip! tso was already disabled. I tried anyway and unfortunately it crashes as before. I filled a bug report (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197535) and marius@ is giving me a big help on it. Best regards, Luca On Fri, Feb 13, 2015 at 7:34 PM, Ben Perrault wrot= e: > Luca, > > I've had the same issue with this interface on both PCIe boards and embed= ded in a handful of Lenovo products. The one, fairly ugly workaround I've f= ound that makes it work well enough is disable tso ( i.e. ifconfig re0 down= && ifconfig re0 -tso && ifconfig re0 up ). This also seems to stop the pan= ics under current. > > I'm not sure it will work for you - but it has on everyone of those inter= faces I've dealt with. > > Good luck, > -bp > >> On Feb 13, 2015, at 8:06 AM, Luca Pizzamiglio wrote: >> >> Hi, I'm Luca, >> >> I've some issues using a PCIe Realtek Ethernet board: >> re0@pci0:3:0:0: class=3D0x020000 card=3D0x012310ec chip=3D0x816810ec rev= =3D0x0c hdr=3D0x00 >> vendor =3D 'Realtek Semiconductor Co., Ltd.' >> device =3D 'RTL8111/8168B PCI Express Gigabit Ethernet controller= ' >> class =3D network >> subclass =3D ethernet >> bar [10] =3D type I/O Port, range 32, base 0x1000, size 256, enable= d >> bar [18] =3D type Memory, range 64, base 0x90500000, size 4096, ena= bled >> bar [20] =3D type Prefetchable Memory, range 64, base 0x90400000, >> size 16384, enabled >> cap 01[40] =3D powerspec 3 supports D0 D1 D2 D3 current D0 >> cap 05[50] =3D MSI supports 1 message, 64 bit >> cap 10[70] =3D PCI-Express 2 endpoint IRQ 1 max data 128(128) link x1= (x1) >> speed 2.5(2.5) ASPM disabled(L0s/L1) >> cap 11[b0] =3D MSI-X supports 4 messages >> Table in map 0x20[0x0], PBA in map 0x20[0x800] >> cap 03[d0] =3D VPD >> ecap 0001[100] =3D AER 1 0 fatal 0 non-fatal 0 corrected >> ecap 0002[140] =3D VC 1 max VC0 >> ecap 0003[160] =3D Serial 1 01000000684ce000 >> ecap 0018[170] =3D LTR 1 >> >> Rx and Tx don't work. After some minutes the interface is activated I >> get kernel panic. >> I've already tried to disable MSIx and MSI. >> It seems a DMA problem, rx fill the 256 descriptors and the nothing >> else until the panic. netstat -s shows now new packets. >> >> I filled a bug report with more infos: >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197535 >> >> could someone kindly pointing some ideas? >> >> Best regards, >> Luca >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.or= g" From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 17:42:02 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0050E206 for ; Tue, 17 Feb 2015 17:42:01 +0000 (UTC) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4FD8795 for ; Tue, 17 Feb 2015 17:42:01 +0000 (UTC) Received: by iecrl12 with SMTP id rl12so40213868iec.4 for ; Tue, 17 Feb 2015 09:42:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UKgqAgkBcRBeVi6oe4rrLDpQgu28WckFX4yDLYxDgbA=; b=c3q+PotTd3wVnV8ZyGFE9VS6tSclUWEm9dcMyQHz0p3NkZV+DPncvnp5XpFbGOrAdc WReJiCDZL8iP+ooIhBuGZc82+YVSlT+kqBLdS5x9cGq7oJIIsZ71qWsWO9qBI3UD3kMy cIVsoOzKM9GwEv0XTaM6L3z18qS0gf8VejGqxsH4R0+vHklwoJchp2iggjapz/Drfv38 05PNkRwgXDChF+j9lM31/rfk1ZBR0w2yCWWAA9CeDiQeXn3z06IKDziHDG6aFHE2kmTG ZaaBS2xlp4cVQeUCb3dL16IWbkNYl11VnSYvADUCha7px4eko2uZti+bAZifLWex9lQ4 RC8g== MIME-Version: 1.0 X-Received: by 10.107.3.20 with SMTP id 20mr36100810iod.92.1424194920936; Tue, 17 Feb 2015 09:42:00 -0800 (PST) Received: by 10.36.55.213 with HTTP; Tue, 17 Feb 2015 09:42:00 -0800 (PST) In-Reply-To: <20150217085851.GS34251@kib.kiev.ua> References: <20150217085851.GS34251@kib.kiev.ua> Date: Tue, 17 Feb 2015 12:42:00 -0500 Message-ID: Subject: Re: Kernel Panic From: Robert Simmons To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 17:42:02 -0000 On Tue, Feb 17, 2015 at 3:58 AM, Konstantin Belousov wrote: > On Tue, Feb 17, 2015 at 01:27:46AM -0500, Robert Simmons wrote: >> I'm experiencing a kernel panic on a VM: >> panic: CPU0 does not support X87 or SSE: 0 >> This is on OpenStack (using KVM). >> >> Is there a kernel option that I can set that will allow this VM to >> boot without panic? > The panic indicates that machine you trying to boot on is not compliant > with the Intel specification. You may try the luck with setting > hw.use_xsave=0 at the loader prompt, but I expect that you get other > problems. Thanks! This works and allows the VM to boot. The problem appears to be a bug in KVM virtualization, and it has been fixed upstream. I'm trying to get my cloud provider to patch their stack. You mentioned that this may introduce other problems. How bad and what kind of problems do you think may happen? From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 19:29:26 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46076F25 for ; Tue, 17 Feb 2015 19:29:26 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D8EC772 for ; Tue, 17 Feb 2015 19:29:26 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F2BE1B941; Tue, 17 Feb 2015 14:29:24 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Subject: Re: Kernel Panic Date: Tue, 17 Feb 2015 13:36:27 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <20150217085851.GS34251@kib.kiev.ua> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201502171336.27550.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 17 Feb 2015 14:29:25 -0500 (EST) Cc: Robert Simmons X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 19:29:26 -0000 On Tuesday, February 17, 2015 12:42:00 pm Robert Simmons wrote: > On Tue, Feb 17, 2015 at 3:58 AM, Konstantin Belousov > wrote: > > On Tue, Feb 17, 2015 at 01:27:46AM -0500, Robert Simmons wrote: > >> I'm experiencing a kernel panic on a VM: > >> panic: CPU0 does not support X87 or SSE: 0 > >> This is on OpenStack (using KVM). > >> > >> Is there a kernel option that I can set that will allow this VM to > >> boot without panic? > > The panic indicates that machine you trying to boot on is not compliant > > with the Intel specification. You may try the luck with setting > > hw.use_xsave=0 at the loader prompt, but I expect that you get other > > problems. > > Thanks! > > This works and allows the VM to boot. The problem appears to be a bug > in KVM virtualization, and it has been fixed upstream. I'm trying to > get my cloud provider to patch their stack. > > You mentioned that this may introduce other problems. How bad and what > kind of problems do you think may happen? If SSE did not actually work, then userland probably would not work. If it is just that this version of KVM doesn't handle the cpuid reporting for XSAVE correctly, tehn Konstantin's workaround should be fine. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 18:31:46 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B16DA944; Tue, 17 Feb 2015 18:31:46 +0000 (UTC) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62E42E26; Tue, 17 Feb 2015 18:31:46 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.85) with esmtp (envelope-from ) id <1YNmvp-000vMe-Si>; Tue, 17 Feb 2015 19:31:37 +0100 Received: from g225058095.adsl.alicedsl.de ([92.225.58.95] helo=thor.walstatt.dynvpn.de) by inpost2.zedat.fu-berlin.de (Exim 4.85) with esmtpsa (envelope-from ) id <1YNmvp-003Sso-NW>; Tue, 17 Feb 2015 19:31:37 +0100 Date: Tue, 17 Feb 2015 19:31:32 +0100 From: "O. Hartmann" To: Luca Pizzamiglio Subject: Re: pcie Realtek 8168G issues (re driver) Message-ID: <20150217193132.65fe16bb.ohartman@zedat.fu-berlin.de> In-Reply-To: References: <4E4BF84E-F6FD-4D25-8B2C-2B443894697B@gmail.com> Organization: FU Berlin X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/Rm5GP2X/Le8.ifzKj90Bx1t"; protocol="application/pgp-signature" X-Originating-IP: 92.225.58.95 X-ZEDAT-Hint: A X-Mailman-Approved-At: Tue, 17 Feb 2015 19:56:15 +0000 Cc: Ben Perrault , "freebsd-network@freebsd.org" , FreeBSD Current , "freebsd-hardware@freebsd.org" , FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 18:31:46 -0000 --Sig_/Rm5GP2X/Le8.ifzKj90Bx1t Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Tue, 17 Feb 2015 18:32:22 +0100 Luca Pizzamiglio schrieb: > Hi Ben, > thanks for the tip! tso was already disabled. > I tried anyway and unfortunately it crashes as before. >=20 > I filled a bug report > (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197535) and marius@ > is giving me a big help on it. >=20 > Best regards, > Luca >=20 > On Fri, Feb 13, 2015 at 7:34 PM, Ben Perrault wr= ote: > > Luca, > > > > I've had the same issue with this interface on both PCIe boards and emb= edded in a > > handful of Lenovo products. The one, fairly ugly workaround I've found = that makes it > > work well enough is disable tso ( i.e. ifconfig re0 down && ifconfig re= 0 -tso && > > ifconfig re0 up ). This also seems to stop the panics under current. > > > > I'm not sure it will work for you - but it has on everyone of those int= erfaces I've > > dealt with. > > > > Good luck, > > -bp > > > >> On Feb 13, 2015, at 8:06 AM, Luca Pizzamiglio wrote: > >> > >> Hi, I'm Luca, > >> > >> I've some issues using a PCIe Realtek Ethernet board: > >> re0@pci0:3:0:0: class=3D0x020000 card=3D0x012310ec chip=3D0x816810ec r= ev=3D0x0c hdr=3D0x00 > >> vendor =3D 'Realtek Semiconductor Co., Ltd.' > >> device =3D 'RTL8111/8168B PCI Express Gigabit Ethernet controll= er' > >> class =3D network > >> subclass =3D ethernet > >> bar [10] =3D type I/O Port, range 32, base 0x1000, size 256, enab= led > >> bar [18] =3D type Memory, range 64, base 0x90500000, size 4096, e= nabled > >> bar [20] =3D type Prefetchable Memory, range 64, base 0x90400000, > >> size 16384, enabled > >> cap 01[40] =3D powerspec 3 supports D0 D1 D2 D3 current D0 > >> cap 05[50] =3D MSI supports 1 message, 64 bit > >> cap 10[70] =3D PCI-Express 2 endpoint IRQ 1 max data 128(128) link = x1(x1) > >> speed 2.5(2.5) ASPM disabled(L0s/L1) > >> cap 11[b0] =3D MSI-X supports 4 messages > >> Table in map 0x20[0x0], PBA in map 0x20[0x800] > >> cap 03[d0] =3D VPD > >> ecap 0001[100] =3D AER 1 0 fatal 0 non-fatal 0 corrected > >> ecap 0002[140] =3D VC 1 max VC0 > >> ecap 0003[160] =3D Serial 1 01000000684ce000 > >> ecap 0018[170] =3D LTR 1 > >> > >> Rx and Tx don't work. After some minutes the interface is activated I > >> get kernel panic. > >> I've already tried to disable MSIx and MSI. > >> It seems a DMA problem, rx fill the 256 descriptors and the nothing > >> else until the panic. netstat -s shows now new packets. > >> > >> I filled a bug report with more infos: > >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197535 > >> > >> could someone kindly pointing some ideas? > >> > >> Best regards, > >> Luca > >> _______________________________________________ > >> freebsd-current@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.= org" > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" In September 2014 I filed allready a bug acoording to strange behaviour wit= h a Lenovo ThinkPad E540 with a Realtek chip: Bug 193743 - RTL8111/8168B PCI Express Gigabit Ethernet controller: doesn't work properly, problems getting UP automatically=20 --Sig_/Rm5GP2X/Le8.ifzKj90Bx1t Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU44kEAAoJEOgBcD7A/5N8dLMIALpr3ZZ8ZoWvlCvn8E7jDxBY OWNR83JgaQJL/maZKUPIsV9sj3Czu7Kdxq0cQyJVVa0o8tLf94C40pPEf7NrlcmG aEC8sJTM4B38XNKr5dZVuGi+9f1meAZcTE2m6jWrUQHzG/zmV+5eDnZI4H0uoqdn 3dHqHi+w3BsZU4SldUvDdKtN/wwClFDuHlZZtu1PUAD51/n1SCRs/tiNUu8Ok43q sF5X0SEZN7RZsmwfBZwbT8zrZW7zgatCYakUbAOY/5vI9XpWI5lGgAIFfSPZLE4Z YaT4//g8VcKCEZE73OQVUcGMaFZUZ+3tjDITeN9tLxDDrANqox4Nq7qDBNf1lqA= =elf/ -----END PGP SIGNATURE----- --Sig_/Rm5GP2X/Le8.ifzKj90Bx1t-- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 08:32:15 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F04B30E for ; Wed, 18 Feb 2015 08:32:15 +0000 (UTC) Received: from ustc.edu.cn (email6.ustc.edu.cn [IPv6:2001:da8:d800::8]) by mx1.freebsd.org (Postfix) with ESMTP id 73F502E0 for ; Wed, 18 Feb 2015 08:32:14 +0000 (UTC) Received: from freebsd.my.domain (unknown [58.211.218.74]) by newmailweb.ustc.edu.cn (Coremail) with SMTP id LkAmygBHTvYDTuRUIKYoAw--.30331S2; Wed, 18 Feb 2015 16:32:09 +0800 (CST) From: Tiwei Bie To: freebsd-hackers@freebsd.org Subject: [PATCH] Use anonymous unions and structs to organize shared space instead of preprocessor macros. Date: Wed, 18 Feb 2015 16:31:48 +0800 Message-Id: <1424248308-20753-1-git-send-email-btw@mail.ustc.edu.cn> X-Mailer: git-send-email 2.1.2 X-CM-TRANSID: LkAmygBHTvYDTuRUIKYoAw--.30331S2 X-Coremail-Antispam: 1UD129KBjvJXoW3Ar17KryUJw4rXr15WF17KFg_yoWxXrykpa yfCFWayrWUJr1DWr97Ga15uaySkw4kCr1xGay3Zw40gF4Sqr17Wr1Utr4rArW5ZrWku3s2 vrs0kw4ru3s2kF7anT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU90b7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv 0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUAVWUtwAv7VC2z2 80aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxkIecxE wVAFwVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267 AKxVWUXVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E 67AF67kF1VAFwI0_Jr0_JrylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCw CI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6Fyj6rWU JwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIda VFxhVjvjDU0xZFpf9x07bzwZcUUUUU= X-CM-SenderInfo: xewzqzxdloh3xvwfhvlgxou0/1tbiAQUBAVQhl-COsAAVs9 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2015 08:32:15 -0000 Hi all, Similar to r278920 [1], the preprocessor macros are converted into anonymous unions and structs in buf, devreq, file, sigio, vnode, xvnode and uma_slab. [1] http://svnweb.freebsd.org/base?view=revision&revision=278920 --- sys/sys/buf.h | 8 +++----- sys/sys/bus.h | 8 +++----- sys/sys/file.h | 9 +++------ sys/sys/sigio.h | 8 +++----- sys/sys/vnode.h | 34 ++++++++++++---------------------- sys/vm/uma_int.h | 9 +++------ 6 files changed, 27 insertions(+), 49 deletions(-) diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 71ef74f..7324f90 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -124,14 +124,12 @@ struct buf { struct ucred *b_wcred; /* Write credentials reference. */ void *b_saveaddr; /* Original b_addr for physio. */ union { - TAILQ_ENTRY(buf) bu_freelist; /* (Q) */ + TAILQ_ENTRY(buf) b_freelist; /* (Q) */ struct { void (*pg_iodone)(void *, vm_page_t *, int, int); int pg_reqpage; - } bu_pager; - } b_union; -#define b_freelist b_union.bu_freelist -#define b_pager b_union.bu_pager + } b_pager; + }; union cluster_info { TAILQ_HEAD(cluster_list_head, buf) cluster_head; TAILQ_ENTRY(buf) cluster_entry; diff --git a/sys/sys/bus.h b/sys/sys/bus.h index d6dc535..e76b2ca 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -102,11 +102,9 @@ struct devreq { char dr_name[128]; int dr_flags; /* request-specific flags */ union { - struct devreq_buffer dru_buffer; - void *dru_data; - } dr_dru; -#define dr_buffer dr_dru.dru_buffer /* variable-sized buffer */ -#define dr_data dr_dru.dru_data /* fixed-size buffer */ + struct devreq_buffer dr_buffer; /* variable-sized buffer */ + void *dr_data; /* fixed-size buffer */ + }; }; #define DEV_ATTACH _IOW('D', 1, struct devreq) diff --git a/sys/sys/file.h b/sys/sys/file.h index 1538851..4ac62b9 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -173,10 +173,10 @@ struct file { int f_seqcount; /* (a) Count of sequential accesses. */ off_t f_nextoff; /* next expected read/write offset. */ union { - struct cdev_privdata *fvn_cdevpriv; + struct cdev_privdata *f_cdevpriv; /* (d) Private data for the cdev. */ - struct fadvise_info *fvn_advice; - } f_vnun; + struct fadvise_info *f_advice; + }; /* * DFLAG_SEEKABLE specific fields */ @@ -187,9 +187,6 @@ struct file { void *f_label; /* Place-holder for MAC label. */ }; -#define f_cdevpriv f_vnun.fvn_cdevpriv -#define f_advice f_vnun.fvn_advice - #define FOFFSET_LOCKED 0x1 #define FOFFSET_LOCK_WAITING 0x2 #define FDEVFS_VNODE 0x4 diff --git a/sys/sys/sigio.h b/sys/sys/sigio.h index 62ece6d..fc84154 100644 --- a/sys/sys/sigio.h +++ b/sys/sys/sigio.h @@ -45,17 +45,15 @@ */ struct sigio { union { - struct proc *siu_proc; /* (c) process to receive SIGIO/SIGURG */ - struct pgrp *siu_pgrp; /* (c) process group to receive ... */ - } sio_u; + struct proc *sio_proc; /* (c) process to receive SIGIO/SIGURG */ + struct pgrp *sio_pgrp; /* (c) process group to receive ... */ + }; SLIST_ENTRY(sigio) sio_pgsigio; /* (pg) sigio's for process or group */ struct sigio **sio_myref; /* (c) location of the pointer that holds * the reference to this structure */ struct ucred *sio_ucred; /* (c) current credentials */ pid_t sio_pgid; /* (c) pgid for signals */ }; -#define sio_proc sio_u.siu_proc -#define sio_pgrp sio_u.siu_pgrp SLIST_HEAD(sigiolst, sigio); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 8a14f69..ff7f13f 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -114,11 +114,11 @@ struct vnode { * See #defines below for renaming to v_* namespace. */ union { - struct mount *vu_mount; /* v ptr to mountpoint (VDIR) */ - struct socket *vu_socket; /* v unix domain net (VSOCK) */ - struct cdev *vu_cdev; /* v device (VCHR, VBLK) */ - struct fifoinfo *vu_fifoinfo; /* v fifo (VFIFO) */ - } v_un; + struct mount *v_mountedhere; /* v ptr to mountpoint (VDIR) */ + struct socket *v_socket; /* v unix domain net (VSOCK) */ + struct cdev *v_rdev; /* v device (VCHR, VBLK) */ + struct fifoinfo *v_fifoinfo; /* v fifo (VFIFO) */ + }; /* * vfs_hash: (mount + inode) -> vnode hash. The hash value @@ -173,11 +173,6 @@ struct vnode { #endif /* defined(_KERNEL) || defined(_KVM_VNODE) */ -#define v_mountedhere v_un.vu_mount -#define v_socket v_un.vu_socket -#define v_rdev v_un.vu_cdev -#define v_fifoinfo v_un.vu_fifoinfo - /* XXX: These are temporary to avoid a source sweep at this time */ #define v_object v_bufobj.bo_object @@ -196,20 +191,15 @@ struct xvnode { long xv_numoutput; /* num of writes in progress */ enum vtype xv_type; /* vnode type */ union { - void *xvu_socket; /* socket, if VSOCK */ - void *xvu_fifo; /* fifo, if VFIFO */ - dev_t xvu_rdev; /* maj/min, if VBLK/VCHR */ + void *xv_socket; /* socket, if VSOCK */ + void *xv_fifo; /* fifo, if VFIFO */ + dev_t xv_rdev; /* maj/min, if VBLK/VCHR */ struct { - dev_t xvu_dev; /* device, if VDIR/VREG/VLNK */ - ino_t xvu_ino; /* id, if VDIR/VREG/VLNK */ - } xv_uns; - } xv_un; + dev_t xv_dev; /* device, if VDIR/VREG/VLNK */ + ino_t xv_ino; /* id, if VDIR/VREG/VLNK */ + }; + }; }; -#define xv_socket xv_un.xvu_socket -#define xv_fifo xv_un.xvu_fifo -#define xv_rdev xv_un.xvu_rdev -#define xv_dev xv_un.xv_uns.xvu_dev -#define xv_ino xv_un.xv_uns.xvu_ino /* We don't need to lock the knlist */ #define VN_KNLIST_EMPTY(vp) ((vp)->v_pollinfo == NULL || \ diff --git a/sys/vm/uma_int.h b/sys/vm/uma_int.h index 1ffc7d5..dff24be 100644 --- a/sys/vm/uma_int.h +++ b/sys/vm/uma_int.h @@ -231,9 +231,9 @@ BITSET_DEFINE(slabbits, SLAB_SETSIZE); struct uma_slab { uma_keg_t us_keg; /* Keg we live in */ union { - LIST_ENTRY(uma_slab) _us_link; /* slabs in zone */ - unsigned long _us_size; /* Size of allocation */ - } us_type; + LIST_ENTRY(uma_slab) us_link; /* slabs in zone */ + unsigned long us_size; /* Size of allocation */ + }; SLIST_ENTRY(uma_slab) us_hlink; /* Link for hash table */ uint8_t *us_data; /* First item */ struct slabbits us_free; /* Free bitmask. */ @@ -245,9 +245,6 @@ struct uma_slab { uint8_t us_pad; /* Pad to 32bits, unused. */ }; -#define us_link us_type._us_link -#define us_size us_type._us_size - /* * The slab structure for UMA_ZONE_REFCNT zones for whose items we * maintain reference counters in the slab for. -- 2.1.2 Tiwei Bie From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 18:47:13 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6D75664 for ; Wed, 18 Feb 2015 18:47:13 +0000 (UTC) Received: from mail-qc0-f169.google.com (mail-qc0-f169.google.com [209.85.216.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 636ED3FF for ; Wed, 18 Feb 2015 18:47:12 +0000 (UTC) Received: by mail-qc0-f169.google.com with SMTP id m20so2453354qcx.0 for ; Wed, 18 Feb 2015 10:47:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=k1Wp6E+omwljC3EP9Qoyigh2BtjDY5hhsjSudFbEG/0=; b=CfD6+sduweVdidCz0yS772ma0RsvOe79SdMosNbgqNpK/6WzipNo4QCtS5/vNF0zCq Edkmi4cyDi5jd/IVditkmklCcHPG2pO/MS9Sqxwx1B/Bm7yZndMF5hB8KZxN4cHYD/bG I2SeRLy9TiLQCaGoSORc/PhLK2Qlztb8cOGC/peyzH/zpTGR+TixDzV6IauHpJogYdFk SKtbsLryORQdiptiC69ZOHC2Ibyn6evEiLhgjr2phMcR7WEwuzvkQ0UC0vyPU2EAuoqx pe0bZ1bAeja/TNsJVU7IA3MYrWFqCS3eyohEoLVFtqTX5WkLSIM7m28NRn076PrGJwj3 8rew== X-Gm-Message-State: ALoCoQkFPEnBNeLJaM/+HF+LICmIVLCmVCf260Yi385wo0trRhE4k4Jl/FeZ0a6+18fqIOEG+AGg X-Received: by 10.140.231.204 with SMTP id b195mr2574730qhc.98.1424282077783; Wed, 18 Feb 2015 09:54:37 -0800 (PST) Received: from blindness.ops.about.com ([209.66.78.50]) by mx.google.com with ESMTPSA id x124sm8119435qha.2.2015.02.18.09.54.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 09:54:36 -0800 (PST) Message-ID: <54E4D1D9.2080006@longcount.org> Date: Wed, 18 Feb 2015 12:54:33 -0500 From: Mark Saad User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: local pkgng repo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2015 18:47:13 -0000 All I am working on setting up a local repo for pkgng. I want to have a local copy of the quarterly packages, so I can archive them as needed and to run the repo inside of a private network. I am using FreeBSD 9.3-RELEASE amd64 whit pkg v 1.4.10 Here is what I did 1. Mirror the contents of the public mirror to my mirror curlmirror.pl -s 100000000000 -o 2014Q4 http://pkg.freebsd.org/freebsd:9:x86:64/quarterly 2. Setup thttpd to serve this directory thttpd -p 8080 -r -d /mnt/pkgng/ -l /tmp/thttpd-pkgng.log 3. Setup a client to use this new repo [root@roseta ~]# cat /usr/local/etc/pkg/repos/About.conf About: { url: "http://nyprdcpkgng1:8080/${ABI}/quarterly", mirror_type: "http", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes } 4. Disabled the master repo on the client [root@roseta ~]# cat /usr/local/etc/pkg/repos/FreeBSD.conf FreeBSD: { enabled: no } 5. Tested that I can browse to the http server via a real client. XXX>XXX>XXX>XXX - - [17/Feb/2015:21:05:10 +0000] "GET /freebsd%3a9%3ax86%3a64/ HTTP/1.1" 200 25000 "http://nyprdcpkgng1/" "Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Firefox/31.0" XXX>XXX>XXX>XXX- - [17/Feb/2015:21:05:14 +0000] "GET /freebsd%3a9%3ax86%3a64/2014Q4/ HTTP/1.1" 200 1652 "http://nyprdcpkgng1/freebsd%3a9%3ax86%3a64/" "Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Firefox/31.0 6. Then test the client [root@roseta ~]# pkg update Updating About repository catalogue... pkg: http://nyprdcpkgng1:8080/FreeBSD:9:amd64/quarterly/meta.txz: Not Found pkg: repository About has no meta file, using default settings pkg: http://nyprdcpkgng1:8080/FreeBSD:9:amd64/quarterly/packagesite.txz: Not Found pkg: Unable to update repository About Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. 7. Check the logs on the pkgng mirror to see what happened. XXX>XXX>XXX>XXX - - [18/Feb/2015:17:13:06 +0000] "GET /FreeBSD:9:amd64/quarterly/meta.txz HTTP/1.1" 404 0 "" "pkg/1.4.10" XXX>XXX>XXX>XXX - - [18/Feb/2015:17:13:06 +0000] "GET /FreeBSD:9:amd64/quarterly/packagesite.txz HTTP/1.1" 404 0 "" "pkg/1.4.10" XXX>XXX>XXX>XXX - - [18/Feb/2015:17:21:15 +0000] "GET /FreeBSD:9:amd64/quarterly/meta.txz HTTP/1.1" 404 0 "" "pkg/1.4.10" XXX>XXX>XXX>XXX - - [18/Feb/2015:17:21:15 +0000] "GET /FreeBSD:9:amd64/quarterly/packagesite.txz HTTP/1.1" 404 0 Where do I stand --------------------- So in step 5 I noted that the request is for freebsd%3a9%3ax86%3a64 and not freebsd:9:x86:64 ok not sure why its html encoded but it still works secondly in step 7 the client appears to translate the ${ABI} in my config to FreeBSD:9:amd64 and not freebsd:9:x86:64 which is strange. What I tried . ------------------- So in the sake of trying sill things that should not matter I ln'd freebsd:9:x86:64 to FreeBSD:9:amd64 Then I went to my client and tested it [root@roseta ~]# pkg update Updating About repository catalogue... Fetching meta.txz: 100% 968 B 1.0kB/s 00:01 Fetching packagesite.txz: 100% 5 MiB 5.3MB/s 00:01 Processing entries: 100% About repository update completed. 23741 packages processed Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. [root@roseta ~]# That looks like it was ok let me try to install a package [root@roseta ~]# pkg instal figlet Updating About repository catalogue... About repository is up-to-date. Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. The following 1 packages will be affected (of 0 checked): Installed packages to be REINSTALLED: figlet-2.2.5 [About] (options changed) The process will require 550 B more space. 115 KiB to be downloaded. Proceed with this action? [y/N]: y pkg: http://nyprdcpkgng1:8080/FreeBSD:9:amd64/quarterly/All/figlet-2.2.5.txz: Not Found so I tried to get the file manually from a browser and I checked the logs and noted this URL from the pkgng client XXX>XXX>XXX>XXX - - [18/Feb/2015:17:42:28 +0000] "GET /FreeBSD:9:amd64/quarterly/All/figlet_2.2.5.txz HT TP/1.1" 200 118512 "" "Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Firefox/31.0" URL from browsing to the package from / XXX>XXX>XXX>XXX - - [18/Feb/2015:17:42:58 +0000] "GET /FreeBSD:9:amd64/quarterly/All/figlet-2.2.5.txz HT TP/1.1" 404 0 "" "Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Firefox/31.0" The issue here is in the name of the package "figlet_2.2.5.txz vs figlet-2.2.5.txz" the char after the t is wrong but no idea why. Its like this all over the place. I am going to redownload the repo and see if I get the same odd - vs _ issue . Secondly does anyone have any comments on this ? Is there any major foot shooters I hit ? -- Mark saad | nonesuch@longcount.org From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 23:18:35 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56F7E68E; Wed, 18 Feb 2015 23:18:35 +0000 (UTC) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BC05EF0; Wed, 18 Feb 2015 23:18:34 +0000 (UTC) Received: by labhs14 with SMTP id hs14so4499289lab.1; Wed, 18 Feb 2015 15:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=hwKf5ZKJVXdMKmyQQIWMqdWXaobawcTPRlQYR5wOj9U=; b=iwcbiW25ei9chB95OnnYsAS0ykMgR2sZRr2HNUYt6XnuB6UpiDNZm2XY9MpS4TWmjs ePq6GB0INOQgw/SU4NClup0kBe2L+W/ZnWAnE75D65ngG05lOryyY4Ym48Um5ZlY0+6/ YW90vuiq23DqbEcnw5kksTmODoiY1pyUa0INP6Ri1k6iXL/d7OOJ/+tP1F621dHm/A2B D5ahWqkcZo16Iqm1ObZ/8YZvfIgXRoq6csh6D2O1xPTnxTAZZ1dO1uOUWyuCBIWgt3pO QqzwgmkNkgDlAi051C0mNWM5l2osRcVHWBxPUgIfRD3I069of0AVtMxYX/NrebwxIkCd wgyA== MIME-Version: 1.0 X-Received: by 10.112.126.98 with SMTP id mx2mr1608934lbb.52.1424301506806; Wed, 18 Feb 2015 15:18:26 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.25.217.8 with HTTP; Wed, 18 Feb 2015 15:18:26 -0800 (PST) Date: Wed, 18 Feb 2015 15:18:26 -0800 X-Google-Sender-Auth: Ii-0j9STFkfY-FNb-glptiC-Q4Q Message-ID: Subject: default pager (csh) From: Davide Italiano To: freebsd-current , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2015 23:18:35 -0000 Hi, one of the first things I do when I install FreeBSD is to switch the default PAGER from more(1) to less(1). This is particularly convenient, e.g. while using git diff, to show something more readable. Just out of curiosity, is there a reason why more(1) is still the default, and/or is this just historical? -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 23:22:06 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CD9D8A5 for ; Wed, 18 Feb 2015 23:22:06 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA442FB4 for ; Wed, 18 Feb 2015 23:22:05 +0000 (UTC) Received: by mail-ig0-f172.google.com with SMTP id l13so40288143iga.5 for ; Wed, 18 Feb 2015 15:22:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f0fmhqYPDfc8627hZ+Oh5EHEmpJXmO8J101SE7TOMw4=; b=W6zReQXmEiLFbTXXiiLyW37WsFVwj9KD442d9qGnmLrEv+pnc6sHfHh3pjaxLGxgPV XzgI0xOTBm6KX/T6Tb203uLJDWpZgjYzQGhBZE4+DjCfmEAbb0jeO1VW+BXPa+Bg+1aq /IxoGsLCVE76xIUDIxclw4imQquM9975oQ/xs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=f0fmhqYPDfc8627hZ+Oh5EHEmpJXmO8J101SE7TOMw4=; b=cEsEL39iXC2RA5ADT9Pw4WWJmVQq8J56y13A//y3WdYsW8CTUA3zGPBWl6U1UhB9W0 OboJmBUCh1UN3gB6zf8/ZUuYyDtEzecW8yXGl+blYKjH3k3A+/9Hk0jT7EDIeCsDoMpw JOcWkMvzvQtT3AMpGSCrcWUF7xFvynca7/b1L6GgvKaMRQL/MOOSsPFgaSCQc25nB85v 8EN2aWR4i5Uo6kbR9zLhaEq/TNUHrorUpGIrK4DGZlwamW9ygtoF0m8FxoVrUbpk85kX FXO9Fz8J+Dj2pRUheSicgTCrGVKwnANoZLa5axhiwZoND5W9HEisJvOhHNeLAwwNh1Fr Wnbg== X-Gm-Message-State: ALoCoQmtH2BEoeSyYImO0BT7eyJkNn5pZr87DTRCu5QdN5bk5NG9oMMFy0b+qdEDNRWkQf6nBvfK X-Received: by 10.50.164.227 with SMTP id yt3mr3575313igb.32.1424301725209; Wed, 18 Feb 2015 15:22:05 -0800 (PST) Received: from [10.31.32.254] (107-133-113-194.lightspeed.milwwi.sbcglobal.net. [107.133.113.194]) by mx.google.com with ESMTPSA id v39sm13967315iov.17.2015.02.18.15.22.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Feb 2015 15:22:04 -0800 (PST) Subject: Re: default pager (csh) Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: text/plain; charset="utf8"; X-Pgp-Agent: GPGMail 2.5b5 From: Jason Hellenthal In-Reply-To: Date: Wed, 18 Feb 2015 17:21:53 -0600 Content-Transfer-Encoding: 8bit Message-Id: <76BDBF06-D9C1-4737-ACBC-57BBFB0F910F@dataix.net> References: To: Davide Italiano X-Mailer: Apple Mail (2.2070.6) Cc: FreeBSD Hackers , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2015 23:22:06 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Great quote for the OP on the thread. I for one would be for switching it to ‘less -M’ then it would respect a users wish to use environment variables LESS and LESSPIPE but still carry the traditional behavior. On Feb 18, 2015, at 17:18, Davide Italiano wrote: Hi, one of the first things I do when I install FreeBSD is to switch the default PAGER from more(1) to less(1). This is particularly convenient, e.g. while using git diff, to show something more readable. Just out of curiosity, is there a reason why more(1) is still the default, and/or is this just historical? - -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" - -- Jason Hellenthal Mobile: +1 (616) 953-0176 jhellenthal@DataIX.net JJH48-ARIN -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJU5R6bAAoJEDLu+wRc4KcIB8YH+wdyVQNGRPqtzdiEKAR1dGJB jc4q+2+RMs1GpDNsFzjdFBgM30MiwinZ/USZJGzWLoA7lqIHZmpM1PzsvSdMQ0oR 5e9atR+tOVkDMp6P5xXyjj6HNEwRCUv+FmHAzajpJYHqEArpms3H+MUSz8ytgiu6 sJfxpGAY0woaK/sINDV01GfYYneoqqRZtvOioSNVp94+Wtd74o5+W367mGk9vpl6 XRCbj1c0agDhi9FWptH/BcnAFV0JMnhC0v8mtgnmgdD6AoO/lwsswjZysWOJ+ooZ vZmQqk1GzK486Mb2evjgcapZfgCZx6ObRhEXa6VYfjyOz3P19syqFrfMtL+x6hQ= =7Jy7 -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 18 23:42:28 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 433666B; Wed, 18 Feb 2015 23:42:28 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B22824A; Wed, 18 Feb 2015 23:42:28 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 6F8482434E; Wed, 18 Feb 2015 15:41:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1424302895; x=1424317295; bh=Owgsa/nmAAiO9IPbbN3GPh0NkZPTcq5ATPVSGBQmao4=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=d0ETx6rpD03ZcufrRKydOog/CHwg7YuhbL2L+hROeLwX0dqIR0Kdex0m7m8iUeZfm VSzXR3PBpQh92VpQLqPZ+mUi6+H+V7tvDHspIKbDfwK5CjQpgZfQkSGAPrrkWcfIq6 O6vSvxKC7l30wvxU9sR0U4QL5kkv0BT7vDbVLeSQ= Message-ID: <54E5232F.3060409@delphij.net> Date: Wed, 18 Feb 2015 15:41:35 -0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Davide Italiano , freebsd-current , FreeBSD Hackers Subject: Re: default pager (csh) References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2015 23:42:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 02/18/15 15:18, Davide Italiano wrote: > Hi, one of the first things I do when I install FreeBSD is to > switch the default PAGER from more(1) to less(1). This is > particularly convenient, e.g. while using git diff, to show > something more readable. Just out of curiosity, is there a reason > why more(1) is still the default, and/or is this just historical? The _only_ reason that I can think of is that more(1) does not clear screen for certain terminals (done with 'ti' and 'te' sequences), while less(1) when running as less does. The less(1) behavior can be annoying to some people (sometimes even myself when using less to show contents of a file and ^Z to paste them), and unfortunately quite a few of them also happen to be the more vocal ones when it comes to a change. Other behavioral difference are trivial (or people care less to speak up). I use less(1) instead of more(1) on all systems I have, so if some brave soul wants to make the change I'd say "just go for it!" but that's my $0.02 only. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.1 (FreeBSD) iQIcBAEBCgAGBQJU5SMrAAoJEJW2GBstM+nsd7AQAJNJnZtu3YabP0wzbwZuhQHu 7BvG/RLEqUe6ZmR10pcxe/vr6W+d7HpRuBcF09MSclpijTie+w/5AmaP7NNCCrHc +lAtUhGxGhloTmpkm3GhL94ai1AMoKSIwKgT2Onx76CWYXKfh2ycN4EDfAHUlenZ 4N+3NYua/20deTy0rji0HYMexN4/ZUApsiX9hLwj+mlVl/KVNLMh2OIoUpdbnfJi MU9h+/WPZGBJeU4VQU3YO77sPm23EIzirFajM4Fqk6AZJp8ueHp5U0Bz1l98fBFZ EUx2Bh4DLhn/+7AUlCiW3ByAwyaEzdjpeGwIT97hqHE+7r0Yuf69Sf1mdUcIbMNd TOMo3oKTsVWtYkzB8DZAvGw6y73sLxm6KRwGYWoU3SIhIacU7zer5FC755pPGw3V RqjBPu6nD8BCCXaBumiFtwrr88+vdDV6HfWRXfwSukT4sAYDAzjDEAhuY8kzDyWB vW9KG5IqPrTXPabdAKEj8qpfZBbspYUT0jOPrnto9/S5pnxkXmtmTn/gfVELjblj mLkJYPX9W25ziz3hI9t/wOp2Rl5GzBQdudIXpwD/06/L9h9X4CD38NdEQtJOOLyp M4twYFkiFJZp64XhuwMJ4BGIunj4OsbDfmvZEbJJfV8Z2mgA0QbRvfZG7UqVThd0 MTHLk0J7hIunFwIdICpI =whDB -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 00:06:58 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3D8674B; Thu, 19 Feb 2015 00:06:58 +0000 (UTC) Received: from host64.kissl.de (host64.kissl.de [213.239.241.64]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.shmhost.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E4926E1; Thu, 19 Feb 2015 00:06:58 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by host64.kissl.de (Postfix) with ESMTP id A4D1CB01EB1; Thu, 19 Feb 2015 01:00:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at host64.kissl.de Received: from host64.kissl.de ([127.0.0.1]) by localhost (host64.kissl.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06uVjkVkIfCt; Thu, 19 Feb 2015 01:00:50 +0100 (CET) Received: from [192.168.1.101] (unknown [95.90.210.138]) (Authenticated sender: web104p1) by host64.kissl.de (Postfix) with ESMTPSA id 7DF68B01E8F; Thu, 19 Feb 2015 01:00:48 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: default pager (csh) From: Franco Fichtner In-Reply-To: <54E5232F.3060409@delphij.net> Date: Thu, 19 Feb 2015 01:00:47 +0100 Content-Transfer-Encoding: 7bit Message-Id: <76429830-8715-4D11-A6B7-E7AE924DC110@lastsummer.de> References: <54E5232F.3060409@delphij.net> To: d@delphij.net X-Mailer: Apple Mail (2.2070.6) X-Mailman-Approved-At: Thu, 19 Feb 2015 00:33:06 +0000 Cc: Davide Italiano , FreeBSD Hackers , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 00:06:58 -0000 > On 19 Feb 2015, at 00:41, Xin Li wrote: > > Other behavioral difference are trivial (or people care less to speak up). more(1) with man(1) is suboptimal when skipping to the end it quits the pager and one can't scroll back. > I use less(1) instead of more(1) on all systems I have, so if some > brave soul wants to make the change I'd say "just go for it!" but > that's my $0.02 only. DragonFly made the pager change a while back last year. I do carry these modifications for OPNsense as well. Cheers, Franco From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 00:36:48 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D10EE3D3; Thu, 19 Feb 2015 00:36:48 +0000 (UTC) Received: from mail.westryn.net (mail.westryn.net [199.48.135.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B004BBAB; Thu, 19 Feb 2015 00:36:48 +0000 (UTC) Received: from ice.westryn.net (225x169.ouraynet.com [204.16.225.169]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.westryn.net (Postfix) with ESMTPSA id 0A92994320E; Wed, 18 Feb 2015 17:28:00 -0700 (MST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: default pager (csh) From: Kim Shrier In-Reply-To: <54E5232F.3060409@delphij.net> Date: Wed, 18 Feb 2015 17:27:59 -0700 Content-Transfer-Encoding: 7bit Message-Id: <021CBC62-4CC6-4137-897E-FE482139E09B@westryn.net> References: <54E5232F.3060409@delphij.net> To: FreeBSD Hackers X-Mailer: Apple Mail (2.2070.6) Cc: Davide Italiano , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 00:36:48 -0000 > On Feb 18, 2015, at 4:41 PM, Xin Li wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 02/18/15 15:18, Davide Italiano wrote: >> Hi, one of the first things I do when I install FreeBSD is to >> switch the default PAGER from more(1) to less(1). This is >> particularly convenient, e.g. while using git diff, to show >> something more readable. Just out of curiosity, is there a reason >> why more(1) is still the default, and/or is this just historical? > > The _only_ reason that I can think of is that more(1) does not clear > screen for certain terminals (done with 'ti' and 'te' sequences), > while less(1) when running as less does. > > The less(1) behavior can be annoying to some people (sometimes even > myself when using less to show contents of a file and ^Z to paste > them), and unfortunately quite a few of them also happen to be the > more vocal ones when it comes to a change. > Being one of those people who strongly prefer using more, I vote against this change. Also, it is easier to scroll back in a terminal window using more. Every system I use, if it defaults the PAGER to less, I change it to more. Kim From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 01:15:14 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9318DD3; Thu, 19 Feb 2015 01:15:14 +0000 (UTC) Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60F9FFFD; Thu, 19 Feb 2015 01:15:14 +0000 (UTC) Received: by mail-yk0-f173.google.com with SMTP id 19so2793054ykq.4; Wed, 18 Feb 2015 17:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=XF8xsZLaeAuzW4BbAMBMvFIfmLm83XYVxYdd5fFXmbI=; b=v59qIeL9q7H5zfEyMtYbhGecls7oOYOweiYCWEIu8KEBVT+dHk9lARxHiTNJmJM1vL 5QKsX2XThg9NLxb8M191uAVfbMNxyFnyRBV0cPefTSlmE0sRUzLBkNN+0RItxbTy7PCu U/eASKKDx5NFmg3tWJmjpf0/dCCzzx83xsI2SN12xldPvsg8Avo8MeNvpiPMnW1nd5TU J3nax/w5txZzDaC35EZWShDZgpxTfASKhcyLXHX4KaumfBO07iKkVVgD1srFfrggo0BT DAgfjYVLfa7Bkgx7n1HhTixBlqNg4tstosZqfBfJJSxnCfPNFxFGIm7xSyu/C3zazwiQ ciFg== X-Received: by 10.236.74.199 with SMTP id x47mr1293708yhd.153.1424308513329; Wed, 18 Feb 2015 17:15:13 -0800 (PST) Received: from k8-bsd.hsd1.ga.comcast.net ([2601:0:4600:611:2ed0:5aff:fe78:91ca]) by mx.google.com with ESMTPSA id c26sm17751113yhb.20.2015.02.18.17.15.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 17:15:12 -0800 (PST) Date: Wed, 18 Feb 2015 20:15:51 -0500 From: R0B_ROD To: Davide Italiano Subject: Re: default pager (csh) Message-ID: <20150219011551.GA6719@k8-bsd.hsd1.ga.comcast.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 01:15:14 -0000 On Wed, Feb 18, 2015 at 03:18:26PM -0800, Davide Italiano wrote: > Hi, > one of the first things I do when I install FreeBSD is to switch the > default PAGER from more(1) to less(1). This is particularly > convenient, e.g. while using git diff, to show something more > readable. > Just out of curiosity, is there a reason why more(1) is still the > default, and/or is this just historical? > > -- > Davide > > "There are no solved problems; there are only problems that are more > or less solved" -- Henri Poincare Hello, I see its job being done very well. Its modular and its source code is elegant. Less is simply too much more. Simple is elegant. -- Roberto Rodriguez Jr. Mach1ne Defense Foundati0n Systems Engineer 404.474.3997 "In bhakti there is no distinction between the lower or higher classes of people." -- Srila Prabhupada From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 01:18:41 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C849FD0; Thu, 19 Feb 2015 01:18:41 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 10317A8; Thu, 19 Feb 2015 01:18:40 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 509D124A82; Wed, 18 Feb 2015 17:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1424308720; x=1424323120; bh=q40MJ+DiU2fEdk36L/HgaWypZCaBkFU41bFeSKCAm5o=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=4mKMwLGmjLhlCUtkAVj2MJi9DYxwfYhtVRLSyMjBL5RAQ3O/ZJ+PGfmslscMg85YD j1UUQ1Uje7ysStfaUFS7SjLt4m/hzKjy6geMQbceIIg76amim3GP9Tk5ofmvLbYMsc IimjsMeTFTWJMCasBPN5QX3wzOVGYBPO2weXd1ek= Message-ID: <54E539EF.8030307@delphij.net> Date: Wed, 18 Feb 2015 17:18:39 -0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: R0B_ROD , Davide Italiano Subject: Re: default pager (csh) References: <20150219011551.GA6719@k8-bsd.hsd1.ga.comcast.net> In-Reply-To: <20150219011551.GA6719@k8-bsd.hsd1.ga.comcast.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 01:18:41 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 02/18/15 17:15, R0B_ROD wrote: > On Wed, Feb 18, 2015 at 03:18:26PM -0800, Davide Italiano wrote: >> Hi, one of the first things I do when I install FreeBSD is to >> switch the default PAGER from more(1) to less(1). This is >> particularly convenient, e.g. while using git diff, to show >> something more readable. Just out of curiosity, is there a reason >> why more(1) is still the default, and/or is this just >> historical? >> >> -- Davide >> >> "There are no solved problems; there are only problems that are >> more or less solved" -- Henri Poincare > > Hello, I see its job being done very well. Its modular and its > source code is elegant. Less is simply too much more. Simple is > elegant. Well, [delphij@saturn] ~> ls -li /usr/bin/{less,more} 42063 -r-xr-xr-x 2 root wheel 152224 Feb 17 10:57 /usr/bin/less 42063 -r-xr-xr-x 2 root wheel 152224 Feb 17 10:57 /usr/bin/more Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.1 (FreeBSD) iQIcBAEBCgAGBQJU5TnsAAoJEJW2GBstM+nswOoQAKxFzjk3YPQ91q+DKrLnZQfH WnGBkIBm3CTg1tOnUoFUPvbl+SOcDt2TDm/0KjbdbRiqNn/mUICGCiEVGP7UBoTu DutxewReqrbYwHRpJtjkSd2wBSK62qIWmJ0LyWL/2unO4xD5Rdy/nzKvhHlW6Tjt xR2F/5laOBZNzpOuYHBo0hzKJbtU2xcs9R+9xexgy8Ggy18IW28KXfiCUvMQfZoH GlGl6Si2BTGwt0Z2YJwKWM5cVNv36BzaJp8jO5t1h/g4fQMGNrO/THyD2Q6t6Lqm fI4f4A616WUm88cLxZyvt0TaF1lHHyWJKmL3G/qWRxF6i8HCLEdE4Vw3kNc6j5Td S09FTtpi3tgnHfk/1Dz8sEwHsXcZ9NFu/4hohba2g6amAZlykkOoy7Y1a8HEWFJ9 ayzJS3t9s1vpd9L8I5VsxNSwhf1XL1nwr4umcYsQ9cN7Fup3mPsm76WP8EW1R2mV iFuFsP6OiUP1CAvYtEHLEeckQSYoTmLJArBnVJ6225b9Qh+yWSfXUOiZbCnsfgEv hHUEbIz4WCkgjdBIkxafm02nOuE6N2ZGEUWUwMCC10MWWp0WynlZtWTa+Ib00hRx Yi77XYIAEYX+KFbM5tok25EIcjXmN8E9fdmCEJg7Wt3egmjtmpjg7qG/Fzl4Xkbb /49zBRp2CzErbTSmXISA =Px9T -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 01:26:35 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C33E6EE; Thu, 19 Feb 2015 01:26:35 +0000 (UTC) Received: from mail.egr.msu.edu (hill.egr.msu.edu [35.9.37.162]) by mx1.freebsd.org (Postfix) with ESMTP id E716B1A9; Thu, 19 Feb 2015 01:26:34 +0000 (UTC) Received: from hill (localhost [127.0.0.1]) by mail.egr.msu.edu (Postfix) with ESMTP id 31C702FA1A; Wed, 18 Feb 2015 20:18:44 -0500 (EST) X-Virus-Scanned: amavisd-new at egr.msu.edu Received: from mail.egr.msu.edu ([127.0.0.1]) by hill (hill.egr.msu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vp357KlsFSZr; Wed, 18 Feb 2015 20:18:44 -0500 (EST) Received: from EGR authenticated sender Message-ID: <54E539F3.2070506@egr.msu.edu> Date: Wed, 18 Feb 2015 20:18:43 -0500 From: Adam McDougall User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: FreeBSD Hackers Subject: Re: default pager (csh) References: <54E5232F.3060409@delphij.net> <021CBC62-4CC6-4137-897E-FE482139E09B@westryn.net> In-Reply-To: <021CBC62-4CC6-4137-897E-FE482139E09B@westryn.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 01:26:35 -0000 The PAGER was less for about half a year and reverted. Please see: https://svnweb.freebsd.org/base?view=revision&revision=242643 From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 01:27:54 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7274F8D6; Thu, 19 Feb 2015 01:27:54 +0000 (UTC) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFF3B1BE; Thu, 19 Feb 2015 01:27:53 +0000 (UTC) Received: by labge10 with SMTP id ge10so4842478lab.12; Wed, 18 Feb 2015 17:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=cknUMFFVsZ5Nm9BZjoR2H+2bu1dvRGBHttPPqBgAJMs=; b=TD7yKjsdCHUCH+orZcVGTJvapKW6hm5dmR6wIWNpR48OWivPFWJTGwJdj+6vXVNoUl 4VE34r7NIQO1+yb5cQphnkTAnyYMX44cvImQMO6ZfO01DSSQ0R4qiaxEMHpdYCwVJy6t qTBUOvZ9bXtdiBNUZMvgCIVM99B0yrW/m5GHKsvsTsXCLEmUs4VNqWnRVox+EHpT0/aw AzqypOUMXxeKxJhr4rvYBRmkQH3wiFsA3+mdtBX4fx5kyMwW44vzzLRhpEmtQdvSURWg CSnDU7TAwfGUM+bM98gnS2BLMDfrO2TSykgaLAA21okA6/qH7TibidP4qoGGJb088YlZ 6a7Q== MIME-Version: 1.0 X-Received: by 10.152.6.195 with SMTP id d3mr1931186laa.36.1424309266530; Wed, 18 Feb 2015 17:27:46 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.25.217.8 with HTTP; Wed, 18 Feb 2015 17:27:46 -0800 (PST) In-Reply-To: <54E539F3.2070506@egr.msu.edu> References: <54E5232F.3060409@delphij.net> <021CBC62-4CC6-4137-897E-FE482139E09B@westryn.net> <54E539F3.2070506@egr.msu.edu> Date: Wed, 18 Feb 2015 17:27:46 -0800 X-Google-Sender-Auth: H2_opNHXgdrXydU70_Bjv4tNy6o Message-ID: Subject: Re: default pager (csh) From: Davide Italiano To: Adam McDougall Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Hackers , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 01:27:54 -0000 On Wed, Feb 18, 2015 at 5:18 PM, Adam McDougall wrote: > The PAGER was less for about half a year and reverted. Please see: > > https://svnweb.freebsd.org/base?view=revision&revision=242643 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" OK, I think this ends the discussion =) Thanks! -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 01:29:03 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 063D4ABB for ; Thu, 19 Feb 2015 01:29:03 +0000 (UTC) Received: from mail-yh0-f52.google.com (mail-yh0-f52.google.com [209.85.213.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5BCD1D5 for ; Thu, 19 Feb 2015 01:29:02 +0000 (UTC) Received: by yhoa41 with SMTP id a41so3330021yho.4 for ; Wed, 18 Feb 2015 17:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=HFnQPRzDx2ehJn6pbTnb9IMCtQaoKGeVmesDxdbfIAE=; b=dTLe//mvbF7aCWX03EXJ6MmCXYST4UIhsVfSor9b8Ze2MlwsqD1ZHtX2j9CKh/NBpX 3Os7+KEHCFTX3ptA+Anre+JGp90CFj8IC19LM9X36oakS/0IR1yYdDIPpcznEu8ASY5K /pWsU0zPzFEoRX02dJ8ZuV9DG9h7pn54I/m/BkedhoWEExfjgnvmbvZSUfCR1z9QduCZ /o8Q2f72lxq4O0yiFliy/CE3Ctm5ypriKbzBZHSwfI0iRJSHP7o+7K+wrGjuVRPcH7Yg mgJ+/KUVP3i408Bjl7NgIYr7JEF5HuWm6cOSbKGm1q3c4MWX6fp/jWifGwmP356L2V2q 59oQ== X-Received: by 10.236.10.5 with SMTP id 5mr1508918yhu.148.1424309341420; Wed, 18 Feb 2015 17:29:01 -0800 (PST) Received: from k8-bsd.hsd1.ga.comcast.net ([2601:0:4600:611:2ed0:5aff:fe78:91ca]) by mx.google.com with ESMTPSA id p29sm17778940yhp.36.2015.02.18.17.29.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 17:29:01 -0800 (PST) Date: Wed, 18 Feb 2015 20:29:41 -0500 From: R0B_ROD To: Xin Li Subject: Re: default pager (csh) Message-ID: <20150219012940.GA10741@k8-bsd.hsd1.ga.comcast.net> References: <20150219011551.GA6719@k8-bsd.hsd1.ga.comcast.net> <54E539EF.8030307@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54E539EF.8030307@delphij.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 01:29:03 -0000 On Wed, Feb 18, 2015 at 05:18:39PM -0800, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > Well, > > [delphij@saturn] ~> ls -li /usr/bin/{less,more} > 42063 -r-xr-xr-x 2 root wheel 152224 Feb 17 10:57 /usr/bin/less > 42063 -r-xr-xr-x 2 root wheel 152224 Feb 17 10:57 /usr/bin/more > > Cheers, > - -- > Xin LI https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die Very cool! From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 01:17:07 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 354B6EC4; Thu, 19 Feb 2015 01:17:07 +0000 (UTC) Received: from mail.karels.net (mail.karels.net [63.231.190.5]) by mx1.freebsd.org (Postfix) with ESMTP id C37F098; Thu, 19 Feb 2015 01:17:06 +0000 (UTC) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.14.7/8.14.7) with ESMTP id t1J1GxAw028289; Wed, 18 Feb 2015 19:16:59 -0600 (CST) (envelope-from mike@karels.net) Message-Id: <201502190116.t1J1GxAw028289@mail.karels.net> To: Kim Shrier From: Mike Karels Reply-to: mike@karels.net Subject: Re: default pager (csh) In-reply-to: Your message of Wed, 18 Feb 2015 17:27:59 -0700. <021CBC62-4CC6-4137-897E-FE482139E09B@westryn.net> Date: Wed, 18 Feb 2015 19:16:59 -0600 X-Mailman-Approved-At: Thu, 19 Feb 2015 04:16:44 +0000 Cc: Davide Italiano , FreeBSD Hackers , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 01:17:07 -0000 Kim Shrier wrote: > > On Feb 18, 2015, at 4:41 PM, Xin Li wrote: > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA512 > > > > On 02/18/15 15:18, Davide Italiano wrote: > >> Hi, one of the first things I do when I install FreeBSD is to > >> switch the default PAGER from more(1) to less(1). This is > >> particularly convenient, e.g. while using git diff, to show > >> something more readable. Just out of curiosity, is there a reason > >> why more(1) is still the default, and/or is this just historical? > > > > The _only_ reason that I can think of is that more(1) does not clear > > screen for certain terminals (done with 'ti' and 'te' sequences), > > while less(1) when running as less does. > > > > The less(1) behavior can be annoying to some people (sometimes even > > myself when using less to show contents of a file and ^Z to paste > > them), and unfortunately quite a few of them also happen to be the > > more vocal ones when it comes to a change. > > > Being one of those people who strongly prefer using more, I vote > against this change. Also, it is easier to scroll back in a terminal > window using more. Every system I use, if it defaults the PAGER > to less, I change it to more. I think the defaults of both programs on FreeBSD are suboptimal. I prefer more with MORE=-eF, which fixes the man page issue mentioned earlier. This is clearly a personal preference item; we won't get it "right" for everyone. However, anyone who can use git can definitely switch pagers. Trivia: the version of more on BSD systems actually is derived from less, not the original version of more. Mike From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 08:17:11 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70DC144F; Thu, 19 Feb 2015 08:17:11 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 41C19ED7; Thu, 19 Feb 2015 08:17:11 +0000 (UTC) Received: from Julian-MBP3.local (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t1J8H0nl013954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 19 Feb 2015 00:17:01 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <54E59BF7.40207@freebsd.org> Date: Thu, 19 Feb 2015 00:16:55 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: d@delphij.net, Davide Italiano , freebsd-current , FreeBSD Hackers Subject: Re: default pager (csh) References: <54E5232F.3060409@delphij.net> In-Reply-To: <54E5232F.3060409@delphij.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 08:17:11 -0000 On 2/18/15 3:41 PM, Xin Li wrote: > > The _only_ reason that I can think of is that more(1) does not clear > screen for certain terminals (done with 'ti' and 'te' sequences), > while less(1) when running as less does. > > The less(1) behavior can be annoying to some people (sometimes even > myself when using less to show contents of a file and ^Z to paste > them), and unfortunately quite a few of them also happen to be the > more vocal ones when it comes to a change. I find that behaviour infuriating I page down to a place to get some text on the screen to use as a reference, then exit to run a command with that information, and *bam* the info I wanted to use has gone away. From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 09:20:12 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B6714A9 for ; Thu, 19 Feb 2015 09:20:12 +0000 (UTC) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "ca.infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E0786785 for ; Thu, 19 Feb 2015 09:20:11 +0000 (UTC) Received: from ox-dell39.ox.adestra.com (no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged)) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.15.1/8.15.1) with ESMTPSA id t1J9JgsA043541 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 19 Feb 2015 09:20:03 GMT (envelope-from m.seaman@infracaninophile.co.uk) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=infracaninophile.co.uk DKIM-Filter: OpenDKIM Filter v2.9.2 smtp.infracaninophile.co.uk t1J9JgsA043541 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1424337604; bh=T6348sitOdDRDIHcYkERk0vy/+k9fZP+rRHIxIQD1jc=; h=Date:From:To:Subject:References:In-Reply-To; z=Date:=20Thu,=2019=20Feb=202015=2009:19:41=20+0000|From:=20Matthew =20Seaman=20|To:=20freebsd-hacker s@freebsd.org|Subject:=20Re:=20default=20pager=20(csh)|References: =20=20<54E5232F.3060409@delphij.net>=20<54E59BF7.40207@freeb sd.org>|In-Reply-To:=20<54E59BF7.40207@freebsd.org>; b=rTLXOxpJIZKQfmftATb2gs4yMCbhhylOcuTsu1LZ/6yi20m2jL/G39Sd7XcSEt7nm srZlUTffN35+U3hHzH/JRXOaSU0E456y+9egsLkn481SvY5Qj2cKVrzih3digxGrXS 7HkUx+6pTo229Y4Ai7iTUI6ditEYqpF4hkCmDbug= X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged) claimed to be ox-dell39.ox.adestra.com Message-ID: <54E5AAAD.7080002@infracaninophile.co.uk> Date: Thu, 19 Feb 2015 09:19:41 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: default pager (csh) References: <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org> In-Reply-To: <54E59BF7.40207@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MSqKeAM9o1Fn3aV2kicNqeS6Ej77iEoeo" X-Virus-Scanned: clamav-milter 0.98.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 09:20:12 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MSqKeAM9o1Fn3aV2kicNqeS6Ej77iEoeo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/19/15 08:16, Julian Elischer wrote: > On 2/18/15 3:41 PM, Xin Li wrote: >> >> The _only_ reason that I can think of is that more(1) does not clear >> screen for certain terminals (done with 'ti' and 'te' sequences), >> while less(1) when running as less does. >> >> The less(1) behavior can be annoying to some people (sometimes even >> myself when using less to show contents of a file and ^Z to paste >> them), and unfortunately quite a few of them also happen to be the >> more vocal ones when it comes to a change. >=20 > I find that behaviour infuriating >=20 > I page down to a place to get some text on the screen to use as a > reference, then exit to run a command with that information, and *bam* > the info I wanted to use has gone away. Absolutely. Especially as the behaviour under tmux is to clear screen unlike when just logged into a regular session. setenv LESS -X fixes that... Matthew --MSqKeAM9o1Fn3aV2kicNqeS6Ej77iEoeo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJU5aquXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnOhkP/Aonj/fqRbV/ne+IOibT+zTW jrmPoaDDiCdiTjFoCLT8xTc65ikcHc54yLOosvIxjUfsxdkSgLcRlyA0BW/HTLN3 +EK2XF0Ql88PUC1bn2vFeO2RH/5yWz1YV/lJCJsVbShI8nsuJw2pfVGme7T07bba 3gpPRdQ7rLsstsldCrwi3nPl6iFgP2m7tGYKUdJnSDXdbeugKvRkHEaefjvFB75B vTdSMGbQDzdkHxWK8SVgobwK9WPdkyo9cwn/4gQK8UZFdqF999OBK+pxDxSO/VL+ UWNpH1ykSYT/d/YN2+9QhJnBFJ7yRIXDLzBjc5RoFQ0+9B0esAGQhGmXIpL61Rnp dKVBZPLv1COQhCi5vFiFsLjQGydAg/+QjeLmdisYzmWXNoy9YlvM2bLVdBlMtGOb Ss9LUsRJEWYtQIhBR5095f02dZeEMKcWMCE0VoGhedDYsxuXP2kHpnOWS2t7pUjW 5/NkiNgldxJObcNab0i09qkKGkfKtx21RvuVSpeQivjyGN+uUEgKCeRKxvZ9i2jS JUnCbQYfZg1Vqqvf3k/gJePJaGbitIL+dG+UNDiuy2WV9JVlQpTVagSXzRAy4muU A4lNn+Ne84NS6SzMFmXrvNobVOt2GtBgOsrz5NCKQjomxGNznorooWELzqXtcRTB sx0YEor/VkxF2OFKmYcz =hhOf -----END PGP SIGNATURE----- --MSqKeAM9o1Fn3aV2kicNqeS6Ej77iEoeo-- From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 09:27:40 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27349911 for ; Thu, 19 Feb 2015 09:27:40 +0000 (UTC) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 67E9E8A1 for ; Thu, 19 Feb 2015 09:27:38 +0000 (UTC) Received: (qmail 15477 invoked by uid 89); 19 Feb 2015 09:20:57 -0000 Received: from unknown (HELO ?192.168.250.192?) (mg@grem.de@88.217.180.225) by mail.grem.de with ESMTPA; 19 Feb 2015 09:20:57 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: default pager (csh) From: Michael Gmelin X-Mailer: iPhone Mail (12B466) In-Reply-To: <54E59BF7.40207@freebsd.org> Date: Thu, 19 Feb 2015 10:20:57 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <04CE7196-9CD7-4437-BDA1-CA842F4A2A6E@freebsd.org> References: <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org> To: Julian Elischer Cc: Davide Italiano , FreeBSD Hackers , freebsd-current , "d@delphij.net" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 09:27:40 -0000 > On 19 Feb 2015, at 09:16, Julian Elischer wrote: >=20 >> On 2/18/15 3:41 PM, Xin Li wrote: >>=20 >> The _only_ reason that I can think of is that more(1) does not clear >> screen for certain terminals (done with 'ti' and 'te' sequences), >> while less(1) when running as less does. >>=20 >> The less(1) behavior can be annoying to some people (sometimes even >> myself when using less to show contents of a file and ^Z to paste >> them), and unfortunately quite a few of them also happen to be the >> more vocal ones when it comes to a change. >=20 > I find that behaviour infuriating >=20 > I page down to a place to get some text on the screen to use as a referen= ce, then exit to run a command with that information, and *bam* the info I w= anted to use has gone away. Yeah, that drives me nuts too, Debian had (has?) this and it's a no-go for m= e. Changing options for man would be nice though, so finding something near t= he end of the page won't exit the pager. From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 06:47:04 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86F5118C; Thu, 19 Feb 2015 06:47:04 +0000 (UTC) Received: from host64.kissl.de (host64.kissl.de [213.239.241.64]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.shmhost.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9B4650; Thu, 19 Feb 2015 06:47:03 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by host64.kissl.de (Postfix) with ESMTP id 60726B00B74; Thu, 19 Feb 2015 07:46:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at host64.kissl.de Received: from host64.kissl.de ([127.0.0.1]) by localhost (host64.kissl.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KpLg4juKGM8v; Thu, 19 Feb 2015 07:46:51 +0100 (CET) Received: from [192.168.1.101] (unknown [95.90.210.138]) (Authenticated sender: web104p1) by host64.kissl.de (Postfix) with ESMTPSA id 33D43B00B73; Thu, 19 Feb 2015 07:46:51 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: default pager (csh) From: Franco Fichtner In-Reply-To: Date: Thu, 19 Feb 2015 07:46:50 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <4F3A7029-EF19-40E0-B859-E169684A3B36@lastsummer.de> References: <54E5232F.3060409@delphij.net> <021CBC62-4CC6-4137-897E-FE482139E09B@westryn.net> <54E539F3.2070506@egr.msu.edu> To: Davide Italiano X-Mailer: Apple Mail (2.2070.6) X-Mailman-Approved-At: Thu, 19 Feb 2015 12:16:36 +0000 Cc: FreeBSD Hackers , Adam McDougall , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 06:47:04 -0000 > On 19 Feb 2015, at 02:27, Davide Italiano wrote: >=20 > On Wed, Feb 18, 2015 at 5:18 PM, Adam McDougall = wrote: >> The PAGER was less for about half a year and reverted. Please see: >>=20 >> https://svnweb.freebsd.org/base?view=3Drevision&revision=3D242643 >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" >=20 > OK, I think this ends the discussion =3D) Nope, not good enough. The way I see it we achieved nothing despite the fact that several bugs are on the table. Now that we all agree more(1) is the way to go, can we please fix colouring and the pager quit issue for man pages using sensible options in more(1)? Other's should speak up for their woes with the FreeBSD defaults too. The defaults are supposed to be the best we can do. Right now, we can actually do better. :) Cheers, Franco= From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 07:45:35 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20472C7A; Thu, 19 Feb 2015 07:45:35 +0000 (UTC) Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA0C9BF2; Thu, 19 Feb 2015 07:45:34 +0000 (UTC) Received: by wesw62 with SMTP id w62so5567868wes.9; Wed, 18 Feb 2015 23:45:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=DZI6jz1kgTjjd2MyHc7aMzNWdawe5298evsSLasAOAk=; b=VkBknqFvPoOtNkxF6+UYv3JprzOq8utceOaRpG5ALT3cd93IGtrm59B/RXh8KTJDca SqJB7MTqJubuV/o8CbaSRLDC7ABKiNfZuZ3yrX+yao4E3KvQFEQEq9UtBVOJJYaDIAkB klN5h6I0KLpLnNd6Yvvsv8L9l1f+tuapcK8TbBeYOICxAWL8BpcBKzs+gXYoVwkKokQj sD2rLIrMlBAQEHRLrcnYhQFeODQcSnSssYAivMfaJ4G7j9BjXHRrJKeZcvf7Bl5fbeLa nm9chYhC/ltDyebpVDxtR+0I8+Ddmpxy0fpP9ZN9XlLY5N5mWVqDYpBKHIS/lkBKmLuf QIbw== MIME-Version: 1.0 X-Received: by 10.180.85.70 with SMTP id f6mr7705386wiz.22.1424331927113; Wed, 18 Feb 2015 23:45:27 -0800 (PST) Sender: kob6558@gmail.com Received: by 10.27.19.3 with HTTP; Wed, 18 Feb 2015 23:45:27 -0800 (PST) In-Reply-To: <4F3A7029-EF19-40E0-B859-E169684A3B36@lastsummer.de> References: <54E5232F.3060409@delphij.net> <021CBC62-4CC6-4137-897E-FE482139E09B@westryn.net> <54E539F3.2070506@egr.msu.edu> <4F3A7029-EF19-40E0-B859-E169684A3B36@lastsummer.de> Date: Wed, 18 Feb 2015 23:45:27 -0800 X-Google-Sender-Auth: H5eMjJlEg_rELA5EKBE6HGlrPvM Message-ID: Subject: Re: default pager (csh) From: Kevin Oberman To: Franco Fichtner X-Mailman-Approved-At: Thu, 19 Feb 2015 12:16:53 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Davide Italiano , FreeBSD Hackers , Adam McDougall , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 07:45:35 -0000 On Wed, Feb 18, 2015 at 10:46 PM, Franco Fichtner wrote: > > > On 19 Feb 2015, at 02:27, Davide Italiano wrote: > > > > On Wed, Feb 18, 2015 at 5:18 PM, Adam McDougall > wrote: > >> The PAGER was less for about half a year and reverted. Please see: > >> > >> https://svnweb.freebsd.org/base?view=revision&revision=242643 > >> _______________________________________________ > >> freebsd-current@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >> To unsubscribe, send any mail to " > freebsd-current-unsubscribe@freebsd.org" > > > > OK, I think this ends the discussion =) > > Nope, not good enough. The way I see it we achieved nothing > despite the fact that several bugs are on the table. > > Now that we all agree more(1) is the way to go, can we please fix > colouring and the pager quit issue for man pages using sensible > options in more(1)? > > Other's should speak up for their woes with the FreeBSD defaults > too. The defaults are supposed to be the best we can do. Right > now, we can actually do better. :) > > > Cheers, > Franco > I want my bikeshed to be purple with yellow stars. I want my PAGER to be Jim Davis's most(1). Does a LOT more than more or less. (Does have the annoying te/ti thing, though.) Displays binary. Auto-decompresses compressed files. Allows moving my line or percentage. Whole raft of neat stuff. Usually the second port (after portmaster) I install on a system since my finger type "most" even when I want them to type "more" because the system does not have most installed. I don't expect anyone else to agree and don't expect it to ever be in the base, let alone the default. Still, it's a much better pager then less, whether it's called more or not. Started using it at least 25 years ago on VMS. -- Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 13:53:10 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E86BD9C for ; Thu, 19 Feb 2015 13:53:10 +0000 (UTC) Received: from mail-yh0-x234.google.com (mail-yh0-x234.google.com [IPv6:2607:f8b0:4002:c01::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49541912 for ; Thu, 19 Feb 2015 13:53:10 +0000 (UTC) Received: by yhzz6 with SMTP id z6so81185yhz.13 for ; Thu, 19 Feb 2015 05:53:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=HC3Efeml6ckNrylLONese5AcxVrnN2M/Wjfaf2e91po=; b=m6klXAwF1dyjLT14ZviKT6wjzLp9qgSceS2pKCmNdKHOD5iY5hd7TDClVFBBoOs3ZW PHdgBARlwkgqfEnolBpuJ6RySTDEjAC44nf5n5Fx9UL+tnPUJAqti4W5JIh3Ohei4hys /2bXx+kVGPqtHDjvcq24p7gx+JBOdUIyNdaMrKFvQkIh9gsMZqq+8nv9vWifhmp497Hy QnCMlgPB7+xuLR74BYw6ihhhDYP8VImSCvoSTKI95i4hWoc1XMQXnxRh1pFuHd2H/rQk m6V5Gf6Z28hMnvJFhhuDhMEY7blHbsEYY4ilcjIOjnr8sJduL5CIOza/WboFVKsdfWZY W3PQ== X-Received: by 10.170.53.19 with SMTP id 19mr3373979ykv.68.1424353989352; Thu, 19 Feb 2015 05:53:09 -0800 (PST) Received: from k8-bsd.hsd1.ga.comcast.net ([2601:0:4600:611:2ed0:5aff:fe78:91ca]) by mx.google.com with ESMTPSA id f96sm13813403yhq.39.2015.02.19.05.53.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Feb 2015 05:53:08 -0800 (PST) Date: Thu, 19 Feb 2015 08:53:50 -0500 From: R0B_ROD To: freebsd-hackers@freebsd.org Subject: Most Pager Message-ID: <20150219135350.GA6739@k8-bsd.hsd1.ga.comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 13:53:10 -0000 To the gentleman who shared about most, I request you share how you have it configured so I can test it out. I am new to CLI-fu. Just curious about an example. I want to learn more or less the most I can. ;) -- Roberto Rodriguez Jr. Mach1ne Defense Foundati0n Founder 404.474.3997 From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 15:05:13 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B368E784; Thu, 19 Feb 2015 15:05:13 +0000 (UTC) Received: from pmta2.delivery1.ore.mailhop.org (pmta2.delivery1.ore.mailhop.org [54.149.155.156]) by mx1.freebsd.org (Postfix) with ESMTP id 8C17D103; Thu, 19 Feb 2015 15:05:13 +0000 (UTC) Received: from smtp2.ore.mailhop.org (172.31.36.112) by pmta2.delivery1.ore.mailhop.org id hsntro20u50t; Thu, 19 Feb 2015 14:55:19 +0000 (envelope-from ) Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YOSVG-0001Zo-52; Thu, 19 Feb 2015 14:54:58 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1JEsq5o053248; Thu, 19 Feb 2015 07:54:52 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX18nka7vR6dXtQXwG9GKE3yX Message-ID: <1424357692.1108.18.camel@freebsd.org> Subject: Re: default pager (csh) From: Ian Lepore To: Franco Fichtner Date: Thu, 19 Feb 2015 07:54:52 -0700 In-Reply-To: <4F3A7029-EF19-40E0-B859-E169684A3B36@lastsummer.de> References: <54E5232F.3060409@delphij.net> <021CBC62-4CC6-4137-897E-FE482139E09B@westryn.net> <54E539F3.2070506@egr.msu.edu> <4F3A7029-EF19-40E0-B859-E169684A3B36@lastsummer.de> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Davide Italiano , FreeBSD Hackers , Adam McDougall , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 15:05:13 -0000 On Thu, 2015-02-19 at 07:46 +0100, Franco Fichtner wrote: > > On 19 Feb 2015, at 02:27, Davide Italiano wrote: > > > > On Wed, Feb 18, 2015 at 5:18 PM, Adam McDougall wrote: > >> The PAGER was less for about half a year and reverted. Please see: > >> > >> https://svnweb.freebsd.org/base?view=revision&revision=242643 > >> _______________________________________________ > >> freebsd-current@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > > > OK, I think this ends the discussion =) > > Nope, not good enough. The way I see it we achieved nothing > despite the fact that several bugs are on the table. > > Now that we all agree more(1) is the way to go, can we please fix > colouring and the pager quit issue for man pages using sensible > options in more(1)? > > Other's should speak up for their woes with the FreeBSD defaults > too. The defaults are supposed to be the best we can do. Right > now, we can actually do better. :) I sure hope "fix coloring" is shorthand for "don't you dare turn on any of that color crap without the user's permission." -- Ian From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 17:04:45 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6527EDE; Thu, 19 Feb 2015 17:04:45 +0000 (UTC) Received: from udns.ultimatedns.net (unknown [IPv6:2602:d1:b4d6:e600:4261:86ff:fef6:aa2a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97D05DA; Thu, 19 Feb 2015 17:04:45 +0000 (UTC) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id t1JH4tMQ054063; Thu, 19 Feb 2015 09:04:55 -0800 (PST) (envelope-from bsd-lists@bsdforge.com) To: d@delphij.net, Davide Italiano , freebsd-current , FreeBSD Hackers , Julian Elischer In-Reply-To: <54E59BF7.40207@freebsd.org> References: <54E5232F.3060409@delphij.net>, <54E59BF7.40207@freebsd.org> From: "Chris H" Subject: Re: default pager (csh) Date: Thu, 19 Feb 2015 09:04:55 -0800 Content-Type: text/plain; charset=UTF-8; format=fixed MIME-Version: 1.0 Message-id: Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 17:04:45 -0000 On Thu, 19 Feb 2015 00:16:55 -0800 Julian Elischer wrote > On 2/18/15 3:41 PM, Xin Li wrote: > > > > The _only_ reason that I can think of is that more(1) does not clear > > screen for certain terminals (done with 'ti' and 'te' sequences), > > while less(1) when running as less does. > > > > The less(1) behavior can be annoying to some people (sometimes even > > myself when using less to show contents of a file and ^Z to paste > > them), and unfortunately quite a few of them also happen to be the > > more vocal ones when it comes to a change. > > I find that behaviour infuriating > > I page down to a place to get some text on the screen to use as a > reference, then exit to run a command with that information, and *bam* > the info I wanted to use has gone away. Indeed. Quite annoying. I just had an interesting thought after reading most of this thread/bikeshed; Theoretical, mind you. But would it be remotely possible to [in (t)csh(1)] choose a pager on-the-fly (dynamically)? In other words; bind keys to a chosen pager; ^M switches to more(1) ^L switched to less(1) I've done no *actual* research [yet] but just thought I'd bring it up. As it seemed worth a shot, as it would satisfy *anyone's* need. :) --Chris > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 19 23:05:58 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C0145F3; Thu, 19 Feb 2015 23:05:58 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id 04E471A8; Thu, 19 Feb 2015 23:05:58 +0000 (UTC) Received: from u10-2-32-011.office.norse-data.com (unknown [50.204.88.51]) by elvis.mu.org (Postfix) with ESMTPSA id 9C881341F8AC; Thu, 19 Feb 2015 15:05:57 -0800 (PST) Message-ID: <54E66C90.10902@mu.org> Date: Thu, 19 Feb 2015 15:06:56 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Chris H , d@delphij.net, Davide Italiano , freebsd-current , FreeBSD Hackers , Julian Elischer Subject: Re: default pager (csh) References: <54E5232F.3060409@delphij.net>, <54E59BF7.40207@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2015 23:05:58 -0000 On 2/19/15 9:04 AM, Chris H wrote: > On Thu, 19 Feb 2015 00:16:55 -0800 Julian Elischer wrote > >> On 2/18/15 3:41 PM, Xin Li wrote: >>> The _only_ reason that I can think of is that more(1) does not clear >>> screen for certain terminals (done with 'ti' and 'te' sequences), >>> while less(1) when running as less does. >>> >>> The less(1) behavior can be annoying to some people (sometimes even >>> myself when using less to show contents of a file and ^Z to paste >>> them), and unfortunately quite a few of them also happen to be the >>> more vocal ones when it comes to a change. >> I find that behaviour infuriating >> >> I page down to a place to get some text on the screen to use as a >> reference, then exit to run a command with that information, and *bam* >> the info I wanted to use has gone away. > Indeed. Quite annoying. > I just had an interesting thought after reading most of this > thread/bikeshed; > Theoretical, mind you. But would it be remotely possible to > [in (t)csh(1)] choose a pager on-the-fly (dynamically)? > In other words; bind keys to a chosen pager; > > ^M switches to more(1) > ^L switched to less(1) > > I've done no *actual* research [yet] but just thought > I'd bring it up. As it seemed worth a shot, as it would > satisfy *anyone's* need. :) > Not as annoying as people who don't search the web for an answer for things. ~ % export PAGER="less -X" everyone please stop crying over small changes, it really sucks. -Alfred From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 20 01:10:45 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 045DADB2; Fri, 20 Feb 2015 01:10:45 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A1328187; Fri, 20 Feb 2015 01:10:44 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t1K1AaWi044120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 19 Feb 2015 18:10:36 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t1K1AaFa044117; Thu, 19 Feb 2015 18:10:36 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Thu, 19 Feb 2015 18:10:36 -0700 (MST) From: Warren Block To: Julian Elischer Subject: Re: default pager (csh) In-Reply-To: <54E59BF7.40207@freebsd.org> Message-ID: References: <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Thu, 19 Feb 2015 18:10:36 -0700 (MST) Cc: Davide Italiano , FreeBSD Hackers , freebsd-current , d@delphij.net X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 01:10:45 -0000 On Thu, 19 Feb 2015, Julian Elischer wrote: > On 2/18/15 3:41 PM, Xin Li wrote: >> >> The _only_ reason that I can think of is that more(1) does not clear >> screen for certain terminals (done with 'ti' and 'te' sequences), >> while less(1) when running as less does. >> >> The less(1) behavior can be annoying to some people (sometimes even >> myself when using less to show contents of a file and ^Z to paste >> them), and unfortunately quite a few of them also happen to be the >> more vocal ones when it comes to a change. > > I find that behaviour infuriating > > I page down to a place to get some text on the screen to use as a reference, > then exit to run a command with that information, and *bam* the info I wanted > to use has gone away. It doesn't do that on csh. Or maybe I figured out how to prevent it long ago and forgot, but all I use is this: setenv PAGER "less -RS" From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 20 03:45:49 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33A10E46; Fri, 20 Feb 2015 03:45:49 +0000 (UTC) Received: from mail-pd0-x230.google.com (mail-pd0-x230.google.com [IPv6:2607:f8b0:400e:c02::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F14E2766; Fri, 20 Feb 2015 03:45:48 +0000 (UTC) Received: by pdjy10 with SMTP id y10so4632353pdj.6; Thu, 19 Feb 2015 19:45:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=LVly2RZEde6lZPfTpSLuv9Q43sN1pjk3RBrUMQecGoo=; b=Jo8Q9LeLilHZ30593ytYkUKsFXDVjDPK+ruauPAiXwstZc4ThRM9uFV9iEP3GB7u6Q j8xG6RnM9krhuqAJAk35UndNwfXuc5AmOfj004tcQ0hXgPiNm81D0B97jdgYFAsDXqAA JXgXyITevDNdFEaZISbl/ofEUPZB/a5dwL7DGzWUvxI+IK9RR9j16HWmTNf4tEiht9RP JYODyBbBiPYsV7H2jydjWHttXjfYWQO5WrRsKUsq6/ci547jBvBBhxbkXFykQCalCkAN YCVDubA3TNhspqqn0JY/dk9NTezzqZFKf19IrYQllvkPHxZwGDM01+TxCLt3GUwi1nDS CFFQ== MIME-Version: 1.0 X-Received: by 10.66.118.168 with SMTP id kn8mr12756257pab.45.1424403948566; Thu, 19 Feb 2015 19:45:48 -0800 (PST) Sender: kob6558@gmail.com Received: by 10.67.30.198 with HTTP; Thu, 19 Feb 2015 19:45:48 -0800 (PST) In-Reply-To: References: <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org> Date: Thu, 19 Feb 2015 19:45:48 -0800 X-Google-Sender-Auth: m6H4sY6Q97SCvsYefjTACvFnmKQ Message-ID: Subject: Re: default pager (csh) From: Kevin Oberman To: Warren Block X-Mailman-Approved-At: Fri, 20 Feb 2015 03:53:03 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Davide Italiano , FreeBSD Hackers , freebsd-current , Xin LI X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 03:45:49 -0000 On Thu, Feb 19, 2015 at 5:10 PM, Warren Block wrote: > On Thu, 19 Feb 2015, Julian Elischer wrote: > > On 2/18/15 3:41 PM, Xin Li wrote: >> >>> >>> The _only_ reason that I can think of is that more(1) does not clear >>> screen for certain terminals (done with 'ti' and 'te' sequences), >>> while less(1) when running as less does. >>> >>> The less(1) behavior can be annoying to some people (sometimes even >>> myself when using less to show contents of a file and ^Z to paste >>> them), and unfortunately quite a few of them also happen to be the >>> more vocal ones when it comes to a change. >>> >> >> I find that behaviour infuriating >> >> I page down to a place to get some text on the screen to use as a >> reference, then exit to run a command with that information, and *bam* the >> info I wanted to use has gone away. >> > > It doesn't do that on csh. Or maybe I figured out how to prevent it long > ago and forgot, but all I use is this: > > setenv PAGER "less -RS" > You probably did what I used to do. Modify the termcaps/terminfo to eliminate this behavior. See Exorcising the Evil Alternate Screen . In the past, FreeBSD disabled this by default. It was changed several years ago, but you can change it back as per the aboved referenced article. -- Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 20 06:37:50 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0B00C57; Fri, 20 Feb 2015 06:37:50 +0000 (UTC) Received: from udns.ultimatedns.net (unknown [IPv6:2602:d1:b4d6:e600:4261:86ff:fef6:aa2a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2BE997A; Fri, 20 Feb 2015 06:37:50 +0000 (UTC) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id t1K6c4AQ073465; Thu, 19 Feb 2015 22:38:05 -0800 (PST) (envelope-from bsd-lists@bsdforge.com) To: Warren Block In-Reply-To: References: <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org>, From: "Chris H" Subject: Re: default pager (csh) Date: Thu, 19 Feb 2015 22:38:05 -0800 Content-Type: text/plain; charset=UTF-8; format=fixed MIME-Version: 1.0 Message-id: Content-Transfer-Encoding: 8bit Cc: FreeBSD Hackers , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 06:37:50 -0000 On Thu, 19 Feb 2015 18:10:36 -0700 (MST) Warren Block wrote > On Thu, 19 Feb 2015, Julian Elischer wrote: > > > On 2/18/15 3:41 PM, Xin Li wrote: > >> > >> The _only_ reason that I can think of is that more(1) does not clear > >> screen for certain terminals (done with 'ti' and 'te' sequences), > >> while less(1) when running as less does. > >> > >> The less(1) behavior can be annoying to some people (sometimes even > >> myself when using less to show contents of a file and ^Z to paste > >> them), and unfortunately quite a few of them also happen to be the > >> more vocal ones when it comes to a change. > > > > I find that behaviour infuriating > > > > I page down to a place to get some text on the screen to use as a > > reference, then exit to run a command with that information, and *bam* the > > info I wanted to use has gone away. > > It doesn't do that on csh. Or maybe I figured out how to prevent it > long ago and forgot, but all I use is this: > > setenv PAGER "less -RS" Ugh. It would kill me to *re*read the man pages, once and awhile. Thanks, Warren! --Chris > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 20 04:41:17 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB0F9A38; Fri, 20 Feb 2015 04:41:17 +0000 (UTC) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2EEACC9; Fri, 20 Feb 2015 04:41:17 +0000 (UTC) Received: by pabkx10 with SMTP id kx10so5181085pab.0; Thu, 19 Feb 2015 20:41:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=pvDSQd//5sQ0oPPoMD8W7U9N56x12px9CcXwtM2DHSk=; b=hSujBTI8o73njbXWPXwCehsfswyi8Ne2eJ0PaOE3Swx0/Sl5v9jjKLun0Z5CDlGUJE ajR3bG5MXu1cduEUK4KDdF/uMFRKYB6JeCxaZPe2cVQf8k7gh2PBd+HoHQ+c8C8GxW2S RNM81tElBGtk3lMZA7cX/kbMI3WWYLP3xvn4hbpZ/tRZOu3BrZuXHkNpqQxLbXXrZijL 2Vdfk8z5fykLjtXFpO0EjI+0NrP9v/mGqb8euos8ISsIDi01ic49zvfKwYnZCsQ9w8oX jgkyjpTolq4DQfdeAT8qbLaQfJO0AlfdFpru7Zr7KhNSKi4s0nh3a68fbejXLf8VHaQh Lb/A== MIME-Version: 1.0 X-Received: by 10.68.138.194 with SMTP id qs2mr13805315pbb.8.1424407277239; Thu, 19 Feb 2015 20:41:17 -0800 (PST) Sender: kob6558@gmail.com Received: by 10.67.30.198 with HTTP; Thu, 19 Feb 2015 20:41:17 -0800 (PST) In-Reply-To: References: <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org> Date: Thu, 19 Feb 2015 20:41:17 -0800 X-Google-Sender-Auth: nC51RhhOBGPZZtoum7Mh7yty46c Message-ID: Subject: Re: default pager (csh) From: Kevin Oberman To: Warren Block X-Mailman-Approved-At: Fri, 20 Feb 2015 13:14:24 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Davide Italiano , FreeBSD Hackers , freebsd-current , Xin LI X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 04:41:18 -0000 On Thu, Feb 19, 2015 at 7:45 PM, Kevin Oberman wrote: > On Thu, Feb 19, 2015 at 5:10 PM, Warren Block wrote: > >> On Thu, 19 Feb 2015, Julian Elischer wrote: >> >> On 2/18/15 3:41 PM, Xin Li wrote: >>> >>>> >>>> The _only_ reason that I can think of is that more(1) does not clear >>>> screen for certain terminals (done with 'ti' and 'te' sequences), >>>> while less(1) when running as less does. >>>> >>>> The less(1) behavior can be annoying to some people (sometimes even >>>> myself when using less to show contents of a file and ^Z to paste >>>> them), and unfortunately quite a few of them also happen to be the >>>> more vocal ones when it comes to a change. >>>> >>> >>> I find that behaviour infuriating >>> >>> I page down to a place to get some text on the screen to use as a >>> reference, then exit to run a command with that information, and *bam* the >>> info I wanted to use has gone away. >>> >> >> It doesn't do that on csh. Or maybe I figured out how to prevent it long >> ago and forgot, but all I use is this: >> >> setenv PAGER "less -RS" >> > > You probably did what I used to do. Modify the termcaps/terminfo to > eliminate this behavior. See Exorcising the Evil Alternate Screen > . > > In the past, FreeBSD disabled this by default. It was changed several > years ago, but you can change it back as per the above referenced article. > > Well, I just looked at this and it looks like FreeBSD is using termcap, not terminfo. So you can "fix" this by defining TERM to a version of xterm that does not define alternate screen. I use xterm which, rather surprisingly, does not define ti or te. Neither do any of the xterm variants that I can find in termcap. (N.B. I am NOT running xterm. I am using mate-terminal, but it still works.) rxvt variants do define them, as do a great many others. Take a look at /usr/share/misc/termcap. Just remember that editing it does nothing until termcap.db is rebuilt. -- Kevin Oberman, Network Engineer, Retired E-mail: rkoberman@gmail.com From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 21 02:05:46 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3746F2B0; Sat, 21 Feb 2015 02:05:46 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BBF8FD1F; Sat, 21 Feb 2015 02:05:45 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t1L25PAu003181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 20 Feb 2015 19:05:25 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t1L25PMO003178; Fri, 20 Feb 2015 19:05:25 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 20 Feb 2015 19:05:25 -0700 (MST) From: Warren Block To: Kevin Oberman Subject: Re: default pager (csh) In-Reply-To: Message-ID: References: <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Fri, 20 Feb 2015 19:05:25 -0700 (MST) Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Davide Italiano , FreeBSD Hackers , freebsd-current , Xin LI X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2015 02:05:46 -0000 On Thu, 19 Feb 2015, Kevin Oberman wrote: > On Thu, Feb 19, 2015 at 5:10 PM, Warren Block wrote: > On Thu, 19 Feb 2015, Julian Elischer wrote: > > On 2/18/15 3:41 PM, Xin Li wrote: > > The _only_ reason that I can think of is that more(1) does not clear > screen for certain terminals (done with 'ti' and 'te' sequences), > while less(1) when running as less does. > > The less(1) behavior can be annoying to some people (sometimes even > myself when using less to show contents of a file and ^Z to paste > them), and unfortunately quite a few of them also happen to be the > more vocal ones when it comes to a change. > > > I find that behaviour infuriating > > I page down to a place to get some text on the screen to use as  a reference, then exit to run a command with that information, and *bam* the info I wanted to > use has gone away. > > > It doesn't do that on csh.  Or maybe I figured out how to prevent it long ago and forgot, but all I use is this: > > setenv  PAGER   "less -RS" > > > You probably did what I used to do. Modify the termcaps/terminfo to eliminate this behavior. See Exorcising the Evil Alternate Screen. > > In the past, FreeBSD disabled this by default. It was changed several years ago, but you can change it back as per the aboved referenced article. I'm pretty sure I have not done that, it would show up in mergemaster. As far as I can remember, less(1) has never done that clear-the-screen thing on FreeBSD, which is why it is so jarring on Linux. From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 21 02:31:31 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4230713; Sat, 21 Feb 2015 02:31:31 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B375AF69; Sat, 21 Feb 2015 02:31:31 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 0B0D22411E; Fri, 20 Feb 2015 18:31:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1424485885; x=1424500285; bh=bwxCaVFUdBNNGDpLFQFiwuwbSCP1IP9moqXS7N7BAQ8=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=v1Ss0TyR4SwoWXzFn6fW04Sfy7h+8/iD7Km1/fEuDXgm1626mAYQ7vk6aNCG1DpQu Q2VDENZtOI+euIEVnr7XD+wug2XqK65sHapSiAqtO9KtDkFq7lFisk2hmq2qaqK1h3 04LT/2mCdmxIcsADV5rWzCOtq7i6kme7lqzjhs6M= Message-ID: <54E7EDFC.70008@delphij.net> Date: Fri, 20 Feb 2015 18:31:24 -0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Warren Block , Kevin Oberman Subject: Re: default pager (csh) References: <54E5232F.3060409@delphij.net> <54E59BF7.40207@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Davide Italiano , FreeBSD Hackers , freebsd-current , Xin LI X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2015 02:31:31 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 02/20/15 18:05, Warren Block wrote: >> It doesn't do that on csh. Or maybe I figured out how to prevent >> it long ago and forgot, but all I use is this: >> >> setenv PAGER "less -RS" >> >> >> You probably did what I used to do. Modify the termcaps/terminfo >> to eliminate this behavior. See Exorcising the Evil Alternate >> Screen. >> >> In the past, FreeBSD disabled this by default. It was changed >> several years ago, but you can change it back as per the aboved >> referenced article. > > I'm pretty sure I have not done that, it would show up in > mergemaster. As far as I can remember, less(1) has never done that > clear-the-screen thing on FreeBSD, which is why it is so jarring on > Linux. Not all terminals will clear screen... Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.2 (FreeBSD) iQIbBAEBCgAGBQJU5+32AAoJEJW2GBstM+nsZFQP+IoALzoaMRYF+jB9L1kwY+QN h3mnx6BCjv24nMfnv/wLDvWXQ5N1DY0Di9/RP0YSFxgWetpxQGIf0fDOE2jYAbSW +xPBMnYfkKWmzenF5W9NxMPi4o6ul/+LIkp1PxGpxHqjktkSFu3lnoeZaI0JB+6U 3XgpyLMsCfKPP1s5jOyn7TcIKQkby69ANUHWN+7Vfcrg7wy7h0cLmEuCfqOjMg0O CczASshTkCH3JjdwENmT5hwxIKRRqLeqKLvGSyphcZ8FiOl8TKfY+Rnd7wxc9/Cf /PU4cJFVIYw4v60hknD+Dj3hdgwJYA5pfJY2+8faC5V0qKpsDCnl43xDzKXojJjE QX74k7fS47bwcAzTZMLD55X95mos6k7pkDdSE+FoEyWld+yCKxxnSGEXE+728xX2 zdpj1OlJLhyijcZXPNYbDmUVbGzjBnWSTcRF73+upeGDtG3Q1cKaCD7ZBx+Eyqq8 r0ILRrINPzW58XzK0i33obT4SqyBKnadCRuSADpKEaEZgjQeDEGhlQ83SBIt2xBr rqofewSf3jPoN/o03vNaVMRfOT36NT65DOoCjIf0TuEpKbRhfYXb5LVAmt13Bhpv Uc29/3uOi0r2A1h+2URZ0M5LBJo2NiaNgGRE+TTw4y/+mUwhbMvdOVuRwvYwGatb 2lI/u9fCHmNkyPWf5J8= =+90O -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 21 05:48:48 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33D9DDB8 for ; Sat, 21 Feb 2015 05:48:48 +0000 (UTC) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1188E682 for ; Sat, 21 Feb 2015 05:48:47 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id t1L5mZMW049851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 20 Feb 2015 21:48:36 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.14.2/Submit) with UUCP id t1L5mYw7049850; Fri, 20 Feb 2015 21:48:34 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: from fbsd81 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA25894; Fri, 20 Feb 15 21:27:33 PST Date: Fri, 20 Feb 2015 21:27:33 -0800 From: perryh@pluto.rain.com (Perry Hutchison) To: jilles@stack.nl Subject: Re: RFC: make init(8) aware of /rescue/sh Message-Id: <54e81745.VJ9sLUeKwo661VPr%perryh@pluto.rain.com> References: <54db2f2f.gIXyruGSeJuY3FbJ%perryh@pluto.rain.com> <20150214234943.GB1360@stack.nl> In-Reply-To: <20150214234943.GB1360@stack.nl> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2015 05:48:48 -0000 Jilles Tjoelker wrote: > On Wed, Feb 11, 2015 at 02:30:07AM -0800, Perry Hutchison wrote: > > Seems to me it might be desirable for init(8) to fall back > > to /rescue/sh for single-user mode if neither the default > > (kenv:init_shell) nor /bin/sh is usable. Thoughts? [patch snipped] > It is already possible to type "/rescue/sh" at the prompt > (the Makefile always compiles with -DDEBUGSHELL). Of course, provided one remembers that /rescue/sh exists :) I use /rescue so rarely that I did not remember its existence when this situation arose a little over a week ago. (I did, however, remember that I have an emergency shell in /sbin; worst case I would have booted off the distribution flash drive, which I keep handy in case of boot troubles.) Part of the reason for adding an automatic fallback to /rescue/sh is to jog the admin's memory, in case something is messed up badly enough that other parts of /rescue might also be needed. > This must be done manually but also covers the case where > /bin/sh exists but rtld or shared libraries are missing or > broken. That case is already covered, indeed it is exactly what led to the incident mentioned above. (/bin/sh was fine, but one of its shared libs was missing.) > I'm not really sure this is worth the extra code. If we follow that line of reasoning to its logical conclusion, we should also remove the automatic fallback to _PATH_BSHELL. After all, if the system fails to boot because kenv:init_shell is set to something broken, one can always enter /bin/sh manually. BTW the amount of "extra code" is trifling compared to the overall size of init :) From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 21 19:30:36 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C354977B for ; Sat, 21 Feb 2015 19:30:36 +0000 (UTC) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 878A8C63 for ; Sat, 21 Feb 2015 19:30:36 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 96EE6B8056; Sat, 21 Feb 2015 20:30:33 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 87BDF28494; Sat, 21 Feb 2015 20:30:33 +0100 (CET) Date: Sat, 21 Feb 2015 20:30:33 +0100 From: Jilles Tjoelker To: Perry Hutchison Subject: Re: RFC: make init(8) aware of /rescue/sh Message-ID: <20150221193033.GA10071@stack.nl> References: <54db2f2f.gIXyruGSeJuY3FbJ%perryh@pluto.rain.com> <20150214234943.GB1360@stack.nl> <54e81745.VJ9sLUeKwo661VPr%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54e81745.VJ9sLUeKwo661VPr%perryh@pluto.rain.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2015 19:30:36 -0000 On Fri, Feb 20, 2015 at 09:27:33PM -0800, Perry Hutchison wrote: > Jilles Tjoelker wrote: > > On Wed, Feb 11, 2015 at 02:30:07AM -0800, Perry Hutchison wrote: > > > Seems to me it might be desirable for init(8) to fall back > > > to /rescue/sh for single-user mode if neither the default > > > (kenv:init_shell) nor /bin/sh is usable. Thoughts? > [patch snipped] > > It is already possible to type "/rescue/sh" at the prompt > > (the Makefile always compiles with -DDEBUGSHELL). > Of course, provided one remembers that /rescue/sh exists :) > I use /rescue so rarely that I did not remember its existence > when this situation arose a little over a week ago. (I did, > however, remember that I have an emergency shell in /sbin; > worst case I would have booted off the distribution flash > drive, which I keep handy in case of boot troubles.) > Part of the reason for adding an automatic fallback to /rescue/sh > is to jog the admin's memory, in case something is messed up badly > enough that other parts of /rescue might also be needed. > > This must be done manually but also covers the case where > > /bin/sh exists but rtld or shared libraries are missing or > > broken. > That case is already covered, indeed it is exactly what led to > the incident mentioned above. (/bin/sh was fine, but one of its > shared libs was missing.) In that case, execve(2) will succeed, and the result as far as init is concerned is similar to sh starting properly and the user typing 'exit 1'. > > I'm not really sure this is worth the extra code. > If we follow that line of reasoning to its logical conclusion, > we should also remove the automatic fallback to _PATH_BSHELL. > After all, if the system fails to boot because kenv:init_shell is > set to something broken, one can always enter /bin/sh manually. > BTW the amount of "extra code" is trifling compared to the overall > size of init :) It does not seem unreasonable to me to remove the automatic fallback to _PATH_BSHELL. -- Jilles Tjoelker