From: Theodore Ts'o Date: Fri, 8 Jan 1999 13:33:39 +0000 (+0000) Subject: ChangeLog, inode.c: X-Git-Tag: E2FSPROGS-1_15~53 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=665f7107c595ff5bace48d360d506e3d968b9991;p=tools%2Fe2fsprogs.git ChangeLog, inode.c: inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if the inode number is zero; if it's zero, return EXT2_ET_BAD_INODE_NUM. ChangeLog, fsck.c: fsck.c (load_fs_info): If the pass number field is missing, it needs to be treated as zero. libext2fs.texinfo, README: Update for 1.14 release. --- diff --git a/README b/README index eaeaac5..5fd3da5 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ - This is the new version (1.13) of the second extended file system + This is the new version (1.14) of the second extended file system management programs. From time to time, I release new versions of e2fsprogs, to fix diff --git a/doc/libext2fs.texinfo b/doc/libext2fs.texinfo index 53d899b..4fe80b8 100644 --- a/doc/libext2fs.texinfo +++ b/doc/libext2fs.texinfo @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename libext2fs.info -@settitle The EXT2FS Library (version 1.13) +@settitle The EXT2FS Library (version 1.14) @synindex tp fn @comment %**end of header @@ -60,8 +60,8 @@ by the author. @title The EXT2FS Library @subtitle The EXT2FS Library -@subtitle Version 1.13 -@subtitle December 1998 +@subtitle Version 1.14 +@subtitle January 1999 @author by Theodore Ts'o @@ -101,7 +101,7 @@ by the Foundation. @top The EXT2FS Library -This manual documents the EXT2FS Library, version 1.13. +This manual documents the EXT2FS Library, version 1.14. @end ifinfo diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index a6e2c76..7236782 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,9 @@ +1999-01-07 Theodore Ts'o + + * inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if + the inode number is zero; if it's zero, return + EXT2_ET_BAD_INODE_NUM. + 1998-12-30 Theodore Ts'o * initialize.c (ext2fs_initialize): Use EXT2_FIRST_INODE instead diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c index 7c9c8bc..58c9d5d 100644 --- a/lib/ext2fs/inode.c +++ b/lib/ext2fs/inode.c @@ -495,7 +495,7 @@ errcode_t ext2fs_read_inode (ext2_filsys fs, ino_t ino, return 0; } } - if (ino > fs->super->s_inodes_count) + if ((ino == 0) || (ino > fs->super->s_inodes_count)) return EXT2_ET_BAD_INODE_NUM; group = (ino - 1) / EXT2_INODES_PER_GROUP(fs->super); offset = ((ino - 1) % EXT2_INODES_PER_GROUP(fs->super)) * @@ -585,7 +585,7 @@ errcode_t ext2fs_write_inode(ext2_filsys fs, ino_t ino, if (!(fs->flags & EXT2_FLAG_RW)) return EXT2_ET_RO_FILSYS; - if (ino > fs->super->s_inodes_count) + if ((ino == 0) || (ino > fs->super->s_inodes_count)) return EXT2_ET_BAD_INODE_NUM; if ((fs->flags & EXT2_FLAG_SWAP_BYTES) || diff --git a/misc/ChangeLog b/misc/ChangeLog index 3810ed7..7880855 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +1999-01-07 Theodore Ts'o + + * fsck.c (load_fs_info): If the pass number field is missing, it + needs to be treated as zero. + 1999-01-05 Theodore Ts'o * mke2fs.c (PRS): Allow the user to specify exactly how many diff --git a/misc/fsck.c b/misc/fsck.c index 0778d16..30b7426 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -275,7 +275,9 @@ static void load_fs_info(char *filename) else fs_last->next = fs; fs_last = fs; - if (fs->passno >=0) + if (fs->passno < 0) + fs->passno = 0; + else old_fstab = 0; }