[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Save/Load environment variable support

From: Bean
Subject: Re: [PATCH] Save/Load environment variable support
Date: Sun, 15 Jun 2008 03:28:48 +0800

On Sun, Jun 15, 2008 at 3:20 AM, Robert Millan <address@hidden> wrote:
> On Sun, Jun 15, 2008 at 03:03:43AM +0800, Bean wrote:
>> Hi,
>> Yes, this is a standalone command, it's used to support persistent
>> variable. For example, we can archive the result of savedefault using
>> the following command:
>> load_env
>> menuentry aa {
>>   save_env default
>> }
>> load_env loads the environment variable from $prefix/grubenv, and
>> save_env save selected variable to it. grubenv contain a environment
>> block, so that we can manage it using grub-editenv, just like the
>> environment block in the kernel.
> Sounds interesting.. does the 8 kiB size assure us that we won't have any
> trouble with filesystems when writing to it?

I first read from the disk, compare content, then write back. If it's
tail packing by the file system, it would fail at the compare stage.

> Also, which parts of this would be reused by findroot?

No parts is shared by findroot. Actually, findroot only work on
variable, whose value is fetched in main.c.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]