From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 Date: Tue, 6 Sep 2016 17:49:31 +0200 From: Alexey Gladkov To: Linux console tools development discussion Message-ID: <20160906154931.GG31992@comp-core-i7-2640m-0182e6.fortress> References: <41945c929b9cb3612b962988d4a3df23.squirrel@vsta.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41945c929b9cb3612b962988d4a3df23.squirrel@vsta.org> Subject: Re: [kbd] [Fwd: Re: [Pkg-kbd-devel] kbd -b needlessly requires VT access] X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 15:48:49 -0000 Archived-At: List-Archive: On Mon, Aug 29, 2016 at 08:17:29AM -0700, Andy Valencia wrote: > At the request of Andreas, I am forwarding this bug I reported on Debian. > Briefly, loadkeys in -b mode is just a file utility, converting text > format to binary. And yet the code is structured so that a console > FD must be opened, needlessly requiring the file conversion to be run > in a console environment. Thanks for report! Good catch! http://git.kernel.org/cgit/linux/kernel/git/legion/kbd.git/commit/?id=2740f65352e3806dac56e16e5856eac5702caf6e > ---------------------------- Original Message ---------------------------- > Subject: Re: [Pkg-kbd-devel] kbd -b needlessly requires VT access > From: "Andreas Henriksson" > Date: Sun, August 28, 2016 4:59 am > -------------------------------------------------------------------------- > > Hello Andy Valencia. > > On Fri, Aug 26, 2016 at 08:54:53AM -0700, Andy Valencia wrote: > > When generating a binary map using "loadkeys -b" to target a smaller > > device, the command fails unless run in an environment where it can > > access a console device for itself. This is due to its unconditional > > use of getfd(), even when all the command is going to do is write > > out a binary version of its input file. > > I see that the fd returned from getfd is only conditionally used, but > the call to getfd will result in exit(1) being called if getfd is > about to fail. This indeed sounds suboptimal. > Not sure if moving the getfd call to where fd is used, or if guarding > the early call to getfd with the same guards that will make use > of getfd, is the best option. > > Could you please try to contact the upstream development list about > this issue? > > https://lists.altlinux.org/mailman/listinfo/kbd > > Regards, > Andreas Henriksson > > > _______________________________________________ > kbd mailing list > kbd@lists.altlinux.org > https://lists.altlinux.org/mailman/listinfo/kbd -- Rgrds, legion