e2fsprogs/lib
Eric Sandeen efe0b40146 libext2fs: make fs->group_desc opaque
To prevent direct array indexing of fs->group_desc[i] (because the
group_desc may be a different size for different filesystems) make it
an opaque pointer that may only be accessed through the accessor
functions in blknum.c.  The type itself is still available in a public
header; if we have a group_desc that we know is one type or another,
it's ok to access its fields directly.  This change only prevents us
from indexing off fs->group_desc[i] directly.

Old-style applications who don't want to change their source code can
(as a temporary short-term hack) #define EXT2FS_OLD_32_COMPAT before
including ext2fs.h.

Change the accessors in blknum.c to use ext4fs_group_desc(), a version
of ext2fs_group_desc() which returns a ext4_group_desc pointer.

This simplifies and collapses a fair bit of code in blknum.c

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-06-13 21:00:00 -04:00
..
blkid Don't use in-tree header files if using system uuid or blkid libraries 2009-10-04 14:45:08 -04:00
e2p Merge branch 'maint' into next 2010-06-07 12:42:40 -04:00
et libcom_err: Only output ^M when tty is in raw mode 2010-05-15 07:48:25 -04:00
ext2fs libext2fs: make fs->group_desc opaque 2010-06-13 21:00:00 -04:00
ss libcom_err: Only output ^M when tty is in raw mode 2010-05-15 07:48:25 -04:00
uuid Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.bsd-lib Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.checker Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.darwin-lib Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.elf-lib Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.library Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.profile Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
Makefile.solaris-lib Add configure options --enable-symlink-build and --enable-symlink-install 2010-05-17 19:21:42 -04:00
fpopen.c Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04:00