mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Throw const on some strings
In C, const indicates to the reader that mutation will not occur. It can also serve as a hint about ownership. Add const in a few places where it makes sense. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org> Closes #10997
This commit is contained in:
+4
-4
@@ -6225,7 +6225,7 @@ spa_tryimport(nvlist_t *tryconfig)
|
||||
* we don't sync the labels or remove the configuration cache.
|
||||
*/
|
||||
static int
|
||||
spa_export_common(char *pool, int new_state, nvlist_t **oldconfig,
|
||||
spa_export_common(const char *pool, int new_state, nvlist_t **oldconfig,
|
||||
boolean_t force, boolean_t hardforce)
|
||||
{
|
||||
spa_t *spa;
|
||||
@@ -6369,7 +6369,7 @@ export_spa:
|
||||
* Destroy a storage pool.
|
||||
*/
|
||||
int
|
||||
spa_destroy(char *pool)
|
||||
spa_destroy(const char *pool)
|
||||
{
|
||||
return (spa_export_common(pool, POOL_STATE_DESTROYED, NULL,
|
||||
B_FALSE, B_FALSE));
|
||||
@@ -6379,7 +6379,7 @@ spa_destroy(char *pool)
|
||||
* Export a storage pool.
|
||||
*/
|
||||
int
|
||||
spa_export(char *pool, nvlist_t **oldconfig, boolean_t force,
|
||||
spa_export(const char *pool, nvlist_t **oldconfig, boolean_t force,
|
||||
boolean_t hardforce)
|
||||
{
|
||||
return (spa_export_common(pool, POOL_STATE_EXPORTED, oldconfig,
|
||||
@@ -6391,7 +6391,7 @@ spa_export(char *pool, nvlist_t **oldconfig, boolean_t force,
|
||||
* from the namespace in any way.
|
||||
*/
|
||||
int
|
||||
spa_reset(char *pool)
|
||||
spa_reset(const char *pool)
|
||||
{
|
||||
return (spa_export_common(pool, POOL_STATE_UNINITIALIZED, NULL,
|
||||
B_FALSE, B_FALSE));
|
||||
|
||||
Reference in New Issue
Block a user