projects
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53105c6
)
Base inodes on blocks
author
Robert Pengelly
<robertapengelly@hotmail.com>
Sun, 14 Sep 2025 22:54:06 +0000
(23:54 +0100)
committer
Robert Pengelly
<robertapengelly@hotmail.com>
Sun, 14 Sep 2025 22:54:06 +0000
(23:54 +0100)
mke2fs.c
patch
|
blob
|
history
diff --git
a/mke2fs.c
b/mke2fs.c
index 03772d79480c4768876ee71db1b74d477fab583e..789b5c270746f2ea0088ecb2730593613a0c8a7f 100644
(file)
--- a/
mke2fs.c
+++ b/
mke2fs.c
@@
-659,8
+659,15
@@
int main (int argc, char **argv) {
}
+ if ((nbinodes = nbblocks - EXT2_FIRST_INO - 1) < EXT2_FIRST_INO - 1) {
+ nbinodes = EXT2_FIRST_INO - 1;
+ }
+
nbresrvd = (nbblocks * 5) / 100;
- nbinodes = EXT2_FIRST_INO - 1 + (nbresrvd ? 1 : 0);
+
+ if (nbresrvd) {
+ nbinodes++;
+ }
image_size += offset * SECTOR_SIZE;