提交 81af880a 编写于 作者: P Philipp Hahn 提交者: Michal Privoznik

storage: Cast uid_t|gid_t to unsigned int

uid_t and gid_t are opaque types, ranging from s32 to u32 to u64.

Explicitly cast them to unsigned int for printing.
Signed-off-by: NPhilipp Hahn <hahn@univention.de>
上级 7b4b59fa
......@@ -283,7 +283,8 @@ virStorageBackendCreateBlockFrom(virConnectPtr conn ATTRIBUTE_UNUSED,
&& (fchown(fd, uid, gid) < 0)) {
virReportSystemError(errno,
_("cannot chown '%s' to (%u, %u)"),
vol->target.path, uid, gid);
vol->target.path, (unsigned int) uid,
(unsigned int) gid);
goto cleanup;
}
if (fchmod(fd, vol->target.perms.mode) < 0) {
......@@ -577,7 +578,8 @@ static int virStorageBackendCreateExecCommand(virStoragePoolObjPtr pool,
&& (chown(vol->target.path, uid, gid) < 0)) {
virReportSystemError(errno,
_("cannot chown %s to (%u, %u)"),
vol->target.path, uid, gid);
vol->target.path, (unsigned int) uid,
(unsigned int) gid);
return -1;
}
if (chmod(vol->target.path, vol->target.perms.mode) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册