diff options
author | Lukas Czerner <lczerner@redhat.com> | 2011-09-15 23:44:48 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-09-15 23:46:57 -0400 |
commit | c859cb1de0d624caa0779fb17d1a53766143136e (patch) | |
tree | 0cbd868dc9bcda7eeb2463535b38f34aad6587e4 /resize | |
parent | db8bbf27c9eeaa9c1803fb52a6cc7a60c5250c7e (diff) | |
download | e2fsprogs-c859cb1de0d624caa0779fb17d1a53766143136e.tar.gz |
e2fsprogs: create open() and stat() helpers
In many places we are using #ifdef HAVE_OPEN64 to determine if we can
use open64() but that's ugly. This commit creates two new helpers
ext2fs_open_file() for open() and ext2fs_stat() for stat(). Also we need
new typedef ext2fs_struct_stat for struct stat.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'resize')
-rw-r--r-- | resize/main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/resize/main.c b/resize/main.c index 28a49ba2..daa68c5b 100644 --- a/resize/main.c +++ b/resize/main.c @@ -256,11 +256,7 @@ int main (int argc, char ** argv) len = 2 * len; } -#ifdef HAVE_OPEN64 - fd = open64(device_name, O_RDWR); -#else - fd = open(device_name, O_RDWR); -#endif + fd = ext2fs_open_file(device_name, O_RDWR); if (fd < 0) { com_err("open", errno, _("while opening %s"), device_name); |