Rev openSUSE:Factory/34 Md5 8d59640760375c9114a9b52df81e1105 2008-09-05 18:13:55 unknown None

This commit is contained in:
OBS User unknown 2008-09-05 18:13:55 +00:00 committed by Git OBS Bridge
parent d324f093ac
commit 2565a2cf14
12 changed files with 551 additions and 378 deletions

1
.gitattributes vendored
View File

@ -22,5 +22,4 @@
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
e2fsprogs-1.41.0.de.po filter=lfs diff=lfs merge=lfs -text
e2fsprogs-no_cmd_hiding.patch filter=lfs diff=lfs merge=lfs -text

View File

@ -1,22 +0,0 @@
--- misc/partinfo.c
+++ misc/partinfo.c
@@ -43,7 +43,7 @@
#endif
if (argc == 1) {
fprintf(stderr, _("Usage: %s device...\n\nPrints out the"
- "partition information for each given device.\n"),
+ " partition information for each given device.\n"),
"For example: %s /dev/hda\n\n", argv[0], argv[0]);
exit(1);
}
--- resize/online.c
+++ resize/online.c
@@ -178,7 +178,7 @@
return 0;
#else
printf(_("Filesystem at %s is mounted on %s, and on-line resizing is"
- "not supported on this system.\n"), fs->device_name, mtpt);
+ " not supported on this system.\n"), fs->device_name, mtpt);
exit(1);
#endif
}

View File

@ -1,26 +0,0 @@
Index: e2fsprogs-1.41.0/e2fsck/Makefile.in
===================================================================
--- e2fsprogs-1.41.0.orig/e2fsck/Makefile.in 2008-06-19 17:57:59.000000000 +0200
+++ e2fsprogs-1.41.0/e2fsck/Makefile.in 2008-07-11 15:19:01.000000000 +0200
@@ -138,7 +138,7 @@ crc32table.h: gen_crc32table
tst_crc32: $(srcdir)/crc32.c $(LIBEXT2FS)
@$(CC) $(BUILD_LDFLAGS) $(ALL_CFLAGS) -o tst_crc32 $(srcdir)/crc32.c \
- -DUNITTEST $(LIBEXT2FS)
+ -DUNITTEST $(LIBEXT2FS) $(LIBCOM_ERR)
tst_refcount: ea_refcount.c
@echo " LD $@"
@@ -151,9 +151,9 @@ tst_region: region.c
$(ALL_CFLAGS) -DTEST_PROGRAM $(LIBCOM_ERR)
check:: tst_refcount tst_region tst_crc32
- ./tst_refcount
- ./tst_region
- ./tst_crc32
+ LD_LIBRARY_PATH=$(top_builddir)/lib ./tst_refcount
+ LD_LIBRARY_PATH=$(top_builddir)/lib ./tst_region
+ LD_LIBRARY_PATH=$(top_builddir)/lib ./tst_crc32
extend: extend.o
@echo " LD $@"

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fe0ccf6cbc3157ffa6492a0599052c65ae2ace0ddd741d24be780f9f2dc25b1b
size 144353

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d917cc9e6153f644ed91b0a5af6a3a10c47712d2335fd0dd6fcaa7088e612fc2
size 3823614

View File

