CVSROOT: /cvs Module name: src Changes by: k...@cvs.openbsd.org 2014/03/31 13:50:52
Modified files: sbin/fdisk : mbr.c misc.c misc.h part.c Log message: Nuke [get|put][short|long] and just use letoh[16|32] and htole[16|32]. This is made possible by a) copying unaligned data (struct dos_partition's) into properly aligned structs and accessing the fields of the same; and b) realizing that gcc is smart enough to access fields in packed struct's *if* it knows it is accessing a packed struct. Even sparc64 finally gave a thumbs up. After several attempts and feedback from deraadt@ and dlg@, it looks good to deraadt@.