2022-02-15 10:49:03 +02:00
|
|
|
const std = @import("std");
|
|
|
|
|
2022-02-24 05:51:04 +02:00
|
|
|
const PackedGroup = packed struct {
|
|
|
|
gid: u32,
|
|
|
|
members_offset: u27,
|
|
|
|
groupname_len: u5,
|
|
|
|
};
|
|
|
|
|
2022-02-15 10:49:03 +02:00
|
|
|
const Group = struct {
|
|
|
|
gid: u32,
|
|
|
|
name: []const u8,
|
|
|
|
members: std.BufSet,
|
|
|
|
};
|
2022-02-24 05:51:04 +02:00
|
|
|
|
|
|
|
const testing = std.testing;
|
|
|
|
|
|
|
|
test "PackedGroup alignment" {
|
|
|
|
try testing.expectEqual(@sizeOf(PackedGroup) * 8, @bitSizeOf(PackedGroup));
|
|
|
|
}
|