diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index b85f1fa434513abf520c2c2da78f6f0f01ea7795..b93fe010aa9962003fce2dbe51e812dcf6a78f5c 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -159,10 +159,10 @@ static int virLockManagerSanlockSetupLockspace(void) memcpy(ls.name, VIR_LOCK_MANAGER_SANLOCK_AUTO_DISK_LOCKSPACE, SANLK_NAME_LEN); ls.host_id = 0; /* Doesn't matter for initialization */ ls.flags = 0; - if (!virStrcpy(ls.host_id_disk.path, path, SANLK_NAME_LEN)) { + if (!virStrcpy(ls.host_id_disk.path, path, SANLK_PATH_LEN)) { virLockError(VIR_ERR_INTERNAL_ERROR, _("Lockspace path '%s' exceeded %d characters"), - path, SANLK_NAME_LEN); + path, SANLK_PATH_LEN); goto error; } ls.host_id_disk.offset = 0;