summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/zvol_id/zvol_id_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/zvol_id/zvol_id_main.c b/cmd/zvol_id/zvol_id_main.c
index d9c80b3f9..8f0504ae9 100644
--- a/cmd/zvol_id/zvol_id_main.c
+++ b/cmd/zvol_id/zvol_id_main.c
@@ -23,6 +23,8 @@
* Use is subject to license terms.
*/
+#include <ctype.h>
+#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -56,6 +58,7 @@ main(int argc, char **argv)
char *dev_name;
struct stat64 statbuf;
int dev_minor, dev_part;
+ int i;
if (argc < 2) {
printf("Usage: %s /dev/zvol_device_node\n", argv[0]);
@@ -89,6 +92,11 @@ main(int argc, char **argv)
else
snprintf(zvol_name_part, ZFS_MAXNAMELEN, "%s", zvol_name);
+ for (i = 0; i < strlen(zvol_name_part); i++) {
+ if (isblank(zvol_name_part[i]))
+ zvol_name_part[i] = '+';
+ }
+
printf("%s\n", zvol_name_part);
close(fd);
return (error);