mirror of https://github.com/vitalif/e2fsprogs
Fix up lots of portability problems that caused e2fsprogs not to build successfully
under Solaris.bitmap-optimize
parent
94ba8c7506
commit
ed78c021c3
|
@ -1,3 +1,8 @@
|
|||
2003-03-06 Theodore Tso <tytso@thunk.org>
|
||||
|
||||
* Makefile.in (.exclude-subset): Include the doc directory in the
|
||||
subset distribution.
|
||||
|
||||
2003-03-02 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* configure.in, Makefile.in: Ignore missing directories so we can
|
||||
|
|
|
@ -179,7 +179,6 @@ $(srcdir)/.exclude-subset:
|
|||
echo "$(SSROOT)/misc" >> $(srcdir)/.exclude-subset
|
||||
echo "$(SSROOT)/tests" >> $(srcdir)/.exclude-subset
|
||||
echo "$(SSROOT)/resize" >> $(srcdir)/.exclude-subset
|
||||
echo "$(SSROOT)/doc" >> $(srcdir)/.exclude-subset
|
||||
echo "$(SSROOT)/contrib" >> $(srcdir)/.exclude-subset
|
||||
echo "$(SSROOT)/po" >> $(srcdir)/.exclude-subset
|
||||
echo "$(SSROOT)/include" >> $(srcdir)/.exclude-subset
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2003-03-06 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* debugfs.c (do_open_filesys, do_show_super_stats),
|
||||
ls.c (do_list_dir), dump.c (do_dump), htree.c (do_htree_dump,
|
||||
do_dx_hash), logdump.c (do_logdump): Reset optind to 1 for better
|
||||
compatibility with non-glibc implementations of getopt.
|
||||
|
||||
2003-03-01 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* Makefile.in, logdump.c (do_logdump): Use the blkid functions to
|
||||
|
|
|
@ -101,7 +101,7 @@ void do_open_filesys(int argc, char **argv)
|
|||
blk_t blocksize = 0;
|
||||
int open_flags = 0;
|
||||
|
||||
optind = 0;
|
||||
optind = 1;
|
||||
#ifdef HAVE_OPTRESET
|
||||
optreset = 1; /* Makes BSD getopt happy */
|
||||
#endif
|
||||
|
@ -242,7 +242,7 @@ void do_show_super_stats(int argc, char *argv[])
|
|||
int numdirs = 0;
|
||||
const char *usage = "Usage: show_super [-h]";
|
||||
|
||||
optind = 0;
|
||||
optind = 1;
|
||||
#ifdef HAVE_OPTRESET
|
||||
optreset = 1; /* Makes BSD getopt happy */
|
||||
#endif
|
||||
|
|
|
@ -149,7 +149,7 @@ void do_dump(int argc, char **argv)
|
|||
const char *dump_usage = "Usage: dump_inode [-p] <file> <output_file>";
|
||||
char *in_fn, *out_fn;
|
||||
|
||||
optind = 0;
|
||||
optind = 1;
|
||||
#ifdef HAVE_OPTRESET
|
||||
optreset = 1; /* Makes BSD getopt happy */
|
||||
#endif
|
||||
|
|
|
@ -193,7 +193,7 @@ void do_htree_dump(int argc, char *argv[])
|
|||
|
||||
pager = open_pager();
|
||||
|
||||
optind = 0;
|
||||
optind = 1;
|
||||
#ifdef HAVE_OPTRESET
|
||||
optreset = 1; /* Makes BSD getopt happy */
|
||||
#endif
|
||||
|
@ -277,7 +277,7 @@ void do_dx_hash(int argc, char *argv[])
|
|||
__u32 hash_seed[4];
|
||||
|
||||
hash_seed[0] = hash_seed[1] = hash_seed[2] = hash_seed[3] = 0;
|
||||
optind = 0;
|
||||
optind = 1;
|
||||
#ifdef HAVE_OPTRESET
|
||||
optreset = 1; /* Makes BSD getopt happy */
|
||||
#endif
|
||||
|
|
|
@ -92,7 +92,7 @@ void do_logdump(int argc, char **argv)
|
|||
struct journal_source journal_source;
|
||||
struct ext2_super_block *es = NULL;
|
||||
|
||||
optind = 0;
|
||||
optind = 1;
|
||||
#ifdef HAVE_OPTRESET
|
||||
optreset = 1; /* Makes BSD getopt happy */
|
||||
#endif
|
||||
|
|
|
@ -125,7 +125,7 @@ void do_list_dir(int argc, char *argv[])
|
|||
if (check_fs_open(argv[0]))
|
||||
return;
|
||||
|
||||
optind = 0;
|
||||
optind = 1;
|
||||
#ifdef HAVE_OPTRESET
|
||||
optreset = 1; /* Makes BSD getopt happy */
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2003-03-06 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* Makefile.in: Don't bomb out if makeinfo or texinfo aren't
|
||||
present. They aren't on all systems.
|
||||
|
||||
2003-03-01 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* libblkid.txt (token): New file which gives basic
|
||||
|
|
|
@ -30,10 +30,10 @@ uninstall-doc-libs:
|
|||
$(RM) -rf $(DESTDIR)$(infodir)/libext2fs.info*
|
||||
|
||||
libext2fs.info: $(srcdir)/libext2fs.texinfo
|
||||
$(INFO) $(srcdir)/libext2fs.texinfo
|
||||
-$(INFO) $(srcdir)/libext2fs.texinfo
|
||||
|
||||
libext2fs.dvi: $(srcdir)/libext2fs.texinfo
|
||||
$(DVI) $(srcdir)/libext2fs.texinfo
|
||||
-$(DVI) $(srcdir)/libext2fs.texinfo
|
||||
|
||||
.PHONY: distclean
|
||||
distclean:: clean
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
2003-03-06 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* blkid_types.h.in: Don't redefine types if other e2fsprogs
|
||||
*_types.h files have been included already.
|
||||
|
||||
* list.h, probe.h: Use static inline instead of extern inline to
|
||||
comply with C99 inline support.
|
||||
|
||||
* devname.c (blkid_probe_all): Avoid GCC extension; don't
|
||||
initialize an array with the address of an automatic
|
||||
variable.
|
||||
|
||||
* Makefile.in: Eliminate -Wall as a C compiler option by default;
|
||||
it's not portable.
|
||||
|
||||
2003-03-02 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* Makefile.in: Don't install list.h, since it's not used by the
|
||||
|
|
|
@ -54,7 +54,7 @@ LIBS_BLKID= $(STATIC_LIBBLKID) $(STATIC_LIBUUID)
|
|||
DEPLIBS_BLKID= $(DEPSTATIC_LIBBLKID) $(DEPSTATIC_LIBUUID)
|
||||
|
||||
.c.o:
|
||||
$(CC) -Wall $(ALL_CFLAGS) -c $< -o $@
|
||||
$(CC) $(ALL_CFLAGS) -c $< -o $@
|
||||
@PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
|
||||
@CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
|
||||
@DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
|
||||
|
@ -71,38 +71,38 @@ libblkid.3: $(DEP_SUBSTITUTE) $(srcdir)/libblkid.3.in
|
|||
$(SUBSTITUTE) $(srcdir)/libblkid.3.in libblkid.3
|
||||
|
||||
tst_cache: $(srcdir)/cache.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_cache -DTEST_PROGRAM $(srcdir)/cache.c $(LIBS_BLKID) $(LIBUUID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_cache -DTEST_PROGRAM $(srcdir)/cache.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
tst_dev: $(srcdir)/dev.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_dev -DTEST_PROGRAM $(srcdir)/dev.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_dev -DTEST_PROGRAM $(srcdir)/dev.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
tst_devname: $(srcdir)/devname.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_devname -DTEST_PROGRAM $(srcdir)/devname.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_devname -DTEST_PROGRAM $(srcdir)/devname.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
tst_devno: $(srcdir)/devno.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_devno -DTEST_PROGRAM $(srcdir)/devno.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_devno -DTEST_PROGRAM $(srcdir)/devno.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
tst_getsize: $(srcdir)/getsize.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_getsize -DTEST_PROGRAM $(srcdir)/getsize.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_getsize -DTEST_PROGRAM $(srcdir)/getsize.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
tst_probe: $(srcdir)/probe.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_probe -DTEST_PROGRAM $(srcdir)/probe.c $(LIBS_BLKID) $(LIBUUID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_probe -DTEST_PROGRAM $(srcdir)/probe.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
tst_read: $(srcdir)/read.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_read -DTEST_PROGRAM $(srcdir)/read.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_read -DTEST_PROGRAM $(srcdir)/read.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
tst_resolve: $(srcdir)/resolve.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_resolve -DTEST_PROGRAM $(srcdir)/resolve.c $(LIBS_BLKID) $(LIBUUID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_resolve -DTEST_PROGRAM $(srcdir)/resolve.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
tst_save: $(srcdir)/save.c $(DEPLIBS_BLKID)
|
||||
$(CC) -Wall -o tst_save -DTEST_PROGRAM $(srcdir)/save.c $(LIBS_BLKID) $(LIBUUID) $(ALL_CFLAGS)
|
||||
$(CC) -o tst_save -DTEST_PROGRAM $(srcdir)/save.c $(LIBS_BLKID) $(ALL_CFLAGS)
|
||||
|
||||
../../misc/blkid.o: $(top_srcdir)/misc/blkid.c blkid.h
|
||||
$(CC) -Wall $(ALL_CFLAGS) -c $(top_srcdir)/misc/blkid.c \
|
||||
$(CC) $(ALL_CFLAGS) -c $(top_srcdir)/misc/blkid.c \
|
||||
-o ../../misc/blkid.o
|
||||
|
||||
blkid: ../../misc/blkid.o libblkid.a $(LIBUUID)
|
||||
$(CC) -Wall -o blkid ../../misc/blkid.o libblkid.a $(LIBUUID)
|
||||
blkid: ../../misc/blkid.o libblkid.a $(DEPLIBUUID)
|
||||
$(CC) -o blkid ../../misc/blkid.o libblkid.a $(LIBUUID)
|
||||
|
||||
check:: all tst_cache tst_devname tst_devno tst_getsize tst_probe \
|
||||
tst_read tst_resolve tst_save
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef _BLKID_TYPES_H
|
||||
#define _BLKID_TYPES_H
|
||||
|
||||
/*
|
||||
* If linux/types.h is already been included, assume it has defined
|
||||
* everything we need. (cross fingers)
|
||||
* everything we need. (cross fingers) Other header files may have
|
||||
* also defined the types that we need.
|
||||
*/
|
||||
#ifndef _LINUX_TYPES_H
|
||||
#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
|
||||
!defined(_UUID_TYPES) && !defined(_EXT2_TYPES_H))
|
||||
#define _BLKID_TYPES_H
|
||||
|
||||
typedef unsigned char __u8;
|
||||
typedef signed char __s8;
|
||||
|
@ -48,6 +48,4 @@ typedef unsigned short __u32;
|
|||
?== error: undefined 32 bit type
|
||||
#endif
|
||||
|
||||
#endif /* LINUX_TYPES_H */
|
||||
|
||||
#endif /* BLKID_TYPES_H */
|
||||
#endif /* _*_TYPES_H */
|
||||
|
|
|
@ -266,13 +266,16 @@ int blkid_probe_all(blkid_cache cache)
|
|||
FILE *proc;
|
||||
char line[1024];
|
||||
char ptname0[128], ptname1[128], *ptname = 0;
|
||||
char *ptnames[2] = { ptname0, ptname1 };
|
||||
char *ptnames[2];
|
||||
dev_t devs[2];
|
||||
int ma, mi;
|
||||
unsigned long long sz;
|
||||
int lens[2] = { 0, 0 };
|
||||
int which = 0, last = 0;
|
||||
|
||||
ptnames[0] = ptname0;
|
||||
ptnames[1] = ptname1;
|
||||
|
||||
if (!cache)
|
||||
return -BLKID_ERR_PARAM;
|
||||
|
||||
|
|
|
@ -5,6 +5,12 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _INLINE_ static __inline__
|
||||
#else /* For Watcom C */
|
||||
#define _INLINE_ static inline
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Simple doubly linked list implementation.
|
||||
*
|
||||
|
@ -34,7 +40,7 @@ struct list_head {
|
|||
* This is only for internal list manipulation where we know
|
||||
* the prev/next entries already!
|
||||
*/
|
||||
static __inline__ void __list_add(struct list_head * add,
|
||||
_INLINE_ void __list_add(struct list_head * add,
|
||||
struct list_head * prev,
|
||||
struct list_head * next)
|
||||
{
|
||||
|
@ -52,7 +58,7 @@ static __inline__ void __list_add(struct list_head * add,
|
|||
* Insert a new entry after the specified head.
|
||||
* This is good for implementing stacks.
|
||||
*/
|
||||
static __inline__ void list_add(struct list_head *add, struct list_head *head)
|
||||
_INLINE_ void list_add(struct list_head *add, struct list_head *head)
|
||||
{
|
||||
__list_add(add, head, head->next);
|
||||
}
|
||||
|
@ -65,7 +71,7 @@ static __inline__ void list_add(struct list_head *add, struct list_head *head)
|
|||
* Insert a new entry before the specified head.
|
||||
* This is useful for implementing queues.
|
||||
*/
|
||||
static __inline__ void list_add_tail(struct list_head *add, struct list_head *head)
|
||||
_INLINE_ void list_add_tail(struct list_head *add, struct list_head *head)
|
||||
{
|
||||
__list_add(add, head->prev, head);
|
||||
}
|
||||
|
@ -77,7 +83,7 @@ static __inline__ void list_add_tail(struct list_head *add, struct list_head *he
|
|||
* This is only for internal list manipulation where we know
|
||||
* the prev/next entries already!
|
||||
*/
|
||||
static __inline__ void __list_del(struct list_head * prev,
|
||||
_INLINE_ void __list_del(struct list_head * prev,
|
||||
struct list_head * next)
|
||||
{
|
||||
next->prev = prev;
|
||||
|
@ -91,7 +97,7 @@ static __inline__ void __list_del(struct list_head * prev,
|
|||
* list_empty() on @entry does not return true after this, @entry is
|
||||
* in an undefined state.
|
||||
*/
|
||||
static __inline__ void list_del(struct list_head *entry)
|
||||
_INLINE_ void list_del(struct list_head *entry)
|
||||
{
|
||||
__list_del(entry->prev, entry->next);
|
||||
}
|
||||
|
@ -100,7 +106,7 @@ static __inline__ void list_del(struct list_head *entry)
|
|||
* list_del_init - deletes entry from list and reinitialize it.
|
||||
* @entry: the element to delete from the list.
|
||||
*/
|
||||
static __inline__ void list_del_init(struct list_head *entry)
|
||||
_INLINE_ void list_del_init(struct list_head *entry)
|
||||
{
|
||||
__list_del(entry->prev, entry->next);
|
||||
INIT_LIST_HEAD(entry);
|
||||
|
@ -110,7 +116,7 @@ static __inline__ void list_del_init(struct list_head *entry)
|
|||
* list_empty - tests whether a list is empty
|
||||
* @head: the list to test.
|
||||
*/
|
||||
static __inline__ int list_empty(struct list_head *head)
|
||||
_INLINE_ int list_empty(struct list_head *head)
|
||||
{
|
||||
return head->next == head;
|
||||
}
|
||||
|
@ -120,7 +126,7 @@ static __inline__ int list_empty(struct list_head *head)
|
|||
* @list: the new list to add.
|
||||
* @head: the place to add it in the first list.
|
||||
*/
|
||||
static __inline__ void list_splice(struct list_head *list, struct list_head *head)
|
||||
_INLINE_ void list_splice(struct list_head *list, struct list_head *head)
|
||||
{
|
||||
struct list_head *first = list->next;
|
||||
|
||||
|
@ -164,6 +170,8 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
|
|||
for (pos = (head)->next, pnext = pos->next; pos != (head); \
|
||||
pos = pnext, pnext = pos->next)
|
||||
|
||||
#undef _INLINE_
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -194,14 +194,14 @@ struct hfs_super_block {
|
|||
* Byte swap functions
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#define _INLINE_ extern __inline__
|
||||
#define _INLINE_ static __inline__
|
||||
#else /* For Watcom C */
|
||||
#define _INLINE_ extern inline
|
||||
#define _INLINE_ static inline
|
||||
#endif
|
||||
|
||||
extern __u16 blkid_swab16(__u16 val);
|
||||
extern __u32 blkid_swab32(__u32 val);
|
||||
extern __u64 blkid_swab64(__u64 val);
|
||||
static __u16 blkid_swab16(__u16 val);
|
||||
static __u32 blkid_swab32(__u32 val);
|
||||
static __u64 blkid_swab64(__u64 val);
|
||||
|
||||
#if ((defined __GNUC__) && \
|
||||
(defined(__i386__) || defined(__i486__) || defined(__i586__)))
|
||||
|
@ -250,7 +250,7 @@ _INLINE_ __u32 blkid_swab32(__u32 val)
|
|||
((val<<8)&0xFF0000) | (val<<24));
|
||||
}
|
||||
|
||||
_INLINE_ u64 blkid_swab64(__u64 val)
|
||||
_INLINE_ __u64 blkid_swab64(__u64 val)
|
||||
{
|
||||
return (blkid_swab32(val >> 32) |
|
||||
(((__u64) blkid_swab32(val & 0xFFFFFFFFUL)) << 32));
|
||||
|
@ -275,4 +275,6 @@ _INLINE_ u64 blkid_swab64(__u64 val)
|
|||
#define blkid_be64(x) blkid_swab64(x)
|
||||
#endif
|
||||
|
||||
#undef _INLINE_
|
||||
|
||||
#endif /* _BLKID_PROBE_H */
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
2003-03-06 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* ext2_types.h.in: Don't redefine types if other e2fsprogs
|
||||
*_types.h files have been included already.
|
||||
|
||||
* kernel-jbd.h: Use C99 variadic cpp macros if not using GCC.
|
||||
(Older GCC's don't support the C99 variadic macros.)
|
||||
|
||||
* flushb.c (ext2fs_sync_device),
|
||||
ismounted.c (ext2fs_check_mount_point): Avoid GCC extension:
|
||||
#warning not supported by Solaris suncc
|
||||
|
||||
* ext2_ext_attr.h: Avoid GCC extension: 0 length arrays in
|
||||
structure definition. Not needed for now in
|
||||
ext2_ext_attr_entry.
|
||||
|
||||
2003-01-25 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* dirhash.c: Fix gcc -Wall nits.
|
||||
|
|
|
@ -28,7 +28,9 @@ struct ext2_ext_attr_entry {
|
|||
__u32 e_value_block; /* disk block attribute is stored on (n/i) */
|
||||
__u32 e_value_size; /* size of attribute value */
|
||||
__u32 e_hash; /* hash value of name and value */
|
||||
#if 0
|
||||
char e_name[0]; /* attribute name */
|
||||
#endif
|
||||
};
|
||||
|
||||
#define EXT2_EXT_ATTR_PAD_BITS 2
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef _EXT2_TYPES_H
|
||||
#define _EXT2_TYPES_H
|
||||
|
||||
/*
|
||||
* If linux/types.h is already been included, assume it has defined
|
||||
* everything we need. (cross fingers)
|
||||
* everything we need. (cross fingers) Other header files may have
|
||||
* also defined the types that we need.
|
||||
*/
|
||||
#ifndef _LINUX_TYPES_H
|
||||
#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
|
||||
!defined(_UUID_TYPES) && !defined(_EXT2_TYPES_H))
|
||||
#define _EXT2_TYPES_H
|
||||
|
||||
typedef unsigned char __u8;
|
||||
typedef signed char __s8;
|
||||
|
@ -48,6 +48,4 @@ typedef unsigned short __u32;
|
|||
?== error: undefined 32 bit type
|
||||
#endif
|
||||
|
||||
#endif /* LINUX_TYPES_H */
|
||||
|
||||
#endif /* EXT2_TYPES_H */
|
||||
#endif /* _*_TYPES_H */
|
||||
|
|
|
@ -65,12 +65,16 @@ errcode_t ext2fs_sync_device(int fd, int flushb)
|
|||
if (ioctl (fd, BLKFLSBUF, 0) == 0)
|
||||
return 0;
|
||||
#else
|
||||
#warning BLKFLSBUF not defined
|
||||
#ifdef __GNUC__
|
||||
#warning BLKFLSBUF not defined
|
||||
#endif
|
||||
#endif
|
||||
#ifdef FDFLUSH
|
||||
ioctl (fd, FDFLUSH, 0); /* In case this is a floppy */
|
||||
#else
|
||||
#warning FDFLUSH not defined
|
||||
#ifdef __GNUC__
|
||||
#warning FDFLUSH not defined
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -296,7 +296,9 @@ errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags,
|
|||
#ifdef HAVE_GETMNTINFO
|
||||
return check_getmntinfo(device, mount_flags, mtpt, mtlen);
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#warning "Can't use getmntent or getmntinfo to check for mounted filesystems!"
|
||||
#endif
|
||||
*mount_flags = 0;
|
||||
return 0;
|
||||
#endif /* HAVE_GETMNTINFO */
|
||||
|
|
|
@ -30,6 +30,10 @@
|
|||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __FUNCTION__ ""
|
||||
#endif
|
||||
|
||||
#define journal_oom_retry 1
|
||||
|
||||
#ifdef __STDC__
|
||||
|
@ -51,7 +55,11 @@ extern int journal_enable_debug;
|
|||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#define jbd_debug(f, a...) /**/
|
||||
#else
|
||||
#define jbd_debug(f, ...) /**/
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define jbd_debug(x) /* AIX doesn't do STDC */
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
2003-03-06 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* uuid_types.h.in: Don't redefine types if other e2fsprogs
|
||||
*_types.h files have been included already.
|
||||
|
||||
* Makefile.in (tst_uuid): Link against the static library instead
|
||||
of all of the object files, so that we automatically pick
|
||||
up -lsocket under Solaris.
|
||||
|
||||
2003-03-02 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* Makefile.in, uuidP.h, uuid_types.h.in: Use uuid_types.h instead
|
||||
|
|
|
@ -90,8 +90,8 @@ $(top_builddir)/lib/uuid/uuid_types.h: $(srcdir)/uuid_types.h.in $(top_builddir)
|
|||
tst_uuid.o: $(srcdir)/tst_uuid.c
|
||||
$(CC) $(ALL_CFLAGS) -c $(srcdir)/tst_uuid.c -o tst_uuid.o
|
||||
|
||||
tst_uuid: tst_uuid.o $(DEPLIBUUID)
|
||||
$(CC) $(ALL_LDFLAGS) -o tst_uuid tst_uuid.o $(OBJS)
|
||||
tst_uuid: tst_uuid.o $(DEPSTATIC_LIBUUID)
|
||||
$(CC) $(ALL_LDFLAGS) -o tst_uuid tst_uuid.o $(STATIC_LIBUUID)
|
||||
|
||||
uuid_time: $(srcdir)/uuid_time.c $(DEPLIBUUID)
|
||||
$(CC) $(ALL_CFLAGS) -DDEBUG -o uuid_time $(srcdir)/uuid_time.c \
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#ifndef _UUID_TYPES_H
|
||||
#define _UUID_TYPES_H
|
||||
|
||||
/*
|
||||
* If linux/types.h is already been included, assume it has defined
|
||||
* everything we need. (cross fingers)
|
||||
* everything we need. (cross fingers) Other header files may have
|
||||
* also defined the types that we need.
|
||||
*/
|
||||
#ifndef _LINUX_TYPES_H
|
||||
#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
|
||||
!defined(_UUID_TYPES) && !defined(_EXT2_TYPES_H))
|
||||
#define _UUID_TYPES_H
|
||||
|
||||
typedef unsigned char __u8;
|
||||
typedef signed char __s8;
|
||||
|
@ -48,6 +48,4 @@ typedef unsigned short __u32;
|
|||
?== error: undefined 32 bit type
|
||||
#endif
|
||||
|
||||
#endif /* LINUX_TYPES_H */
|
||||
|
||||
#endif /* UUID_TYPES_H */
|
||||
#endif /* _*_TYPES_H */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2003-03-06 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* Makefile.in (DEPLIBS_BLKID): Use DEPLIBUUID, not LIBUUID to
|
||||
avoid depending on -lsocket on Solaris.
|
||||
|
||||
2003-03-01 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* fsck.c, util.c, tune2fs.c, Makefile.in: Use the blkid library
|
||||
|
|
|
@ -46,7 +46,7 @@ STATIC_LIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
|
|||
STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
|
||||
|
||||
LIBS_BLKID= $(LIBBLKID) $(LIBUUID)
|
||||
DEPLIBS_BLKID= $(LIBBLKID) $(LIBUUID)
|
||||
DEPLIBS_BLKID= $(LIBBLKID) $(DEPLIBUUID)
|
||||
|
||||
LIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR)
|
||||
DEPLIBS_E2P= $(LIBEXT2FS) $(LIBE2P) $(LIBCOM_ERR)
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2003-03-06 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* run_e2fsck, defaults/e_script: Solaris doesn't support "tr -d \r",
|
||||
so use "tr -d \015" instead.
|
||||
|
||||
* tests/f_swapfs/script: Avoid bash'ism; Solaris doesn't support
|
||||
put a ! character in a "if ! cmd ; then .. fi" construct.
|
||||
|
||||
2002-11-09 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* Release of E2fsprogs 1.32
|
||||
|
|
|
@ -29,7 +29,7 @@ else
|
|||
fi
|
||||
|
||||
cat $SRCDIR/progs/test_data/$instance.setup $SRCDIR/progs/test_data/test.$class \
|
||||
| $TEST_PROG -f - 2>&1 | tr -d '\r' > $OUT
|
||||
| $TEST_PROG -f - 2>&1 | tr -d \\015 > $OUT
|
||||
|
||||
cmp -s $EXPECT $OUT
|
||||
status=$?
|
||||
|
|
|
@ -1,80 +1,79 @@
|
|||
if ! $FSCK -SV > /dev/null 2>&1 ; then
|
||||
rm -f $test_name.ok $test_name.failed
|
||||
echo "skipped"
|
||||
if $FSCK -SV > /dev/null 2>&1 ; then
|
||||
IMAGE=$test_dir/image.gz
|
||||
VERIFY_FSCK_OPT=-yf
|
||||
SWAP_FSCK_OPT=-Sy
|
||||
NATIVE_FSCK_OPT=-sy
|
||||
OUT=$test_name.log
|
||||
EXP=$test_dir/expect
|
||||
|
||||
gunzip < $IMAGE > $TMPFILE
|
||||
|
||||
echo "Swapfs test" > $OUT
|
||||
|
||||
echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
|
||||
echo e2fsck $SWAP_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $SWAP_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
|
||||
echo Running debugfs.... >> $OUT
|
||||
$DEBUGFS -f $test_dir/debugfs.cmd $TMPFILE > $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '1d' $OUT.new >> $OUT
|
||||
|
||||
echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
|
||||
echo e2fsck $NATIVE_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $NATIVE_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
|
||||
echo Running debugfs.... >> $OUT
|
||||
$DEBUGFS -f $test_dir/debugfs.cmd $TMPFILE > $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '1d' $OUT.new >> $OUT
|
||||
|
||||
echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
rm -f $OUT.new
|
||||
|
||||
rm $TMPFILE
|
||||
|
||||
#
|
||||
# Do the verification
|
||||
#
|
||||
|
||||
rm -f $test_name.ok $test_name.failed
|
||||
cmp -s $OUT $EXP
|
||||
status=$?
|
||||
|
||||
if [ "$status" = 0 ] ; then
|
||||
echo "ok"
|
||||
touch $test_name.ok
|
||||
else
|
||||
echo "failed"
|
||||
diff -c $EXP $OUT > $test_name.failed
|
||||
fi
|
||||
|
||||
unset IMAGE VERIFY_FSCK_OPT SWAP_FSCK_OPT NATIVE_FSCK_OPT OUT EXP
|
||||
|
||||
else
|
||||
|
||||
IMAGE=$test_dir/image.gz
|
||||
VERIFY_FSCK_OPT=-yf
|
||||
SWAP_FSCK_OPT=-Sy
|
||||
NATIVE_FSCK_OPT=-sy
|
||||
OUT=$test_name.log
|
||||
EXP=$test_dir/expect
|
||||
|
||||
gunzip < $IMAGE > $TMPFILE
|
||||
|
||||
echo "Swapfs test" > $OUT
|
||||
|
||||
echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
|
||||
echo e2fsck $SWAP_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $SWAP_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
|
||||
echo Running debugfs.... >> $OUT
|
||||
$DEBUGFS -f $test_dir/debugfs.cmd $TMPFILE > $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '1d' $OUT.new >> $OUT
|
||||
|
||||
echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
|
||||
echo e2fsck $NATIVE_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $NATIVE_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
|
||||
echo Running debugfs.... >> $OUT
|
||||
$DEBUGFS -f $test_dir/debugfs.cmd $TMPFILE > $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '1d' $OUT.new >> $OUT
|
||||
|
||||
echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
|
||||
$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT.new
|
||||
sed -e '2d' $OUT.new >> $OUT
|
||||
rm -f $OUT.new
|
||||
|
||||
rm $TMPFILE
|
||||
|
||||
#
|
||||
# Do the verification
|
||||
#
|
||||
|
||||
rm -f $test_name.ok $test_name.failed
|
||||
cmp -s $OUT $EXP
|
||||
status=$?
|
||||
|
||||
if [ "$status" = 0 ] ; then
|
||||
echo "ok"
|
||||
touch $test_name.ok
|
||||
else
|
||||
echo "failed"
|
||||
diff -c $EXP $OUT > $test_name.failed
|
||||
fi
|
||||
|
||||
unset IMAGE VERIFY_FSCK_OPT SWAP_FSCK_OPT NATIVE_FSCK_OPT OUT EXP
|
||||
|
||||
rm -f $test_name.ok $test_name.failed
|
||||
echo "skipped"
|
||||
fi
|
||||
|
|
|
@ -33,7 +33,7 @@ eval $PREP_CMD
|
|||
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT1.new 2>&1
|
||||
status=$?
|
||||
echo Exit status is $status >> $OUT1.new
|
||||
sed -e '1d' $OUT1.new | sed -e '/^JFS DEBUG:/d' | tr -d '\r' > $OUT1
|
||||
sed -e '1d' $OUT1.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 > $OUT1
|
||||
rm -f $OUT1.new
|
||||
|
||||
if [ "$ONE_PASS_ONLY" != "true" ]; then
|
||||
|
|
Loading…
Reference in New Issue