mirror of https://github.com/vitalif/e2fsprogs
e2fsck/flushb.c and lib/ext2fs/flushb.c: Use platform independent
method of defining the BLKFLSBUF and FDFLUSH ioctl's. Also include sys/mount.h since on newer glibc's BLKFLSBUF is defined there.bitmap-optimize
parent
16645f802a
commit
d90f3494b2
|
@ -1,3 +1,9 @@
|
||||||
|
2001-06-22 Theodore Tso <tytso@valinux.com>
|
||||||
|
|
||||||
|
* flushb.c: Use platform independent method of defining the
|
||||||
|
BLKFLSBUF ioctl. Also include sys/mount.h since on newer
|
||||||
|
platforms BLKFLSBUF is defined there.
|
||||||
|
|
||||||
2001-06-19 Theodore Tso <tytso@valinux.com>
|
2001-06-19 Theodore Tso <tytso@valinux.com>
|
||||||
|
|
||||||
* super.c (release_inode_blocks): Don't try to release the blocks
|
* super.c (release_inode_blocks): Don't try to release the blocks
|
||||||
|
|
|
@ -29,11 +29,12 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
#include "../misc/nls-enable.h"
|
#include "../misc/nls-enable.h"
|
||||||
|
|
||||||
/* For Linux/i386, define BLKFLSBUF */
|
/* For Linux, define BLKFLSBUF if necessary */
|
||||||
#if (!defined(BLKFLSBUF) && defined(__i386__))
|
#if (!defined(BLKFLSBUF) && defined(__linux__))
|
||||||
#define BLKFLSBUF 0x1261 /* flush buffer cache */
|
#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *progname;
|
const char *progname;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
2001-06-22 Theodore Tso <tytso@valinux.com>
|
2001-06-22 Theodore Tso <tytso@valinux.com>
|
||||||
|
|
||||||
|
* flushb.c: Use platform independent method of defining the
|
||||||
|
BLKFLSBUF and FDFLUSH ioctl's. Also include sys/mount.h
|
||||||
|
since on newer glibc's BLKFLSBUF is defined there.
|
||||||
|
|
||||||
* bitops.h: The C language versions of ext2fs_swab16/32 need to be
|
* bitops.h: The C language versions of ext2fs_swab16/32 need to be
|
||||||
included if EXT2FS_ENABLE_SWAPFS is defined, since we need
|
included if EXT2FS_ENABLE_SWAPFS is defined, since we need
|
||||||
to support byte swapping even if we don't support the
|
to support byte swapping even if we don't support the
|
||||||
|
|
|
@ -20,21 +20,26 @@
|
||||||
#if HAVE_SYS_IOCTL_H
|
#if HAVE_SYS_IOCTL_H
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if HAVE_SYS_MOUNT_H
|
||||||
|
#include <sys/mount.h> /* This may define BLKFLSBUF */
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "ext2_fs.h"
|
#include "ext2_fs.h"
|
||||||
#include "ext2fs.h"
|
#include "ext2fs.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For Linux/i386, define BLKFLSBUF and FDFLUSH if necessary, since
|
* For Linux, define BLKFLSBUF and FDFLUSH if necessary, since
|
||||||
* no portable header file does so for us. This really should be
|
* not all portable header file does so for us. This really should be
|
||||||
* fixed in the glibc header files. Until then....
|
* fixed in the glibc header files. (Recent glibcs appear to define
|
||||||
|
* BLKFLSBUF in sys/mount.h, but FDFLUSH still doesn't seem to be
|
||||||
|
* defined anywhere portable.) Until then....
|
||||||
*/
|
*/
|
||||||
#if (defined(__i386__) && defined(__linux__))
|
#ifdef __linux__
|
||||||
#ifndef BLKFLSBUF
|
#ifndef BLKFLSBUF
|
||||||
#define BLKFLSBUF 0x1261 /* flush buffer cache */
|
#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
|
||||||
#endif
|
#endif
|
||||||
#ifndef FDFLUSH
|
#ifndef FDFLUSH
|
||||||
#define FDFLUSH 0x024b /* flush floppy disk */
|
#define FDFLUSH _IO(2,0x4b) /* flush floppy disk */
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue