mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
ext2fs: 'struct ufid': Re-order fields and unpack
Re-ordering the fields suppresses the trailing padding which was causing
the structure to overflow 'struct fid'.
While here, re-indent in a more visually pleasing way.
Reviewed by: rmacklem, emaste, markj
Approved by: markj (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D47955
(cherry picked from commit 8ae6247aa9)
Sponsored by: The FreeBSD Foundation
This commit is contained in:
1 file changed
+5
-5
@@ -185,11 +185,11 @@ struct indir {
|
||||
|
||||
/* This overlays the fid structure (see mount.h). */
|
||||
struct ufid {
|
||||
uint16_t ufid_len; /* Length of structure. */
|
||||
uint16_t ufid_pad; /* Force 32-bit alignment. */
|
||||
ino_t ufid_ino; /* File number (ino). */
|
||||
uint32_t ufid_gen; /* Generation number. */
|
||||
} __packed;
|
||||
uint16_t ufid_len; /* Length of structure. */
|
||||
uint16_t ufid_pad; /* Force 32-bit alignment. */
|
||||
uint32_t ufid_gen; /* Generation number. */
|
||||
ino_t ufid_ino; /* File number (ino). */
|
||||
};
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_FS_EXT2FS_INODE_H_ */
|
||||
Reference in new issue
Block a user