Evan Layton wrote:
>>
>> Why implement this private root only one now if nothing's using
>> it right now?
>>
>
> Fair enough, I'll remove the private flags.
thanks.
>
>>> and the public one that mounts the BE and it's subordinate datasets
>>> (just skips all the shared FS's).
>>
>> NO_SHARED seems kindof awkward since we already have
>> public flags to explicitly mount shared FS's. Wouldn't the absence
>> of those flags already imply no shared FS's? It seems to me
>> a NO_ZONES flag would make a bit more sense since that
>> achieves the mount scenario we're really trying to achieve and
>> does not cause any logically inconsistency with the existing public
>> flags.
>>
>
> Valid point, I've changed it to NO_ZONES.
thanks.
libbe.h
-----------
180 - I think you want this to be 0x00000004 not 3 :-)
be_mount.c
------------------
330 - So that the NO_ZONES flag doesn't stomp on the
SHARED_FS flag, I think we can just move this check
into line 361which becomes:
if (getzoneid() == GLOBAL_ZONEID &&
be_get_uuid(bt.obe_root_ds, &uu) == 0 &&
!(flags & BE_MOUNT_FLAG_NO_ZONES)) {
Line 372 can then be removed as well.
>>> hmm it should be right there at line 1050.
>
> In the lastest version it's line 1047 in be_unmount_pool() in
> be_mount.c. I've added {} around it in the if statement so it's a bit
> easier to see.
thanks, I see it now.
>>>>>> be_utils.c
>>>>>> ---------------
>>>>>> 1301 - What is the reason why this is changed from
>>>>>> strcmp to strstr?
>>>>>
>>>>> changed back to strcmp
>>>>
>>>> You've got a strncmp there now instead, and this doesn't
>>>> look right either. If the line we've read in has a token named
>>>> "defaultfoo", this would match and it shouldn't. I think it
>>>> needs to be strcmp().
>>>
>>> If it has a line called defaultfoo grub won't know what to do with
>>> it either and will fail.
>>
>> Sure, but that has nothing to do with our parsing logic here.
>>
>>> However to be save I can put "default " as the string and check for
>>> that.
>>
>> I'm not following what you're saying here. Aren't we already
>> using the string "default" to compare against? My point is that
>> this logic here (using strncmp) can give a false positive on a string
>> match when it doesn't match.
>>
>
> I fixed this by having it check just past the end of "default"
>
> if (strncmp(strtok(temp_line, BE_WHITE_SPACE),
> "default", 8) == 0) {
I don't see how that makes it any better; so we're comparing
the null byte now as well? That doesn't make a whole lot of
sense.
I'm not understanding why there's an avoidance of using just
strcmp(). Since the string we're comparing against has been
tokenized and we're looking for an exact match of the entire
string, strcmp() does what we want is is safe here.
thanks,
-ethan