Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要知道如何准确计算记录rec_len。怎么算的?
inode是file_type 4bytes+ name_len + rec_len + name 数据的1byte+每个字符,并且记录必须填充到 x4(4 字节边界),这就是我们添加for padding的原因1byte2bytes1byte"\0"
4bytes
1byte
2bytes
"\0"
对于第一个例子.,你有 4+1+1+2+4=12 和其他人一样
.