From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 28 Mar 2011 15:19:18 +0400 From: "Dmitry V. Levin" To: Linux console tools development discussion Message-ID: <20110328111918.GC15694@altlinux.org> References: <20110321214236.GA13370@graeme> <4D8C9693.9040006@gmail.com> <20110326223322.GA21591@altlinux.org> <4D8F0463.1050207@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iFRdW5/EC4oqxDHL" Content-Disposition: inline In-Reply-To: <4D8F0463.1050207@gmail.com> X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Subject: Re: [kbd] New vt_mode tool for kbd? 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: Mon, 28 Mar 2011 11:19:18 -0000 Archived-At: List-Archive: --iFRdW5/EC4oqxDHL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 27, 2011 at 01:33:23PM +0400, Alexey Gladkov wrote: > 27.03.2011 01:33, Dmitry V. Levin wrote: > > Multi-value exit status is not quite script-friendly, especially for > > values greater than 128, because exit codes greater than 128 are used > > by the shell to indicate that a program died due to a fatal signal. >=20 > I do not really like the idea of =E2=80=8B=E2=80=8Bcreating for each ioct= l by the utility. >=20 > Does anyone have any suggestions on how combine all the requests in a > single utility? Usage: kbdinfo [-C DEVICE] getmode [text|graphics] kbdinfo [-C DEVICE] gkbmode [raw|xlate|mediumraw|unicode] kbdinfo [-C DEVICE] gkbmeta [metabit|escprefix] If only one argument is given, then just print the current mode to stdout and exit 0 (unless ioctls returned an error). If two arguments are given, then print nothing to stdout and exit 0 iff the current mode matches the mode described by these two arguments. This interface would be both script-friendly and extensible. --=20 ldv --iFRdW5/EC4oqxDHL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk2QbrYACgkQfKvmrJ41Nh63mwCePKg6KLa+4C0Sx6DgFYttuNns tCYAnjS6KuS/Wzfo4Z212B12UQiSNvEN =JM7J -----END PGP SIGNATURE----- --iFRdW5/EC4oqxDHL--