Page MenuHomeFreeBSD

gnop: add the option for adding a suffix to the name of the device
ClosedPublic

Authored by oshogbo on Nov 10 2019, 11:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 1:51 PM
Unknown Object (File)
Sun, Nov 24, 11:23 PM
Unknown Object (File)
Fri, Nov 22, 11:07 PM
Unknown Object (File)
Thu, Nov 21, 4:16 PM
Unknown Object (File)
Thu, Nov 21, 12:45 PM
Unknown Object (File)
Thu, Nov 21, 8:59 AM
Unknown Object (File)
Thu, Nov 14, 1:17 PM
Unknown Object (File)
Oct 20 2024, 1:41 PM
Subscribers

Details

Summary

Thanks to this option we can create more then one gnop provider from
single provider. This may be useful for temporary labeling some data
on the disk.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Why don't we just have a "name" parameter that determines the entire gnop provider name?

Why don't we just have a "name" parameter that determines the entire gnop provider name?

I like Mark's idea, change the flag to just let you specify the entire name of the resulting provider (the parameter passed to g_new_geomf())

I'm fine with naming nop devices any name as long as there is a nop suffix.
Otherwise somebody may do some weird stuff in /dev/.

lib/geom/nop/gnop.8
158 ↗(On Diff #64512)

Should be "the new provider".

159 ↗(On Diff #64512)

I think it would be clearer to refer to it as a suffix. For example, "The suffix .Dq .nop will be appended to the provider name."

sys/geom/nop/g_nop.c
33 ↗(On Diff #64512)

param.h is special and should come first in the include order.

91 ↗(On Diff #64512)

Why not write these as boolean expressions? if (!islower(name[i]) && !isdigit(name[i])) ...

I do not see why upper case characters should be prohibited.

392 ↗(On Diff #64512)

Perhaps include the name in the error message.

oshogbo marked 3 inline comments as done.

Address @markj comments.

sys/geom/nop/g_nop.c
33 ↗(On Diff #64512)

Fixed.

91 ↗(On Diff #64512)

style(9) defines so.
I added upper cases.

This revision is now accepted and ready to land.Dec 25 2019, 11:17 AM
This revision was automatically updated to reflect the committed changes.