summaryrefslogtreecommitdiffstats
path: root/module/zfs/spa.c
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-10-02 20:44:10 -0400
committerGitHub <[email protected]>2020-10-02 17:44:10 -0700
commit4d55ea811d4f5b832398f4e3b24c4da365956d62 (patch)
treec799540f0984809efa47a3b5d2218940def15297 /module/zfs/spa.c
parent5b525165e9113e7faabd230b504ae4e9b85d35a5 (diff)
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 <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10997
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r--module/zfs/spa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 532f04b91..2c70cf701 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -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));