All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: santosh nayak <santoshprasadnayak@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: How to access Linux Kernel environment Variables ?
Date: Wed, 05 Nov 2014 11:18:40 +0000	[thread overview]
Message-ID: <545A0790.2050302@nod.at> (raw)
In-Reply-To: <CAOD=uF6oBZ0cmNH4Jf9Hs4ZU3Y4WO-wfvc4k0b7Ezpo63S7Dag@mail.gmail.com>

Am 05.11.2014 um 11:56 schrieb santosh nayak:
> Thanks Richard for your response.
> 
> Is there any system call in Linux which can access and set variables
> in /proc/cmdline ?  (Similar to kenv() in FreeBSD which can access and
> set variables in /boot/loader.conf).

No.

> I would like to use that system call in linux C code, the  way I am
> using kenv() in freeBSD environment.

Create a wrapper function which behaves like kenv().
Should be doable in a few lines of code.

Thanks,
//richard

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: santosh nayak <santoshprasadnayak@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: How to access Linux Kernel environment Variables ?
Date: Wed, 05 Nov 2014 12:18:40 +0100	[thread overview]
Message-ID: <545A0790.2050302@nod.at> (raw)
In-Reply-To: <CAOD=uF6oBZ0cmNH4Jf9Hs4ZU3Y4WO-wfvc4k0b7Ezpo63S7Dag@mail.gmail.com>

Am 05.11.2014 um 11:56 schrieb santosh nayak:
> Thanks Richard for your response.
> 
> Is there any system call in Linux which can access and set variables
> in /proc/cmdline ?  (Similar to kenv() in FreeBSD which can access and
> set variables in /boot/loader.conf).

No.

> I would like to use that system call in linux C code, the  way I am
> using kenv() in freeBSD environment.

Create a wrapper function which behaves like kenv().
Should be doable in a few lines of code.

Thanks,
//richard

  reply	other threads:[~2014-11-05 11:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05  8:03 How to access Linux Kernel environment Variables ? santosh prasad nayak
2014-11-05  8:15 ` santosh prasad nayak
2014-11-05  9:14 ` Richard Weinberger
2014-11-05  9:14   ` Richard Weinberger
2014-11-05 10:56   ` santosh nayak
2014-11-05 10:56     ` santosh nayak
2014-11-05 11:18     ` Richard Weinberger [this message]
2014-11-05 11:18       ` Richard Weinberger

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=545A0790.2050302@nod.at \
    --to=richard@nod.at \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=santoshprasadnayak@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.