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=-2.3 required=5.0 tests=BAYES_00, DNS_FROM_OPENWHOIS, FRT_GUARANTEE1, FUZZY_GUARANTEE, RCVD_IN_DNSWL_MED, SPF_NEUTRAL autolearn=no version=3.2.5 From: Olivier Mehani To: Date: Sun, 25 Apr 2010 17:12:08 +1000 Message-ID: <1272179528-32543-1-git-send-email-shtrom@ssji.net> X-Mailer: git-send-email 1.7.0.5 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-8.0.0.4125-6.000.1038-17340.000 X-TM-AS-Result: No--11.303700-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-SA-Exim-Connect-IP: 221.199.216.123 X-SA-Exim-Mail-From: shtrom@ssji.net X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:20:07 +0000) X-SA-Exim-Scanned: Yes (on atp-es2.it.nicta.com.au) Cc: Olivier Mehani Subject: [kbd] [PATCH] [loadkeys] Don't open console on --bkeymap 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: Sun, 25 Apr 2010 07:12:43 -0000 Archived-At: List-Archive: From: Olivier Mehani Check that -b hasn't specified, similarly to -m, before loadkeys tries to open the console. As for --mktable, --bkeymap doesn't need it. This allows to dump binary keymaps in a larger range of situations where ownership of the console device is not guarranteed e.g., when running from an Xterm. Signed-off-by: Olivier Mehani --- src/loadkeys.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/loadkeys.c b/src/loadkeys.c index a827f8e..a610722 100644 --- a/src/loadkeys.c +++ b/src/loadkeys.c @@ -2090,7 +2090,7 @@ main(int argc, char *argv[]) { } prefer_unicode = optu; - if (!optm) { + if (!optm && !optb) { /* check whether the keyboard is in Unicode mode */ fd = getfd(NULL); if (ioctl(fd, KDGKBMODE, &kbd_mode)) { -- 1.7.0.5