@ -0,0 +1,188 @@
commit 55da987650b36a1b910a5968f7d83a190827f8bb
Author: Theodore Ts'o <tytso@mit.edu>
Date: Tue Sep 2 23:12:38 2008 -0400
Improve ELF shared library handling
Pass in -rpath-link option to the linker so that blkid will build
correctly on systems that don't have libcom_err.so.2 installed.
Fix debugfs to only try to link with -ldl when building without shared
libraries; with ELF shared libraries, the library which requires -ldl
(libss.so) can required the library dependency itself.
Fix how we build tune2fs.static so that we use @LDFLAG_STATIC@, via
$(LDFLAGS_STATIC), instead of hard-coding the use of -static.
Addresses-Sourceforge-Bug: #2088537
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/MCONFIG.in b/MCONFIG.in
index 554b5b5..2f32b92 100644
--- a/MCONFIG.in
+++ b/MCONFIG.in
@@ -41,7 +41,8 @@ INTL_FLAGS = @INTL_FLAGS@
ALL_CFLAGS = $(CPPFLAGS) $(DEFS) $(USE_WFLAGS) $(CFLAGS) $(XTRA_CFLAGS) \
$(INTL_FLAGS) $(LINUX_INCLUDE)
LDFLAGS = @LDFLAGS@
-ALL_LDFLAGS = $(LDFLAGS)
+ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@
+LDFLAGS_STATIC = $(LDFLAGS) @LDFLAG_STATIC@
BUILD_CFLAGS = @BUILD_CFLAGS@
BUILD_LDFLAGS = @BUILD_LDFLAGS@
RM = @RM@
@@ -69,7 +70,7 @@ MKINSTALLDIRS = @MKINSTALLDIRS@
# Library definitions
#
LIB = $(top_builddir)/lib
-LIBSS = $(LIB)/libss@LIB_EXT@ @DLOPEN_LIB@
+LIBSS = $(LIB)/libss@LIB_EXT@ @PRIVATE_LIBS_CMT@ @DLOPEN_LIB@
LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@
LIBE2P = $(LIB)/libe2p@LIB_EXT@
LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@
diff --git a/configure b/configure
index 5cf203e..0e3bdbe 100755
--- a/configure
+++ b/configure
@@ -684,6 +684,8 @@ CHECKER_CMT
LIB_EXT
STATIC_LIB_EXT
PROFILED_LIB_EXT
+LDFLAG_DYNAMIC
+PRIVATE_LIBS_CMT
TEST_IO_CMT
DEBUGFS_CMT
IMAGER_CMT
@@ -3842,6 +3844,8 @@ fi
E2_PKG_CONFIG_STATIC=--static
+LDFLAG_DYNAMIC=
+PRIVATE_LIBS_CMT=
# Check whether --enable-elf-shlibs was given.
if test "${enable_elf_shlibs+set}" = set; then
enableval=$enable_elf_shlibs; if test "$enableval" = "no"
@@ -3861,6 +3865,8 @@ else
esac
BINARY_TYPE=elfbin
LIB_EXT=.so
+ PRIVATE_LIBS_CMT=#
+ LDFLAG_DYNAMIC='-Wl,-rpath-link,$(top_builddir)/lib'
{ echo "$as_me:$LINENO: result: Enabling ELF shared libraries" >&5
echo "${ECHO_T}Enabling ELF shared libraries" >&6; }
fi
@@ -3962,6 +3968,8 @@ fi
+
+
# Check whether --enable-jbd-debug was given.
if test "${enable_jbd_debug+set}" = set; then
enableval=$enable_jbd_debug; if test "$enableval" = "no"
@@ -15902,8 +15910,8 @@ CHECKER_CMT!$CHECKER_CMT$ac_delim
LIB_EXT!$LIB_EXT$ac_delim
STATIC_LIB_EXT!$STATIC_LIB_EXT$ac_delim
PROFILED_LIB_EXT!$PROFILED_LIB_EXT$ac_delim
-TEST_IO_CMT!$TEST_IO_CMT$ac_delim
-DEBUGFS_CMT!$DEBUGFS_CMT$ac_delim
+LDFLAG_DYNAMIC!$LDFLAG_DYNAMIC$ac_delim
+PRIVATE_LIBS_CMT!$PRIVATE_LIBS_CMT$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then
@@ -15977,6 +15985,8 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+TEST_IO_CMT!$TEST_IO_CMT$ac_delim
+DEBUGFS_CMT!$DEBUGFS_CMT$ac_delim
IMAGER_CMT!$IMAGER_CMT$ac_delim
RESIZER_CMT!$RESIZER_CMT$ac_delim
FSCK_PROG!$FSCK_PROG$ac_delim
@@ -16060,7 +16070,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 83; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -16508,4 +16518,3 @@ if test "$no_create" != yes; then
fi
if test -f util/gen-tarball; then chmod +x util/gen-tarball; fi
-
diff --git a/configure.in b/configure.in
index fcca2ac..7ec6945 100644
--- a/configure.in
+++ b/configure.in
@@ -211,6 +211,8 @@ dnl
dnl This needs to be before all of the --enable-*-shlibs options
dnl
E2_PKG_CONFIG_STATIC=--static
+LDFLAG_DYNAMIC=
+PRIVATE_LIBS_CMT=
dnl
dnl handle --enable-elf-shlibs
dnl
@@ -232,6 +234,8 @@ else
esac]
BINARY_TYPE=elfbin
LIB_EXT=.so
+ PRIVATE_LIBS_CMT=#
+ LDFLAG_DYNAMIC=['-Wl,-rpath-link,$(top_builddir)/lib']
AC_MSG_RESULT([Enabling ELF shared libraries])
fi
,
@@ -322,6 +326,8 @@ dnl
AC_SUBST(LIB_EXT)
AC_SUBST(STATIC_LIB_EXT)
AC_SUBST(PROFILED_LIB_EXT)
+AC_SUBST(LDFLAG_DYNAMIC)
+AC_SUBST(PRIVATE_LIBS_CMT)
dnl
dnl handle --enable-jbd-debug
dnl
@@ -921,4 +927,3 @@ for i in MCONFIG Makefile e2fsprogs.spec \
done
AC_OUTPUT($outlist)
if test -f util/gen-tarball; then chmod +x util/gen-tarball; fi
-
diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in
index 7006b62..fe0fab5 100644
--- a/e2fsck/Makefile.in
+++ b/e2fsck/Makefile.in
@@ -8,7 +8,6 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = e2fsck
INSTALL = @INSTALL@
-LDFLAG_STATIC = @LDFLAG_STATIC@
@MCONFIG@
@@ -119,8 +118,7 @@ e2fsck: $(OBJS) $(DEPLIBS)
e2fsck.static: $(OBJS) $(STATIC_DEPLIBS)
@echo " LD $@"
- @$(LD) $(ALL_LDFLAGS) $(LDFLAG_STATIC) -o e2fsck.static $(OBJS) \
- $(STATIC_LIBS)
+ @$(LD) $(LDFLAGS_STATIC) -o e2fsck.static $(OBJS) $(STATIC_LIBS)
e2fsck.profiled: $(PROFILED_OBJS) $(PROFILED_DEPLIBS)
@echo " LD $@"
diff --git a/misc/Makefile.in b/misc/Makefile.in
index a81df8a..c208571 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -108,7 +108,7 @@ tune2fs: $(TUNE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBS_BLKID)
tune2fs.static: $(TUNE2FS_OBJS) $(STATIC_DEPLIBS) $(STATIC_LIBE2P) $(DEPSTATIC_LIBBLKID)
@echo " LD $@"
- @$(CC) $(ALL_LDFLAGS) -static -o tune2fs.static $(TUNE2FS_OBJS) \
+ @$(CC) $(LDFLAGS_STATIC) -o tune2fs.static $(TUNE2FS_OBJS) \
$(STATIC_LIBS) $(STATIC_LIBBLKID) $(STATIC_LIBUUID) \
$(STATIC_LIBE2P) $(LIBINTL)

3
e2fsprogs-1.41.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cd873d5653ef8d9e0c9003feb93980ec54b358521dfc65163b84e8e3ebfe84fb
size 3856795

View File

