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
F81672094: D9529.id25102.diff
Fri, Apr 19, 5:56 PM
Unknown Object (File)
Thu, Apr 18, 12:28 PM
Unknown Object (File)
Thu, Mar 28, 8:59 PM
Unknown Object (File)
Mar 12 2024, 3:01 AM
Unknown Object (File)
Mar 12 2024, 3:01 AM
Unknown Object (File)
Mar 12 2024, 3:01 AM
Unknown Object (File)
Mar 12 2024, 2:49 AM
Unknown Object (File)
Feb 15 2024, 3:13 PM
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.