Fix the construction of the gctl_req that got broken by my previous commit and that introduced optional parameters. Existing classes (like geli(8)) use empty strings by default and expect the parameter to be passed to the kernel as such. Also, the default value of a string argument can be NULL. Fix both cases by making the optional parameter conditional upon gc_argname being set and making sure to test for NULL before dereferencing the pointer.
Fix the construction of the gctl_req that got broken by my
previous commit and that introduced optional parameters.
Existing classes (like geli(8)) use empty strings by default
and expect the parameter to be passed to the kernel as such.
Also, the default value of a string argument can be NULL.
Fix both cases by making the optional parameter conditional
upon gc_argname being set and making sure to test for NULL
before dereferencing the pointer.

Reported by: brueffer@

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase