Skip to content

Commit

Permalink
zvol_id.c: Compute the new length
Browse files Browse the repository at this point in the history
Since zvol_name was modified, we need to compute the
length again.

Signed-off-by: rilysh <[email protected]>
  • Loading branch information
rilysh committed Sep 30, 2024
1 parent 107932a commit aa9e3da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions udev/zvol_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ main(int argc, const char *const *argv)
len = strlen(zvol_name);
if (dev_part != NULL) {
sprintf(zvol_name + len, "-part%s", dev_part + 1);
len = strlen(zvol_name);
}

for (i = 0; i < len; ++i)
Expand Down

0 comments on commit aa9e3da

Please sign in to comment.