Page MenuHomeFreeBSD

Output file name from "preload" type md(4) device
ClosedPublic

Authored by stevek on Feb 10 2017, 5:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 1, 2:48 PM
Unknown Object (File)
Sun, Dec 1, 2:48 PM
Unknown Object (File)
Sun, Dec 1, 2:47 PM
Unknown Object (File)
Sun, Dec 1, 2:32 PM
Unknown Object (File)
Nov 13 2024, 10:45 AM
Unknown Object (File)
Oct 3 2024, 9:27 PM
Unknown Object (File)
Oct 1 2024, 8:16 PM
Unknown Object (File)
Sep 29 2024, 12:54 AM
Subscribers

Details

Summary

For MD_PRELOAD type md(4) devices, if there is a file name in the preloaded
meta-data, copy it into the softc structure.

When returning md(4) device details to the caller, include the file name in
any MD_PRELOAD type devices if it is set (first character is not NUL.)

In mdconfig, for "preload" type md(4) devices, if there is file config
available, print it in the file column of the output.

Test Plan

Built and tested on x86 and ARM by pre-loading ISO images from the loader and
checking mdconfig output. Also created other md types to ensure output from
mdconfig looks correct.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7336
Build 7503: arc lint + arc unit

Event Timeline

stevek retitled this revision from to Output file name from "preload" type md(4) device.
stevek updated this object.
stevek edited the test plan for this revision. (Show Details)
stevek added a reviewer: brooks.
brooks edited edge metadata.

Looks good to me.

sys/dev/md/md.c
1694

Not new in your code, but this case is awful. It does does a copyout to the buffer and just hopes it's at least PATH_MAX.

This revision is now accepted and ready to land.Feb 10 2017, 5:34 PM
sys/dev/md/md.c
1694

yes, the problem is the md_ioctl structure does not have a size for the md_file member and it really should.

This revision was automatically updated to reflect the committed changes.