[libvirt] [PATCH 2/4] storage: Cast uid_t|gid_t to unsigned int

Eric Blake eblake at redhat.com
Mon Feb 25 17:00:46 UTC 2013


On 02/22/2013 09:43 AM, Philipp Hahn wrote:
> uid_t and gid_t are opaque types, ranging from s32 to u32 to u64.

Technically, I've never seen a platform with uid_t or gid_t being u64 -
that's still theoretical at this time.  However, since pid_t is 64-bit
on mingw64, and since id_t is the union of [pug]id_t and therefore also
a 64-bit type, I agree with this commit.

Note that we have a compile-time assertion that on all platforms where
libvirt is currently compiling, that sizeof(uid_t) <= sizeof(int)
(likewise for gid_t).  We'd have a LOT more code to clean up if we ever
encounter a platform with u64 [ug]id_t.

Still, since your commit has already been pushed, we can't touch up the
commit message now.  And ACK to your change.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130225/41168276/attachment-0001.sig>


More information about the libvir-list mailing list