From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Linux Kernel Devel Mailing List <devel-kernel@altlinux.ru>
Subject: Re: [d-kernel] RFC: вытесняющий релиз для kernel-modules
Date: Sun, 22 May 2005 17:25:23 +0400
Message-ID: <20050522132523.GB25814@basalt.office.altlinux.org> (raw)
In-Reply-To: <20050522131312.GA30337@lks.home>
[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]
On Sun, May 22, 2005 at 05:13:12PM +0400, Konstantin A. Lepikhov wrote:
[...]
> а скриптик для получения kcode будет выглядеть вот так:
>
> #!/bin/sh
> # Small script to get the kernel version code
> # Made by LAKostis for ALTLinux kernel-build-tools package.
> # Based on the kernelversion_major script
> # from modutils package made by Dmitry V. Levin.
>
> pick1() {
> eval 'echo $'"$pick_index"
> }
> pick() {
> local OLD_IFS="$IFS"
> local delimiter="$1"
> shift
> pick_index="$1"
> shift
> IFS=" "$delimiter
> pick1 $*
> IFS="$OLD_IFS"
> unset pick_index
> }
>
> release="$1"
> [ ! $release ] && release=$(uname -r)
> kver=$(pick - 1 $release)
> version=$(pick . 1 $kver)
> patchlevel=$(pick . 2 $kver)
> sublevel=$(pick . 3 $kver)
Вся эта химия была нужна для того, чтобы программа, запущенная из-под
программы modprobe, которую может запускать ядро, не запускала других
программ.
> # from kernel Makefile
> echo `expr $version \\* 65536 + $patchlevel \\* 256 + $sublevel`
Если запускается expr, то код может и должен быть проще.
> Данный скрипт можно положить либо в modutils, но мне кажется лучше в
> kernel-build-tools, поскольку нужен он только сборщикам, обычные
> пользователи могут этот CODE из хидеров вытащить.
Точно не в modutils.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-05-22 13:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-22 13:13 Konstantin A. Lepikhov
2005-05-22 13:25 ` Dmitry V. Levin [this message]
2005-05-22 13:29 ` [d-kernel] " Konstantin A. Lepikhov
2005-06-11 17:27 ` [d-kernel] " Sergey Vlasov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050522132523.GB25814@basalt.office.altlinux.org \
--to=ldv@altlinux.org \
--cc=devel-kernel@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux kernel packages development
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
public-inbox-index devel-kernel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git