Page MenuHomeFreeBSD

userboot: support environment and symlinks in test application
ClosedPublic

Authored by stevek on Apr 3 2024, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 17, 5:47 AM
Unknown Object (File)
Thu, May 16, 4:17 PM
Unknown Object (File)
Fri, May 10, 1:47 AM
Unknown Object (File)
Mon, May 6, 8:41 PM
Unknown Object (File)
Thu, May 2, 1:45 AM
Unknown Object (File)
Wed, May 1, 8:52 PM
Unknown Object (File)
Wed, May 1, 3:01 PM
Unknown Object (File)
Tue, Apr 30, 2:27 PM
Subscribers

Details

Summary

Pass the environment on to the loader.
Also define USERBOOT=1 in the environment varables.

Add support for symlinks in the test application open callback.

stat the root directory when opening file
Without this, running "ls" command on the root directory encounters
issues getting the directory listing.

Obtained from: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

stevek requested review of this revision.Apr 3 2024, 9:31 PM
jhb added inline comments.
stand/userboot/test/test.c
112

Do you still want this case? I think in the new code open() will fail with EFAULT due to the NULL path pointer, but ENOENT does seem like it might be the better error code if there is no host base path.

525
stand/userboot/test/test.c
112

That case is in the test_open() function.

Added parenthesis based on comments.

This revision is now accepted and ready to land.Tue, Apr 30, 8:03 PM