summaryrefslogtreecommitdiff
path: root/packages/genext2fs/genext2fs-1.3+cvs
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/genext2fs/genext2fs-1.3+cvs
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/genext2fs/genext2fs-1.3+cvs')
-rw-r--r--packages/genext2fs/genext2fs-1.3+cvs/.mtn2git_empty0
-rw-r--r--packages/genext2fs/genext2fs-1.3+cvs/bytes_per_inode.patch76
2 files changed, 76 insertions, 0 deletions
diff --git a/packages/genext2fs/genext2fs-1.3+cvs/.mtn2git_empty b/packages/genext2fs/genext2fs-1.3+cvs/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/genext2fs/genext2fs-1.3+cvs/.mtn2git_empty
diff --git a/packages/genext2fs/genext2fs-1.3+cvs/bytes_per_inode.patch b/packages/genext2fs/genext2fs-1.3+cvs/bytes_per_inode.patch
index e69de29bb2..729f5d7708 100644
--- a/packages/genext2fs/genext2fs-1.3+cvs/bytes_per_inode.patch
+++ b/packages/genext2fs/genext2fs-1.3+cvs/bytes_per_inode.patch
@@ -0,0 +1,76 @@
+Index: genext2fs/genext2fs.c
+===================================================================
+--- genext2fs.orig/genext2fs.c 2005-03-10 21:18:08.000000000 -0500
++++ genext2fs/genext2fs.c 2005-03-13 11:41:55.182746832 -0500
+@@ -2284,6 +2284,7 @@
+ " -d, --root <directory>\n"
+ " -D, --devtable <file>\n"
+ " -b, --size-in-blocks <blocks>\n"
++ " -I, --bytes-per-inode <bytes per inode>\n"
+ " -i, --number-of-inodes <number of inodes>\n"
+ " -r, --reserved-blocks <number of reserved blocks>\n"
+ " -g, --block-map <path> Generate a block map file for this path.\n"
+@@ -2314,6 +2315,7 @@
+ int nbresrvd = -1;
+ int tmp_nbblocks = -1;
+ int tmp_nbinodes = -1;
++ int bytes_per_inode = BYTES_PER_INODE;
+ uint32 fs_timestamp = -1;
+ char * fsout = "-";
+ char * fsin = 0;
+@@ -2345,6 +2347,7 @@
+ { "root", required_argument, NULL, 'd' },
+ { "devtable", required_argument, NULL, 'D' },
+ { "size-in-blocks", required_argument, NULL, 'b' },
++ { "bytes-per-inode", required_argument, NULL, 'I' },
+ { "number-of-inodes", required_argument, NULL, 'i' },
+ { "reserved-blocks", required_argument, NULL, 'r' },
+ { "block-map", required_argument, NULL, 'g' },
+@@ -2359,7 +2362,7 @@
+ { 0, 0, 0, 0}
+ } ;
+
+- while((c = getopt_long(argc, argv, "x:d:D:b:i:r:g:e:zfqUPhv", longopts, NULL)) != EOF) {
++ while((c = getopt_long(argc, argv, "x:d:D:b:I:i:r:g:e:zfqUPhv", longopts, NULL)) != EOF) {
+ switch(c)
+ {
+ case 'x':
+@@ -2372,6 +2375,9 @@
+ case 'b':
+ nbblocks = atoi(optarg);
+ break;
++ case 'I':
++ bytes_per_inode = atoi(optarg);
++ break;
+ case 'i':
+ nbinodes = atoi(optarg);
+ break;
+@@ -2468,24 +2474,22 @@
+ if(pdest)
+ *pdest = ':';
+ }
+-
++
+ tmp_nbinodes = stats.ninodes + EXT2_FIRST_INO + 1;
+ tmp_nbblocks = stats.nblocks; // FIXME: should add space taken by inodes too
+-
++
+ if(tmp_nbblocks > nbblocks)
+ {
+ fprintf(stderr, "number of blocks too low, increasing to %d\n",tmp_nbblocks);
+ nbblocks = tmp_nbblocks;
+ }
++ if(nbinodes == -1)
++ nbinodes = nbblocks * BLOCKSIZE / rndup(bytes_per_inode, BLOCKSIZE);
+ if(tmp_nbinodes > nbinodes)
+ {
+ fprintf(stderr, "number of inodes too low, increasing to %d\n",tmp_nbinodes);
+ nbinodes = tmp_nbinodes;
+ }
+- if(nbblocks == -1)
+- error_msg_and_die("filesystem size unspecified");
+- if(nbinodes == -1)
+- nbinodes = nbblocks * BLOCKSIZE / rndup(BYTES_PER_INODE, BLOCKSIZE);
+ if(nbresrvd == -1)
+ nbresrvd = nbblocks * RESERVED_BLOCKS;
+ if(fs_timestamp == -1)