Stop casting and use u/llu for printing unsigned 32bit/64 bit numbers.
The current format displays negative offsets while geom only deals with positive offset.
90 struct g_gate_hdr {
91 uint8_t gh_cmd; /* command */
92 uint64_t gh_offset; /* device offset */
93 uint32_t gh_length; /* size of block */
94 uint64_t gh_seq; /* request number */
95 uint16_t gh_error; /* error value (0 if ok) */
96 } __packed;