@ -1,6 +1,8 @@
--- e2fsprogs-1.41.0/misc/base_device.c
+++ e2fsprogs-1.41.0/misc/base_device.c
@@ -31,125 +31,170 @@
Index: e2fsprogs-1.41.1/misc/base_device.c
===================================================================
--- e2fsprogs-1.41.1.orig/misc/base_device.c 2008-08-28 16:26:31.000000000 +0200
+++ e2fsprogs-1.41.1/misc/base_device.c 2008-09-04 15:08:22.000000000 +0200
@@ -31,125 +31,169 @@
#include "fsck.h"
/*
@ -34,7 +36,7 @@
- /* Skip over /dev/dsk/... */
- if (strncmp(cp, "dsk/", 4) == 0)
- cp += 4;
-
-
- /*
- * For md devices, we treat them all as if they were all
- * on one disk, since we don't know how to parallelize them.
@ -42,9 +44,137 @@
- if (cp[0] == 'm' && cp[1] == 'd') {
- *(cp+2) = 0;
- return str;
- }
+ struct stat statbuf;
+ unsigned int dev_major, dev_minor, disk_minor;
+
+ if (stat(device, &statbuf) < 0) {
+ fprintf(stderr,"error on stat() %s: %s\n",
+ device, strerror(errno));
+ return 0;
+ }
+
+ if (!S_ISBLK(statbuf.st_mode))
+ return 0;
+
+ dev_major = major(statbuf.st_mode);
+ dev_minor = minor(statbuf.st_mode);
+
+ switch (dev_major) {
+ case 3: /* IDE / ATAPI disks */
+ case 13: /* PC MFM disks */
+ case 14: /* BIOS HD disks */
+ case 21: /* Acorn MFM disks */
+ case 22: /* 2nd IDE / ATAPI controller */
+ case 33: /* 3rd IDE / ATAPI controller */
+ case 34: /* 4th IDE / ATAPI controller */
+ case 56: /* 5th IDE / ATAPI controller */
+ case 57: /* 6th IDE / ATAPI controller */
+ case 88: /* 7th IDE / ATAPI controller */
+ case 89: /* 8th IDE / ATAPI controller */
+ case 90: /* 9th IDE / ATAPI controller */
+ case 91: /* 10th IDE / ATAPI controller */
+ case 36: /* MCA ESDI disks */
+ disk_minor = dev_minor - (dev_minor % 64);
+ break;
+ case 160: /* Carmel 8-port SATA disks, 1st controller */
+ case 161: /* Carmel 8-port SATA disks, 2nd controller */
+ disk_minor = dev_minor - (dev_minor % 32);
+ break;
+ case 8: /* SCSI devices */
+ case 28: /* Atari ASCI disks */
+ case 44: /* FTL disks */
+ case 45: /* Parallel port IDE disks */
+ case 65: /* SCSI devices */
+ case 66: /* SCSI devices */
+ case 67: /* SCSI devices */
+ case 68: /* SCSI devices */
+ case 69: /* SCSI devices */
+ case 70: /* SCSI devices */
+ case 71: /* SCSI devices */
+ case 72: /* Compaq IDA, 1st controller */
+ case 73: /* Compaq IDA, 2nd controller */
+ case 74: /* Compaq IDA, 3rd controller */
+ case 75: /* Compaq IDA, 4th controller */
+ case 76: /* Compaq IDA, 5th controller */
+ case 77: /* Compaq IDA, 6th controller */
+ case 78: /* Compaq IDA, 7th controller */
+ case 79: /* Compaq IDA, 8th controller */
+ case 80: /* I2O disks */
+ case 81: /* I2O disks */
+ case 82: /* I2O disks */
+ case 83: /* I2O disks */
+ case 84: /* I2O disks */
+ case 85: /* I2O disks */
+ case 86: /* I2O disks */
+ case 87: /* I2O disks */
+ case 93: /* NAND FTL disks */
+ case 96: /* Inverse NAND FTL disks */
+ case 98: /* User-mode Virtual disks */
+ case 101: /* AMI RAID controller */
+ case 102: /* Compressed block device */
+ case 104: /* Compaq CCISS, 1st controller */
+ case 105: /* Compaq CCISS, 2nd controller */
+ case 106: /* Compaq CCISS, 3rd controller */
+ case 107: /* Compaq CCISS, 4th controller */
+ case 108: /* Compaq CCISS, 5th controller */
+ case 109: /* Compaq CCISS, 6th controller */
+ case 110: /* Compaq CCISS, 7th controller */
+ case 111: /* Compaq CCISS, 8th controller */
+ case 114: /* ATARAID devices */
+ case 128: /* SCSI disks */
+ case 129: /* SCSI disks */
+ case 130: /* SCSI disks */
+ case 131: /* SCSI disks */
+ case 132: /* SCSI disks */
+ case 133: /* SCSI disks */
+ case 134: /* SCSI disks */
+ case 135: /* SCSI disks */
+ case 153: /* Enhanced Metadisk RAID */
+ disk_minor = dev_minor - (dev_minor % 16);
+ break;
+ case 48: /* Mylex DAC960 RAID, 1st controller */
+ case 49: /* Mylex DAC960 RAID, 2nd controller */
+ case 50: /* Mylex DAC960 RAID, 3rd controller */
+ case 51: /* Mylex DAC960 RAID, 4th controller */
+ case 52: /* Mylex DAC960 RAID, 5th controller */
+ case 53: /* Mylex DAC960 RAID, 6th controller */
+ case 54: /* Mylex DAC960 RAID, 7th controller */
+ case 55: /* Mylex DAC960 RAID, 8th controller */
+ case 112: /* IBM iSeries virtual disks */
+ case 136: /* Mylex DAC960 RAID, 9th controller */
+ case 137: /* Mylex DAC960 RAID, 10th controller */
+ case 138: /* Mylex DAC960 RAID, 11th controller */
+ case 139: /* Mylex DAC960 RAID, 12th controller */
+ case 140: /* Mylex DAC960 RAID, 13th controller */
+ case 141: /* Mylex DAC960 RAID, 14th controller */
+ case 142: /* Mylex DAC960 RAID, 15th controller */
+ case 143: /* Mylex DAC960 RAID, 16th controller */
+ case 180: /* USB Block devices */
+ disk_minor = dev_minor - (dev_minor % 8);
+ break;
+ case 94: /* IBM S/390 DASD */
+ disk_minor = dev_minor - (dev_minor % 4);
+ break;
+ default:
+ disk_minor = dev_minor;
+ break;
}
+
+ return makedev(dev_major,disk_minor);
+}
+
+/*
+ * Check whether two given devices match.
+ * Rather then check for the device names
+ * (which wouldn't work with udev anyway)
+ * check whether the device numbers are
+ * identical.
+ */
+int match_device(const char *dev1, const char *dev2)
+{
+ struct stat statbuf;
+ unsigned int dev_major, dev_minor, disk_minor;
+ dev_t saved_devt;
+ int ret = 0;
- /* Handle DAC 960 devices */
- if (strncmp(cp, "rd/", 3) == 0) {
@ -54,118 +184,9 @@
- goto errout;
- *(cp+4) = 0;
- return str;
- }
+ if (stat(device, &statbuf) < 0) {
+ fprintf(stderr,"error on stat() %s: %s\n",
+ device, strerror(errno));
+ if (stat(dev1, &statbuf) < 0) {
+ return 0;
+ }
+
+ if (!S_ISBLK(statbuf.st_mode))
+ return 0;
+
+ dev_major = major(statbuf.st_mode);
+ dev_minor = minor(statbuf.st_mode);
+
+ switch (dev_major) {
+ case 3: /* IDE / ATAPI disks */
+ case 13: /* PC MFM disks */
+ case 14: /* BIOS HD disks */
+ case 21: /* Acorn MFM disks */
+ case 22: /* 2nd IDE / ATAPI controller */
+ case 33: /* 3rd IDE / ATAPI controller */
+ case 34: /* 4th IDE / ATAPI controller */
+ case 56: /* 5th IDE / ATAPI controller */
+ case 57: /* 6th IDE / ATAPI controller */
+ case 88: /* 7th IDE / ATAPI controller */
+ case 89: /* 8th IDE / ATAPI controller */
+ case 90: /* 9th IDE / ATAPI controller */
+ case 91: /* 10th IDE / ATAPI controller */
+ case 36: /* MCA ESDI disks */
+ disk_minor = dev_minor - (dev_minor % 64);
+ break;
+ case 160: /* Carmel 8-port SATA disks, 1st controller */
+ case 161: /* Carmel 8-port SATA disks, 2nd controller */
+ disk_minor = dev_minor - (dev_minor % 32);
+ break;
+ case 8: /* SCSI devices */
+ case 28: /* Atari ASCI disks */
+ case 44: /* FTL disks */
+ case 45: /* Parallel port IDE disks */
+ case 65: /* SCSI devices */
+ case 66: /* SCSI devices */
+ case 67: /* SCSI devices */
+ case 68: /* SCSI devices */
+ case 69: /* SCSI devices */
+ case 70: /* SCSI devices */
+ case 71: /* SCSI devices */
+ case 72: /* Compaq IDA, 1st controller */
+ case 73: /* Compaq IDA, 2nd controller */
+ case 74: /* Compaq IDA, 3rd controller */
+ case 75: /* Compaq IDA, 4th controller */
+ case 76: /* Compaq IDA, 5th controller */
+ case 77: /* Compaq IDA, 6th controller */
+ case 78: /* Compaq IDA, 7th controller */
+ case 79: /* Compaq IDA, 8th controller */
+ case 80: /* I2O disks */
+ case 81: /* I2O disks */
+ case 82: /* I2O disks */
+ case 83: /* I2O disks */
+ case 84: /* I2O disks */
+ case 85: /* I2O disks */
+ case 86: /* I2O disks */
+ case 87: /* I2O disks */
+ case 93: /* NAND FTL disks */
+ case 96: /* Inverse NAND FTL disks */
+ case 98: /* User-mode Virtual disks */
+ case 101: /* AMI RAID controller */
+ case 102: /* Compressed block device */
+ case 104: /* Compaq CCISS, 1st controller */
+ case 105: /* Compaq CCISS, 2nd controller */
+ case 106: /* Compaq CCISS, 3rd controller */
+ case 107: /* Compaq CCISS, 4th controller */
+ case 108: /* Compaq CCISS, 5th controller */
+ case 109: /* Compaq CCISS, 6th controller */
+ case 110: /* Compaq CCISS, 7th controller */
+ case 111: /* Compaq CCISS, 8th controller */
+ case 114: /* ATARAID devices */
+ case 128: /* SCSI disks */
+ case 129: /* SCSI disks */
+ case 130: /* SCSI disks */
+ case 131: /* SCSI disks */
+ case 132: /* SCSI disks */
+ case 133: /* SCSI disks */
+ case 134: /* SCSI disks */
+ case 135: /* SCSI disks */
+ case 153: /* Enhanced Metadisk RAID */
+ disk_minor = dev_minor - (dev_minor % 16);
+ break;
+ case 48: /* Mylex DAC960 RAID, 1st controller */
+ case 49: /* Mylex DAC960 RAID, 2nd controller */
+ case 50: /* Mylex DAC960 RAID, 3rd controller */
+ case 51: /* Mylex DAC960 RAID, 4th controller */
+ case 52: /* Mylex DAC960 RAID, 5th controller */
+ case 53: /* Mylex DAC960 RAID, 6th controller */
+ case 54: /* Mylex DAC960 RAID, 7th controller */
+ case 55: /* Mylex DAC960 RAID, 8th controller */
+ case 112: /* IBM iSeries virtual disks */
+ case 136: /* Mylex DAC960 RAID, 9th controller */
+ case 137: /* Mylex DAC960 RAID, 10th controller */
+ case 138: /* Mylex DAC960 RAID, 11th controller */
+ case 139: /* Mylex DAC960 RAID, 12th controller */
+ case 140: /* Mylex DAC960 RAID, 13th controller */
+ case 141: /* Mylex DAC960 RAID, 14th controller */
+ case 142: /* Mylex DAC960 RAID, 15th controller */
+ case 143: /* Mylex DAC960 RAID, 16th controller */
+ case 180: /* USB Block devices */
+ disk_minor = dev_minor - (dev_minor % 8);
+ break;
+ case 94: /* IBM S/390 DASD */
+ disk_minor = dev_minor - (dev_minor % 4);
+ break;
+ default:
+ disk_minor = dev_minor;
+ break;
}
- /* Now let's handle /dev/hd* and /dev/sd* devices.... */
- if ((cp[0] == 'h' || cp[0] == 's') && (cp[1] == 'd')) {
@ -178,7 +199,9 @@
- goto errout;
- *(cp + 1) = 0;
- return str;
}
- }
+ if (!S_ISBLK(statbuf.st_mode))
+ return 0;
- /* Now let's handle devfs (ugh) names */
- len = 0;
@ -208,25 +231,8 @@
- }
- *(cp - 1) = 0;
- return str;
+ return makedev(dev_major,disk_minor);
+}
+
+/*
+ * Check whether two given devices match.
+ * Rather then check for the device names
+ * (which wouldn't work with udev anyway)
+ * check whether the device numbers are
+ * identical.
+ */
+int match_device(const char *dev1, const char *dev2)
+{
+ struct stat statbuf;
+ dev_t saved_devt;
+ int ret = 0;
+
+ if (stat(dev1, &statbuf) < 0) {
+ return 0;
}
- }
+ saved_devt = statbuf.st_rdev;
- /* Now handle devfs /dev/disc or /dev/disk names */
- disk = 0;
@ -246,11 +252,6 @@
- }
- *cp = 0;
- return str;
+ if (!S_ISBLK(statbuf.st_mode))
+ return 0;
+
+ saved_devt = statbuf.st_rdev;
+
+ if (stat(dev2, &statbuf) < 0) {
+ return 0;
}
@ -263,7 +264,7 @@
+
+ if (saved_devt == statbuf.st_rdev)
+ ret = 1;
+
+
+ return ret;
}
@ -275,7 +276,7 @@
char buf[256], *cp;
while (1) {
@@ -161,8 +206,8 @@
@@ -161,8 +205,8 @@ int main(int argc, char** argv)
cp = strchr(buf, '\t');
if (cp)
*cp = 0;
@ -286,9 +287,11 @@
}
exit(0);
}
--- e2fsprogs-1.41.0/misc/fsck.c
+++ e2fsprogs-1.41.0/misc/fsck.c
@@ -235,8 +235,6 @@
Index: e2fsprogs-1.41.1/misc/fsck.c
===================================================================
--- e2fsprogs-1.41.1.orig/misc/fsck.c 2008-08-28 16:26:31.000000000 +0200
+++ e2fsprogs-1.41.1/misc/fsck.c 2008-09-04 15:23:38.000000000 +0200
@@ -237,8 +237,6 @@ static void free_instance(struct fsck_in
free(i->prog);
if (i->device)
free(i->device);
@ -297,7 +300,7 @@
free(i);
return;
}
@@ -388,7 +386,7 @@
@@ -390,7 +388,7 @@ static struct fs_info *lookup(char *file
return NULL;
for (fs = filesys_info; fs; fs = fs->next) {
@ -306,7 +309,7 @@
(fs->mountpt && !strcmp(filesys, fs->mountpt)))
break;
}
@@ -512,7 +510,7 @@
@@ -514,7 +512,7 @@ static int execute(const char *type, con
inst->prog = string_copy(prog);
inst->type = string_copy(type);
inst->device = string_copy(device);
@ -315,7 +318,7 @@
inst->start_time = time(0);
inst->next = NULL;
@@ -925,7 +923,7 @@
@@ -927,7 +925,7 @@ static int ignore(struct fs_info *fs)
static int device_already_active(char *device)
{
struct fsck_instance *inst;
@ -324,7 +327,7 @@
if (force_all_parallel)
return 0;
@@ -938,20 +936,19 @@
@@ -940,20 +938,18 @@ static int device_already_active(char *d
return 1;
#endif
@ -334,10 +337,9 @@
* If we don't know the base device, assume that the device is
* already active if there are any fsck instances running.
*/
- if (!base)
- if (!base)
+ if (!disk_devt)
return (instance_list != 0);
+
for (inst = instance_list; inst; inst = inst->next) {
- if (!inst->base_device || !strcmp(base, inst->base_device)) {
- free(base);
@ -349,9 +351,11 @@
return 0;
}
--- e2fsprogs-1.41.0/misc/fsck.h
+++ e2fsprogs-1.41.0/misc/fsck.h
@@ -62,12 +62,12 @@
Index: e2fsprogs-1.41.1/misc/fsck.h
===================================================================
--- e2fsprogs-1.41.1.orig/misc/fsck.h 2008-08-28 05:07:00.000000000 +0200
+++ e2fsprogs-1.41.1/misc/fsck.h 2008-09-04 14:57:13.000000000 +0200
@@ -62,12 +62,12 @@ struct fsck_instance {
char * prog;
char * type;
char * device;

View File

@ -1,17 +1,17 @@
Index: misc/Makefile.in
================================================================================
--- misc/Makefile.in
+++ misc/Makefile.in
@@ -40,7 +40,7 @@
diff --git a/misc/Makefile.in b/misc/Makefile.in
index be362e9..80af1b3 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -40,7 +40,7 @@ UUIDD_OBJS= uuidd.o
DUMPE2FS_OBJS= dumpe2fs.o
BADBLOCKS_OBJS= badblocks.o
E2IMAGE_OBJS= e2image.o
-FSCK_OBJS= fsck.o base_device.o ismounted.o
+FSCK_OBJS= fsck.o base_device.o ismounted.o fsck_udev.o
+FSCK_OBJS= fsck.o base_device.o ismounted.o fsck_volume_id.o
BLKID_OBJS= blkid.o
FILEFRAG_OBJS= filefrag.o
E2UNDO_OBJS= e2undo.o
@@ -64,6 +64,9 @@
@@ -62,6 +62,9 @@ STATIC_DEPLIBS= $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR)
LIBS_BLKID= $(LIBBLKID) $(LIBUUID)
DEPLIBS_BLKID= $(DEPLIBBLKID) $(DEPLIBUUID)
@ -21,7 +21,7 @@ Index: misc/Makefile.in
LIBS_E2P= $(LIBE2P) $(LIBCOM_ERR)
DEPLIBS_E2P= $(LIBE2P) $(LIBCOM_ERR)
@@ -123,10 +126,6 @@
@@ -117,10 +120,6 @@ base_device: base_device.c
@$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) $(srcdir)/base_device.c \
-DDEBUG -o base_device
@ -32,7 +32,7 @@ Index: misc/Makefile.in
mklost+found: $(MKLPF_OBJS)
@echo " LD $@"
@$(CC) $(ALL_LDFLAGS) -o mklost+found $(MKLPF_OBJS) $(LIBINTL)
@@ -163,9 +162,9 @@
@@ -157,9 +156,9 @@ dumpe2fs: $(DUMPE2FS_OBJS) $(DEPLIBS) $(DEPLIBS_E2P) $(DEPLIBUUID)
@$(CC) $(ALL_LDFLAGS) -o dumpe2fs $(DUMPE2FS_OBJS) $(LIBS) \
$(LIBS_E2P) $(LIBUUID) $(LIBINTL)
@ -44,8 +44,10 @@ Index: misc/Makefile.in
badblocks: $(BADBLOCKS_OBJS) $(DEPLIBS)
@echo " LD $@"
--- misc/base_device.c
+++ misc/base_device.c
diff --git a/misc/base_device.c b/misc/base_device.c
index 6237d0e..c3261fc 100644
--- a/misc/base_device.c
+++ b/misc/base_device.c
@@ -27,6 +27,8 @@
#endif
#include <ctype.h>
@ -55,8 +57,10 @@ Index: misc/Makefile.in
#include "fsck.h"
--- misc/fsck.c
+++ misc/fsck.c
diff --git a/misc/fsck.c b/misc/fsck.c
index 5cf1a1c..ad1d7a9 100644
--- a/misc/fsck.c
+++ b/misc/fsck.c
@@ -59,7 +59,6 @@
#include "../version.h"
#include "nls-enable.h"
@ -65,7 +69,7 @@ Index: misc/Makefile.in
#ifndef _PATH_MNTTAB
#define _PATH_MNTTAB "/etc/fstab"
@@ -120,7 +119,6 @@
@@ -118,7 +117,6 @@ struct fs_info *filesys_info = NULL, *filesys_last = NULL;
struct fsck_instance *instance_list;
const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
char *fsck_path = 0;
@ -73,7 +77,7 @@ Index: misc/Makefile.in
static char *string_copy(const char *s)
{
@@ -296,7 +294,7 @@
@@ -296,7 +294,7 @@ static int parse_fstab_line(char *line, struct fs_info **ret_fs)
parse_escape(freq);
parse_escape(passno);
@ -82,7 +86,7 @@ Index: misc/Makefile.in
if (dev)
device = dev;
@@ -321,7 +319,7 @@
@@ -321,7 +319,7 @@ static void interpret_type(struct fs_info *fs)
if (strcmp(fs->type, "auto") != 0)
return;
@ -91,7 +95,7 @@ Index: misc/Makefile.in
if (t) {
free(fs->type);
fs->type = t;
@@ -1119,7 +1117,7 @@
@@ -1104,7 +1102,7 @@ static void PRS(int argc, char *argv[])
progname);
exit(EXIT_ERROR);
}
@ -100,7 +104,7 @@ Index: misc/Makefile.in
if (!dev && strchr(arg, '=')) {
/*
* Check to see if we failed because
@@ -1265,7 +1263,7 @@
@@ -1250,7 +1248,7 @@ int main(int argc, char *argv[])
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
#endif
@ -109,7 +113,7 @@ Index: misc/Makefile.in
PRS(argc, argv);
if (!notitle)
@@ -1336,6 +1334,6 @@
@@ -1319,6 +1317,6 @@ int main(int argc, char *argv[])
}
status |= wait_many(FLAG_WAIT_ALL);
free(fsck_path);
@ -117,54 +121,27 @@ Index: misc/Makefile.in
+ fsck_put_cache();
return status;
}
--- misc/fsck.h
+++ misc/fsck.h
@@ -69,5 +69,10 @@
extern dev_t base_devt(const char *device);
extern int match_device(const char *dev1, const char *dev2);
diff --git a/misc/fsck.h b/misc/fsck.h
index 55cb525..242b21e 100644
--- a/misc/fsck.h
+++ b/misc/fsck.h
@@ -66,5 +66,10 @@ struct fsck_instance {
struct fsck_instance *next;
};
+extern int fsck_get_cache(const char *filename);
+extern void fsck_put_cache(void);
+extern char *fsck_get_devname(const char *device);
+extern char *fsck_get_fstype(const char *device);
+
/* ismounted.h */
extern int is_mounted(const char *file);
--- misc/fsck_blkid.c
+++ misc/fsck_blkid.c
@@ -0,0 +1,29 @@
+/*
+ * Wrapper for libblkid
+ */
+
+#include <stdio.h>
+#include "blkid/blkid.h"
+
+static blkid_cache cache = NULL;
+
+int fsck_get_cache(const char *filename)
+{
+ return blkid_get_cache(&cache, name);
+}
+
+void fsck_put_cache(void)
+{
+ blkid_put_cache(cache);
+}
+
+char *fsck_get_devname(const char *device)
+{
+ return blkid_get_devname(cache, device, NULL);
+}
+
+char *fsck_get_fstype(const char *device)
+{
+ return blkid_get_tag_value(cache, "TYPE", device);
+}
+
--- misc/fsck_udev.c
+++ misc/fsck_udev.c
@@ -0,0 +1,188 @@
extern char *base_device(const char *device);
extern const char *identify_fs(const char *fs_name, const char *fs_types);
diff --git a/misc/fsck_volume_id.c b/misc/fsck_volume_id.c
new file mode 100644
index 0000000..9456394
--- /dev/null
+++ b/misc/fsck_volume_id.c
@@ -0,0 +1,132 @@
+/*
+ * Wrapper for libvolume_id
+ */
@ -173,6 +150,7 @@ Index: misc/Makefile.in
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/mount.h>
+#include <sys/ioctl.h>
+#include <stddef.h>
@ -189,7 +167,7 @@ Index: misc/Makefile.in
+{
+}
+
+char *fsck_get_devname_by_uuid(const char *uuid)
+static char *fsck_get_devname_by_uuid(const char *uuid)
+{
+ char *dev = NULL;
+
@ -205,7 +183,7 @@ Index: misc/Makefile.in
+ return dev;
+}
+
+char *fsck_get_devname_by_label(const char *label)
+static char *fsck_get_devname_by_label(const char *label)
+{
+ char *dev = NULL;
+
@ -259,97 +237,40 @@ Index: misc/Makefile.in
+ return nspec;
+}
+
+struct volume_id_types_t {
+ int id;
+ char *token;
+ char *env;
+};
+
+enum {
+ VOLUME_ID_NONE=0,
+ VOLUME_ID_TYPE,
+ VOLUME_ID_LABEL,
+ VOLUME_ID_UUID
+};
+
+#define volume_id_offset(member) (unsigned long)offsetof(struct volume_id,member)
+
+struct volume_id_types_t volume_id_types[] = {
+ { VOLUME_ID_TYPE, "TYPE", "ID_FS_TYPE" },
+ { VOLUME_ID_LABEL, "LABEL", "ID_FS_LABEL" },
+ { VOLUME_ID_UUID, "UUID", "ID_FS_UUID" },
+ { VOLUME_ID_NONE, NULL, NULL },
+};
+
+char *volume_id_get_tag(const char *spec, const char *token)
+{
+ struct volume_id *vid;
+ uint64_t size;
+ struct volume_id_types_t *volume_id_ptr = volume_id_types;
+ char *var, *value;
+
+ value = malloc(VOLUME_ID_LABEL_SIZE);
+ if (!value)
+ return NULL;
+
+ if (!spec)
+ return NULL;
+
+ while (volume_id_ptr->token && strcmp(volume_id_ptr->token,token))
+ volume_id_ptr++;
+
+ if (!volume_id_ptr->token) {
+ free(value);
+ value = NULL;
+ goto out;
+ }
+
+ /* Quick exit if ID_FS_* variables are set */
+ if ((var = getenv(volume_id_ptr->env))) {
+ strcpy(value,var);
+ goto out;
+ }
+
+ vid = volume_id_open_node(spec);
+ if (!vid) {
+ free(value);
+ value = NULL;
+ goto out;
+ }
+
+ if (ioctl(vid->fd, BLKGETSIZE64, &size) != 0)
+ size = 0;
+
+ if (volume_id_probe_all(vid, 0, size) == 0) {
+ switch(volume_id_ptr->id) {
+ case VOLUME_ID_TYPE:
+ strcpy(value, vid->type);
+ break;
+ case VOLUME_ID_LABEL:
+ strcpy(value, vid->label);
+ break;
+ case VOLUME_ID_UUID:
+ strcpy(value, vid->uuid);
+ break;
+ default:
+ free(value);
+ value = NULL;
+ break;
+ }
+ } else {
+ free(value);
+ volume_id_close(vid);
+ return NULL;
+ }
+
+ volume_id_close(vid);
+
+ out:
+ return value;
+}
+
+char *fsck_get_fstype(const char *device)
+{
+ return volume_id_get_tag(device, "TYPE");
+}
+ int fd = -1;
+ struct volume_id *vid = NULL;
+ uint64_t size;
+ const char *s;
+ char *value = NULL;
+
+ if (!device)
+ return NULL;
+
+ fd = open(device, O_RDONLY);
+ if (fd < 0)
+ return NULL;
+
+ vid = volume_id_open_fd(fd);
+ if (!vid)
+ goto out;
+
+ if (ioctl(fd, BLKGETSIZE64, &size) != 0)
+ size = 0;
+
+ if (volume_id_probe_all(vid, 0, size) != 0)
+ goto out;
+
+ if (!volume_id_get_type(vid, &s))
+ goto out;
+
+ value = strdup(s);
+out:
+ if (vid != NULL)
+ volume_id_close(vid);
+ if (fd >= 0)
+ close(fd);
+
+ return value;
+}

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6dbff724c2afced09668ec35566ed1d5a259314fe5095a3cf3a94e8fa9e5dfe2
size 42292
oid sha256:96e022f5ff6812872f54a7b5bbf8ade253989d633b81639926bb32fb69816904
size 42772

View File

@ -1,3 +1,64 @@
-------------------------------------------------------------------
Fri Sep 5 11:09:48 CEST 2008 - mkoenig@suse.de
- update to version 1.41.1
* mke2fs
+ issues now a warning if there is no definition in
/etc/mke2fs.conf for the filesystem to be created
+ creates now the journal in the middle of the filesystem
+ now avoids allocating an extra block to the journal
+ will correctly enforce the prohibition against features
in revision 0 filesystems
+ previously would occasionaly create some slightly non-optimally
placed inode tables; this bug has been fixed
+ will now set the creation timestamp on the lost+found directory
and the root directory
* blkid
+ recognize MacOS hfsx filesystems, and correctly extract the
label and uuid for hfs, hfsx, and hfsplus filesystems
+ improved detection of JFS and HPFS
+ more efficient handling of devicemapper devices
+ fix cache validation bugs
+ The blkid program will now print out a user-friendly listing
of all of the block devices in the system and what they
contain when given the -L option
* resize2fs
+ will now correctly handle filesystems with extents and/or
uninitialized block groups correctly when file/directory blocks
need to relocated
+ support for on-line resizing ext4 filesystem with the flex_bg
filesystem feature. The method for doing so is not optimal,
but to do a better job will require kernel support
+ is now correctly managing the directory in-use counts when
shrinking filesystems and directory inodes needed to be moved
from one block group to another
* e2fsck
+ now correctly calculates ind/dind/tind statistics in the
presence of extent-based files
+ now prints the depth of corrupt htree directories
* debugfs
+ htree command now correctly understands extent-based
directories
+ new command which will print the supported features
* Add support for setting the default hash algorithm used in b-tree
directories in tune2fs (from a command-line option) or mke2fs (via
mke2fs.conf). In addition, change the default hash algorithm to
half_md4, since it is faster and better
* Fix support for empty directory blocks in ext4 filesystems with
64k blocksize filesystems
* The filefrag program now has a more accurate calculation for the
number of ideal extents
- fix linking of blkid
e2fsprogs-1.41.1-link_fix.patch
- remove patches
e2fsprogs-1.41.0-fix_messages.patch
e2fsprogs-1.41.0-tst_link_fix.patch
-------------------------------------------------------------------
Fri Aug 29 23:53:15 CEST 2008 - kay.sievers@novell.com
- update libvolume_id patch to work with libvolume_id.so.1
-------------------------------------------------------------------
Thu Aug 21 18:06:13 CEST 2008 - pth@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package e2fsprogs (Version 1.41.0)
# spec file for package e2fsprogs (Version 1.41.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -26,15 +26,14 @@ Group: System/Filesystems
Supplements: filesystem(ext2) filesystem(ext3)
PreReq: %install_info_prereq
AutoReqProv: on
Version: 1.41.0
Release: 17
Version: 1.41.1
Release: 1
Summary: Utilities for the Second Extended File System
Url: http://e2fsprogs.sourceforge.net
Source: %{name}-%{version}.tar.bz2
Source2: README.SUSE
Source3: uuidd.rc
Source4: sysconfig.uuidd
Source5: e2fsprogs-1.41.0.de.po
#
# e2fsprogs patches
#
@ -42,8 +41,7 @@ Patch1: e2fsprogs-mdraid.patch
Patch2: e2fsprogs-base_devt.patch
Patch3: e2fsprogs-libvolume_id-support.patch
Patch5: e2fsprogs-1.40.4-uuidd_pid_path.patch
Patch6: e2fsprogs-1.41.0-tst_link_fix.patch
Patch7: e2fsprogs-1.41.0-fix_messages.patch
Patch6: e2fsprogs-1.41.1-link_fix.patch
# libcom_err patches
# 66534 - [SL 10.0] et_list handling of krb5 and libcom_err.so.2 conflict
Patch31: libcom_err-no-init_error_table.patch
@ -244,10 +242,9 @@ Authors:
# e2fsprogs patches
%patch1
%patch2 -p1
%patch3 -p0
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7
# libcom_err patches
%patch31 -p1
%patch32 -p1
@ -257,11 +254,11 @@ Authors:
%patch99 -p1
%endif
cp %{SOURCE2} .
cp %{S:5} po/de.po
%build
%{?suse_update_config:%{suse_update_config -f}}
#autoreconf --force --install
autoconf
./configure --prefix=%{_prefix} \
--with-root-prefix='' \
--mandir=%{_mandir} \
@ -269,7 +266,6 @@ cp %{S:5} po/de.po
--libdir=%{_libdir} \
--enable-elf-shlibs \
--disable-evms \
--enable-maintainer-mode \
CFLAGS="$RPM_OPT_FLAGS"
make
@ -469,6 +465,61 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/com_err.3.gz
%changelog
* Fri Sep 05 2008 mkoenig@suse.de
- update to version 1.41.1
* mke2fs
+ issues now a warning if there is no definition in
/etc/mke2fs.conf for the filesystem to be created
+ creates now the journal in the middle of the filesystem
+ now avoids allocating an extra block to the journal
+ will correctly enforce the prohibition against features
in revision 0 filesystems
+ previously would occasionaly create some slightly non-optimally
placed inode tables; this bug has been fixed
+ will now set the creation timestamp on the lost+found directory
and the root directory
* blkid
+ recognize MacOS hfsx filesystems, and correctly extract the
label and uuid for hfs, hfsx, and hfsplus filesystems
+ improved detection of JFS and HPFS
+ more efficient handling of devicemapper devices
+ fix cache validation bugs
+ The blkid program will now print out a user-friendly listing
of all of the block devices in the system and what they
contain when given the -L option
* resize2fs
+ will now correctly handle filesystems with extents and/or
uninitialized block groups correctly when file/directory blocks
need to relocated
+ support for on-line resizing ext4 filesystem with the flex_bg
filesystem feature. The method for doing so is not optimal,
but to do a better job will require kernel support
+ is now correctly managing the directory in-use counts when
shrinking filesystems and directory inodes needed to be moved
from one block group to another
* e2fsck
+ now correctly calculates ind/dind/tind statistics in the
presence of extent-based files
+ now prints the depth of corrupt htree directories
* debugfs
+ htree command now correctly understands extent-based
directories
+ new command which will print the supported features
* Add support for setting the default hash algorithm used in b-tree
directories in tune2fs (from a command-line option) or mke2fs (via
mke2fs.conf). In addition, change the default hash algorithm to
half_md4, since it is faster and better
* Fix support for empty directory blocks in ext4 filesystems with
64k blocksize filesystems
* The filefrag program now has a more accurate calculation for the
number of ideal extents
- fix linking of blkid
e2fsprogs-1.41.1-link_fix.patch
- remove patches
e2fsprogs-1.41.0-fix_messages.patch
e2fsprogs-1.41.0-tst_link_fix.patch
* Sat Aug 30 2008 kay.sievers@novell.com
- update libvolume_id patch to work with libvolume_id.so.1
* Thu Aug 21 2008 pth@suse.de
- Add current german messages.
- Fix e2fsprogs-base_devt.patch and e2fsprogs-libvolume_id-support.patch