From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DNS_FROM_OPENWHOIS, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.2.5 Date: Fri, 21 Oct 2011 10:56:28 -0400 (EDT) From: Jaroslav Skarvada To: Linux console tools development discussion Message-ID: In-Reply-To: <4EA14C88.5060302@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.34.24.56] X-Mailer: Zimbra 7.1.2_GA_3268 (ZimbraWebClient - FF3.0 (Linux)/7.1.2_GA_3268) Subject: Re: [kbd] kbd: loadkeys -d doesn't work 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: Fri, 21 Oct 2011 14:56:36 -0000 Archived-At: List-Archive: ----- Original Message ----- > 10.10.2011 11:48, Jaroslav Skarvada wrote: > > The loadkeys -d doesn't work any more (kbd-1.15.3). > > According to man and previous behaviour, I think it > > should work. Possible fix is attached > > I fixed this bug in my git. Sorry for long delay. > Can you confirm fix ? > I think it shouldn't read stdin in case of optd Jaroslav diff -up kbd-1.15.3/src/loadkeys.c.orig kbd-1.15.3/src/loadkeys.c --- kbd-1.15.3/src/loadkeys.c.orig 2011-10-21 16:42:09.304296233 +0200 +++ kbd-1.15.3/src/loadkeys.c 2011-10-21 16:41:01.595072657 +0200 @@ -3021,7 +3021,7 @@ int main(int argc, char *argv[]) parse_keymap(f); } - if (optind == argc) { + if (!optd && optind == argc) { strcpy(pathname, ""); parse_keymap(stdin); } diff -up kbd-1.15.3/src/loadkeys.y.orig kbd-1.15.3/src/loadkeys.y --- kbd-1.15.3/src/loadkeys.y.orig 2011-10-21 12:16:39.000000000 +0200 +++ kbd-1.15.3/src/loadkeys.y 2011-10-21 16:42:41.192924078 +0200 @@ -1210,7 +1210,7 @@ int main(int argc, char *argv[]) parse_keymap(f); } - if (optind == argc) { + if (!optd && optind == argc) { strcpy(pathname, ""); parse_keymap(stdin); }