+2003-03-17 Theodore Ts'o <tytso@mit.edu>
+
+ * configure.in: Fix the Apple Darwin port.
+
2003-03-16 Theodore Ts'o <tytso@mit.edu>
* configure.in: Check to see if libdl exists for the sake of dlopen
MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
LIB_EXT=.so
case "$host_os" in
- darwin.*)
+ darwin*)
MAKEFILE_BSDLIB=$srcdir/lib/Makefile.darwin-lib
LIB_EXT=.dylib
;;
MAKEFILE_BSDLIB=$srcdir/lib/Makefile.bsd-lib
LIB_EXT=.so
[case "$host_os" in
- darwin.*)
+ darwin*)
MAKEFILE_BSDLIB=$srcdir/lib/Makefile.darwin-lib
LIB_EXT=.dylib
;;
+2003-03-17 Theodore Ts'o <tytso@mit.edu>
+
+ * util.c: Explicitly declare e2fsck_global_ctx as extern for the
+ benefit of the Apple Darwin port.
+
2003-03-15 Theodore Ts'o <tytso@mit.edu>
* rehash.c (e2fsck_rehash_dir): If user specified the -n option,
#include "e2fsck.h"
-e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
+extern e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
#include <sys/time.h>
#include <sys/resource.h>
+2003-03-17 Theodore Ts'o <tytso@mit.edu>
+
+ * Makefile.darwin-lib: Fix Apple Darwin port.
+
2003-03-14 Theodore Ts'o <tytso@mit.edu>
* Makefile.darwin-lib: New file to provide support for e2fsprogs
# This is a Makefile stub which handles the creation of Darwin BSD shared
# libraries.
#
-# In order to use this stub, the following makefile variables must be
-efined.
+# In order to use this stub, the following makefile variables must be defined.
#
# BSDLIB_VERSION = 1.0
# BSDLIB_IMAGE = libce
image: $(BSD_LIB)
$(BSD_LIB): $(OBJS)
- (cd pic; $(CC) -dynamiclib -compatibility_version 1.0
- -current_version $(BSDLIB_VERSION) \
+ (cd pic; $(CC) -dynamiclib -compatibility_version 1.0 -current_version $(BSDLIB_VERSION) \
-flat_namespace -undefined warning -o $(BSD_LIB) $(OBJS))
$(MV) pic/$(BSD_LIB) .
$(RM) -f ../$(BSD_LIB)
+2003-03-17 Theodore Ts'o <tytso@mit.edu>
+
+ * getsize.c (blkid_get_dev_size): Fix Apple Darwin port.
+
2003-03-06 <tytso@mit.edu>
* devname.c (probe_one): Fix bug; if a partition has no known
#define BLKGETSIZE _IO(0x12,96) /* return device size */
#endif
+#ifdef APPLE_DARWIN
+#include <sys/ioctl.h>
+#include <sys/disk.h>
+
+#define BLKGETSIZE DKIOCGETBLOCKCOUNT32
+#endif /* APPLE_DARWIN */
+
static int valid_offset(int fd, blkid_loff_t offset)
{
char ch;
struct floppy_struct this_floppy;
#endif
#ifdef HAVE_SYS_DISKLABEL_H
- int part;
+ int part = -1;
struct disklabel lab;
struct partition *pp;
char ch;
+ struct stat st;
#endif /* HAVE_SYS_DISKLABEL_H */
#ifdef BLKGETSIZE
return (blkid_loff_t)this_floppy.size << 9;
#endif
#ifdef HAVE_SYS_DISKLABEL_H
- part = strlen(file) - 1;
- if (part >= 0) {
- ch = file[part];
- if (isdigit(ch))
- part = 0;
- else if (ch >= 'a' && ch <= 'h')
- part = ch - 'a';
- else
- part = -1;
- }
+#if 0
+ /*
+ * This should work in theory but I haven't tested it. Anyone
+ * on a BSD system want to test this for me? In the meantime,
+ * binary search mechanism should work just fine.
+ */
+ if ((fstat(fd, &st) >= 0) && S_ISBLK(st.st_mode))
+ part = st.st_rdev & 7;
if (part >= 0 && (ioctl(fd, DIOCGDINFO, (char *)&lab) >= 0)) {
pp = &lab.d_partitions[part];
if (pp->p_size)
return pp->p_size << 9;
}
+#endif
#endif /* HAVE_SYS_DISKLABEL_H */
/*