* How to access Linux Kernel environment Variables ?
@ 2014-11-05 8:15 santosh prasad nayak
2014-11-05 9:14 ` Richard Weinberger
0 siblings, 1 reply; 4+ messages in thread
From: santosh prasad nayak @ 2014-11-05 8:15 UTC (permalink / raw)
To: linux-kernel, kernel-janitors@vger.kernel.org
Hi all,
Is there any system call in Linux which serve the purpose of "kenv()"
of FreeBSD ?
In FreeBSD:
-----------------
Kernel environment variables are saved at "/boot/loader.conf" and
those variables can be accessed using "kenv()" system call in C
program.
----------------
Is there any similar functionality available in Linux kernel ?
Thanks
Santosh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to access Linux Kernel environment Variables ?
2014-11-05 8:15 How to access Linux Kernel environment Variables ? santosh prasad nayak
@ 2014-11-05 9:14 ` Richard Weinberger
2014-11-05 10:56 ` santosh nayak
0 siblings, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2014-11-05 9:14 UTC (permalink / raw)
To: santosh prasad nayak; +Cc: linux-kernel, kernel-janitors@vger.kernel.org
On Wed, Nov 5, 2014 at 9:03 AM, santosh prasad nayak
<santoshprasadnayak@gmail.com> wrote:
> Hi all,
>
> Is there any system call in Linux which serve the purpose of "kenv()"
> of FreeBSD ?
>
>
> In FreeBSD:
> -----------------
> Kernel environment variables are saved at "/boot/loader.conf" and
> those variables can be accessed using "kenv()" system call in C
> program.
> ----------------
>
>
> Is there any similar functionality available in Linux kernel ?
/proc/cmdline?
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to access Linux Kernel environment Variables ?
2014-11-05 9:14 ` Richard Weinberger
@ 2014-11-05 10:56 ` santosh nayak
2014-11-05 11:18 ` Richard Weinberger
0 siblings, 1 reply; 4+ messages in thread
From: santosh nayak @ 2014-11-05 10:56 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-kernel, kernel-janitors@vger.kernel.org
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).
I would like to use that system call in linux C code, the way I am
using kenv() in freeBSD environment.
Regards
Santosh
On Wed, Nov 5, 2014 at 2:44 PM, Richard Weinberger
<richard.weinberger@gmail.com> wrote:
> On Wed, Nov 5, 2014 at 9:03 AM, santosh prasad nayak
> <santoshprasadnayak@gmail.com> wrote:
>> Hi all,
>>
>> Is there any system call in Linux which serve the purpose of "kenv()"
>> of FreeBSD ?
>>
>>
>> In FreeBSD:
>> -----------------
>> Kernel environment variables are saved at "/boot/loader.conf" and
>> those variables can be accessed using "kenv()" system call in C
>> program.
>> ----------------
>>
>>
>> Is there any similar functionality available in Linux kernel ?
>
> /proc/cmdline?
>
> --
> Thanks,
> //richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to access Linux Kernel environment Variables ?
2014-11-05 10:56 ` santosh nayak
@ 2014-11-05 11:18 ` Richard Weinberger
0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2014-11-05 11:18 UTC (permalink / raw)
To: santosh nayak; +Cc: linux-kernel, kernel-janitors@vger.kernel.org
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-05 11:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 8:15 How to access Linux Kernel environment Variables ? santosh prasad nayak
2014-11-05 9:14 ` Richard Weinberger
2014-11-05 10:56 ` santosh nayak
2014-11-05 11:18 ` Richard Weinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).