]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
debugfs: fix set_inode_field so it can set the checksum field
authorTheodore Ts'o <tytso@mit.edu>
Thu, 13 Dec 2018 05:53:16 +0000 (00:53 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 15 Dec 2018 23:31:40 +0000 (18:31 -0500)
commit32917350a4f957f93259e90b28471d18def54b24
tree097ad540c85530dc8afe119e420d967a3e9dd00d
parent3f69836a5fbf54e4ebe6cdb60e6f0619914122d5
debugfs: fix set_inode_field so it can set the checksum field

Previously, setting the inode field was a no-op, since the library
function ext2fs_write_inode_full() would override whatever value was
set by debugfs.  Use the new ext2fs_write_inode2() interface so we can
in fact set the checksum to a potentially wrong value.  Also, ignore
the inode checksum failures if we are setting the checksum, and if the
checksum value is "calc", set the inode checksum to the correct value.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.c
debugfs/debugfs.h
debugfs/set_fields.c
debugfs/util.c