]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Merge branch 'maint' into next
authorTheodore Ts'o <tytso@mit.edu>
Tue, 1 Jan 2008 17:41:35 +0000 (12:41 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 1 Jan 2008 17:41:35 +0000 (12:41 -0500)
Conflicts:

configure
debian/rules
e2fsck/swapfs.c
lib/ext2fs/ext2_fs.h

36 files changed:
README
README.subset
RELEASE-NOTES
configure
configure.in
debian/changelog
debian/comerr-dev.doc-base
debian/control
debian/libuuid1.postinst
debian/libuuid1.postrm
debian/rules
debian/uuid-runtime.postinst
debian/uuid-runtime.postrm
debian/uuid-runtime.prerm
debugfs/debugfs.8.in
debugfs/debugfs.c
debugfs/set_fields.c
doc/libext2fs.texinfo
e2fsck/e2fsck.8.in
e2fsck/rehash.c
e2fsprogs.lsm
lib/blkid/tst_types.c
lib/ext2fs/ext2_fs.h
lib/ext2fs/ext2fs.h
lib/ss/Makefile.in
lib/uuid/Makefile.in
lib/uuid/gen_uuid.c
lib/uuid/uuidd.h
misc/Makefile.in
misc/e2image.c
misc/uuidd.c
po/vi.gmo
po/vi.po
resize/extent.c
resize/resize2fs.c
version.h

diff --git a/README b/README
index e57aa50ea8c7f4e23f187cae41c8499c5478fe29..b6fe50dc78fceb29244267a889c703fb4ec6edf0 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-       This is the new version (1.40.3) of the second extended file
+       This is the new version (1.40.4) of the second extended file
 system management programs.
 
        From time to time, I release new versions of e2fsprogs, to fix
@@ -13,7 +13,7 @@ e2fsprogs.  Provisions for building Red Hat RPMs and Debian dpkg files
 are supplied as well.
 
        In case of bugs in these programs, please contact Ted Ts'o at
-tytso@thunk.org or tytso@alum.mit.edu.  See the e2fsck man page for
+tytso@mit.edu or tytso@alum.mit.edu.  See the e2fsck man page for
 suggestions of what sort of information to include when submitting bug
 reports for these programs.
 
index 1fb04cebd3da7b1b993f92e3507f2f22c3cb362b..70ed4b2003b9d168bee382153d2b657af7a98ac1 100644 (file)
@@ -1,6 +1,6 @@
 This distribution contains a subset of the e2fsprogs package; it
 contains the base libraries (ss, et, uuid, blkid) which may be used by
-other non-ext2-releated applications.
+other non-ext2-related applications.
 
 This may be useful for non-Linux operating systems that need these
 libraries for GNOME, but who do not need the ext2/ext3 filesystem
@@ -12,4 +12,4 @@ page, which is:
        http://e2fsprogs.sourceforge.net
 
 In case of bugs in these libraries, please contact Ted Ts'o at
-tytso@thunk.org or tytso@alum.mit.edu.
+tytso@mit.edu or tytso@alum.mit.edu.
index 378d0e08f36d887f97a0b0c4b7d5054a9a4a3a41..46ef2be04c68b4ae1e343011979b9a3bc1924c6c 100644 (file)
@@ -1,3 +1,58 @@
+E2fsprogs 1.40.4 (December 31, 2007)
+====================================
+
+Improve time-based UUID generation.  A new daemon uuidd, is started
+automatically by libuuid if necessary.  This daemon is setuid to allow
+updates to /var/lib/libuuid, so the clock sequence number can be
+stored and so if the clock is set backwards, it can be detected.
+(Addresses Sourceforge Bug: #1529672, Addresses Red Hat Bugzilla:
+#233471)
+
+Filter out the NEEDS_RECOVERY feature flag when writing out the backup
+superblocks.  This avoids e2fsck from concluding that a full
+filesystem check is required before backing up the superblock due to
+changes in the feature flags.  (Addresses Debian Bug: #454926)
+
+Fix fsck to only treat the '#' character as a comment at the beginning
+of the line in /etc/fstab.  Otherwise fstabs for the fuse filesystem
+will cause fsck to issue an bogus warning message.
+(Addresses Gentoo bug: #195405, Addresses Sourceforge bug: #1826147)
+
+Format control characters and characters with the high eighth bit set
+when printing the contents of the blkid cache, to prevent filesystems
+with garbage labels from sending escape sequences to the user's screen
+that might, for example place it in graphics mode.  (Addresses Ubuntu
+Bug: #78087)
+
+Fix sign-extension problem on 64-bit systems in in the com_err
+library.  (Addresses Sourceforge Bug: #1809658)
+
+Avoid division by zero error when probing an invalid FAT filesystem in
+the blkid library.  (Addresses Sourceforge Bug: #1831627)
+
+Update Dutch, Polish, and Vietnamese translations from the Translation
+Project.  Remove the Rwandan translation upon advice of the
+Translation Project.
+
+Programmer's Notes:
+-------------------
+
+Fix the libss "make check" regression test so that it works if the
+current directory is not in the user's path or if the libss shared
+library is not installed.  (Addresses Sourceforge Bug: #1848974)
+
+Fixed spelling mistakes, typos, and otherwise clarified man pages.
+(Addresses Debian Bugs: #444883, #441872)
+
+Fixed various Debian packaging issues --- see debian/changelog for
+details.  (Addresses Debian Bugs: #437720, #451172, #458017)
+
+Fix build failure on non-Linux/non-Hurd/non-Masix systems.
+(Addresses Sourceforge Bug: #1859778)
+
+Fix Hurd portability issues.  (Addresses Debian Bug: #437720)
+
+
 E2fsprogs 1.40.3 (December 5, 2007)
 ===================================
 
index 4e7a3b66614fc9c032e72aad49942099caf913af..4266a8d7b06c56a70250f98e25963e09ea929a66 100755 (executable)
--- a/configure
+++ b/configure
@@ -696,6 +696,7 @@ DEVMAPPER_REQ
 DEVMAPPER_PC_LIBS
 DEVMAPPER_LIBS
 STATIC_DEVMAPPER_LIBS
+UUIDD_CMT
 GETTEXT_PACKAGE
 PACKAGE
 VERSION
@@ -1374,13 +1375,15 @@ Optional Features:
   --enable-fsck           build fsck wrapper program
   --enable-e2initrd-helper build e2initrd-helper program
   --enable-blkid-devmapper  build with device-mapper support
+  --disable-tls           disable use of thread local support
+  --disable-uuidd         disable building the uuid daemon
   --disable-nls           do not use Native Language Support
   --disable-rpath         do not hardcode runtime library paths
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-diet-libc      Use diet libc
+  --with-diet-libc        use diet libc
   --with-cc=COMPILER      select compiler to use
   --with-linker=LINKER    select linker to use
   --with-ccopts=CCOPTS    select compiler command line options
@@ -4138,6 +4141,127 @@ fi
 
 
 
+# Check whether --enable-tls was given.
+if test "${enable_tls+set}" = set; then
+  enableval=$enable_tls; if test "$enableval" = "no"
+then
+       try_tls=""
+       echo "Disabling thread local support"
+else
+       try_tls="yes"
+       echo "Enabling thread local support"
+fi
+
+else
+  try_tls="yes"
+echo "Try using thread local support by default"
+
+fi
+
+if test "$try_tls" = "yes"
+then
+
+  { echo "$as_me:$LINENO: checking for thread local storage (TLS) class" >&5
+echo $ECHO_N "checking for thread local storage (TLS) class... $ECHO_C" >&6; }
+  if test "${ac_cv_tls+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    ax_tls_keywords="__thread __declspec(thread) none"
+    for ax_tls_keyword in $ax_tls_keywords; do
+       case $ax_tls_keyword in
+          none) ac_cv_tls=none ; break ;;
+          *)
+             cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+                 static void
+                 foo(void) {
+                 static  $ax_tls_keyword  int bar;
+                 exit(1);
+                 }
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_tls=$ax_tls_keyword ; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_tls=none
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+          esac
+    done
+
+fi
+
+
+  if test "$ac_cv_tls" != "none"; then
+
+cat >>confdefs.h <<_ACEOF
+#define TLS $ac_cv_tls
+_ACEOF
+
+  fi
+  { echo "$as_me:$LINENO: result: $ac_cv_tls" >&5
+echo "${ECHO_T}$ac_cv_tls" >&6; }
+
+fi
+# Check whether --enable-uuidd was given.
+if test "${enable_uuidd+set}" = set; then
+  enableval=$enable_uuidd; if test "$enableval" = "no"
+then
+       echo "Not building uuidd"
+       UUIDD_CMT="#"
+else
+       cat >>confdefs.h <<\_ACEOF
+#define USE_UUIDD 1
+_ACEOF
+
+       UUIDD_CMT=""
+       echo "Building uuidd"
+fi
+
+else
+  cat >>confdefs.h <<\_ACEOF
+#define USE_UUIDD 1
+_ACEOF
+
+UUIDD_CMT=""
+echo "Building uuidd by default"
+
+fi
+
+
 MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
 
 GETTEXT_PACKAGE=e2fsprogs
@@ -11406,80 +11530,6 @@ done
 
 fi
 
-  { echo "$as_me:$LINENO: checking for thread local storage (TLS) class" >&5
-echo $ECHO_N "checking for thread local storage (TLS) class... $ECHO_C" >&6; }
-  if test "${ac_cv_tls+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-    ax_tls_keywords="__thread __declspec(thread) none"
-    for ax_tls_keyword in $ax_tls_keywords; do
-       case $ax_tls_keyword in
-          none) ac_cv_tls=none ; break ;;
-          *)
-             cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-                 static void
-                 foo(void) {
-                 static  $ax_tls_keyword  int bar;
-                 exit(1);
-                 }
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_tls=$ax_tls_keyword ; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_tls=none
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-          esac
-    done
-
-fi
-
-
-  if test "$ac_cv_tls" != "none"; then
-
-cat >>confdefs.h <<_ACEOF
-#define TLS $ac_cv_tls
-_ACEOF
-
-  fi
-  { echo "$as_me:$LINENO: result: $ac_cv_tls" >&5
-echo "${ECHO_T}$ac_cv_tls" >&6; }
-
 
 
 
@@ -11512,7 +11562,7 @@ echo "${ECHO_T}$ac_cv_tls" >&6; }
 
 
 
-for ac_header in stdlib.h unistd.h stdarg.h stdint.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mman.h sys/mkdev.h sys/prctl.h sys/queue.h sys/sockio.h sys/socket.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h sys/wait.h sys/resource.h net/if_dl.h netinet/in.h utime.h
+for ac_header in stdlib.h unistd.h stdarg.h stdint.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mman.h sys/mkdev.h sys/prctl.h sys/queue.h sys/sockio.h sys/socket.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h sys/wait.h sys/resource.h sys/syscall.h net/if_dl.h netinet/in.h utime.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -15824,6 +15874,7 @@ DEVMAPPER_REQ!$DEVMAPPER_REQ$ac_delim
 DEVMAPPER_PC_LIBS!$DEVMAPPER_PC_LIBS$ac_delim
 DEVMAPPER_LIBS!$DEVMAPPER_LIBS$ac_delim
 STATIC_DEVMAPPER_LIBS!$STATIC_DEVMAPPER_LIBS$ac_delim
+UUIDD_CMT!$UUIDD_CMT$ac_delim
 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
 PACKAGE!$PACKAGE$ac_delim
 VERSION!$VERSION$ac_delim
@@ -15899,7 +15950,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` = 80; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index b28fc53d2432f055b330087347ce0a6d93da38e2..41173d47e769abb45a7c94a814c5b0353ffc3cd1 100644 (file)
@@ -67,7 +67,7 @@ dnl
 dnl Use diet libc
 dnl 
 AC_ARG_WITH([diet-libc],
-[  --with-diet-libc      Use diet libc],
+[  --with-diet-libc        use diet libc],
 CC="diet cc -nostdinc"
 AC_MSG_RESULT(CC=$CC))dnl
 dnl
@@ -507,6 +507,47 @@ AC_SUBST(STATIC_DEVMAPPER_LIBS)
 dnl
 dnl
 dnl
+AC_ARG_ENABLE([tls],
+[  --disable-tls           disable use of thread local support],
+[if test "$enableval" = "no"
+then
+       try_tls=""
+       echo "Disabling thread local support"
+else
+       try_tls="yes"
+       echo "Enabling thread local support"
+fi]
+,
+try_tls="yes"
+echo "Try using thread local support by default"
+)
+if test "$try_tls" = "yes"
+then
+AX_TLS
+fi
+dnl
+dnl
+dnl
+AC_ARG_ENABLE([uuidd],
+[  --disable-uuidd         disable building the uuid daemon],
+[if test "$enableval" = "no"
+then
+       echo "Not building uuidd"
+       UUIDD_CMT="#"
+else
+       AC_DEFINE(USE_UUIDD)
+       UUIDD_CMT=""
+       echo "Building uuidd"
+fi]
+,
+AC_DEFINE(USE_UUIDD)
+UUIDD_CMT=""
+echo "Building uuidd by default"
+)
+AC_SUBST(UUIDD_CMT)
+dnl
+dnl
+dnl
 MAKEFILE_LIBRARY=$srcdir/lib/Makefile.library
 AC_SUBST_FILE(MAKEFILE_LIBRARY)
 dnl
@@ -550,8 +591,7 @@ if test $cross_compiling = no; then
 else
   AC_CHECK_PROGS(BUILD_CC, gcc cc)
 fi
-AX_TLS
-AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h stdint.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mman.h sys/mkdev.h sys/prctl.h sys/queue.h sys/sockio.h sys/socket.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h sys/wait.h sys/resource.h net/if_dl.h netinet/in.h utime.h)
+AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h stdint.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mman.h sys/mkdev.h sys/prctl.h sys/queue.h sys/sockio.h sys/socket.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h sys/wait.h sys/resource.h sys/syscall.h net/if_dl.h netinet/in.h utime.h)
 AC_CHECK_HEADERS(sys/disk.h sys/mount.h,,,
 [[
 #if HAVE_SYS_QUEUE_H
index 04a068bc140aaf989044d4d7eb3397c0dce95255..19de99c17164490714805df928e7189cb2e813ab 100644 (file)
@@ -1,8 +1,40 @@
-e2fsprogs (1.40.3-2) unstable; urgency=low
-
-  * Add uuidd daemon
-
- -- Theodore Y. Ts'o <tytso@mit.edu>  Sun, 09 Dec 2007 22:47:53 -0500
+e2fsprogs (1.40.4-1) unstable; urgency=low
+
+  * Make sure that programs like tune2fs, when modifying a mounted
+      filesystem do not write the backup superblocks with the
+      NEEDS_RECOVERY flag, to avoid e2fsck from needlessly forcing a
+      full fsck because it thinks the feature flags need to be backed up
+      from the master to the backup superblocks.  (Closes: #454926)
+  * Improve time-based UUID generation to guarantee uniqueness even when
+      UUID's are being generated at very high rates on SMP systems.  To
+      do this we use an optional setuid helper daemon (uuidd) which is
+      started by libuuid when it is needed.  The uuidd daemon is
+      packaged in the (new) uuid-runtime package, which now also includes
+      the uuidgen program (which had been previously been included as
+      part of the e2fsprogs package).
+  * Fix fsck to only treat '#' characters at the beginning of /etc/fstab
+      lines as starting a comment.  This avoids spurious warnings printed
+      for filesystems such as fuse that often use '#' as part of the
+      filesystem specifier (i.e., wdfs#https://dav.hoster.com/foo).
+  * Enhance the blkid program to pretty-print control and meta
+      characters to avoid garbage filesystem labels from screwing up the
+      user's terminal
+  * Fix potential integer overflows passed to malloc() in resize2fs
+  * Update Dutch, Polish, and Vietnamese translations from the
+      Translation Project.  Remove the Rwandan translation upon advice
+      of the Translation Project.
+  * Fix cross-compilation support for non-Linux architectures
+        (Closes: #451172, #437720)
+  * Clarified and improved man pages (Closes: #444883, #441872)
+  * Fix potential divide by zero error when libblkid tried probing an
+      invalid FAT filesystem.
+  * Make error_message() in libcom_err DTRT when when a 64-bit sign-extended
+      error code is passed to it.
+  * Build the e2fsck-static package so that e2fsck.static will not use
+      TLS and hence will run correctly on back-level Debian systems
+      using a 2.4 Linux kernel.  (Closes: #458017)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 31 Dec 2007 22:40:42 -0500
 
 e2fsprogs (1.40.3-1) unstable; urgency=medium
 
index 8f24128d057bc563fab493f8cefcbf872438d3c0..c6746e6723c8327190d2f8d098588ab398564704 100644 (file)
@@ -1,4 +1,4 @@
-Document: com_err
+Document: comerr-manual
 Title: The com_err library
 Author: Ken Raeburn and Bill Sommerfeld
 Abstract: A library, and associated utilities,
index 612c4caeb9cc5d893ac9a5b5c3ddfd5029db238d..c41c829a56ee5fa9f6c08d08180acfd238cbfda2 100644 (file)
@@ -2,7 +2,7 @@ Source: e2fsprogs
 Section: admin
 Priority: required
 Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
-Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, libsepol1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdevmapper-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], debhelper (>= 4)
+Build-Depends: texi2html (>= 1.76), gettext, texinfo, dc, dietlibc-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libsepol1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libdevmapper-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], debhelper (>= 4)
 Standards-Version: 3.7.3.0
 
 Package: e2fsck-static
@@ -88,7 +88,7 @@ Description: universally unique id library
 Package: uuid-runtime
 Section: libs
 Priority: optional
-Depends: ${shlibs:Depends}
+Depends: libuuid1 (>> 1.40.3-1), ${shlibs:Depends}
 Replaces: e2fsprogs (<= 1.40.3-1ubuntu1)
 Architecture: any
 Description: universally unique id library
index 8559ffc4215922614e48f50cc044afa615630dc4..2f46f124ea2a01753088f4208eeaa6b0a7d914f5 100644 (file)
@@ -1,8 +1,13 @@
 #!/bin/sh
 
-adduser --system --group --no-create-home --disabled-login \
-       --quiet --home /var/lib/libuuid libuuid
+groupadd -f -K GID_MIN=1 -K GID_MAX=999 libuuid
+if ! grep -q libuuid /etc/passwd; then
+   useradd -d /var/lib/libuuid -K UID_MIN=1 -K UID_MAX=499 -g libuuid libuuid
+fi
 mkdir -p /var/lib/libuuid
 chown libuuid:libuuid /var/lib/libuuid
 chmod 2775 /var/lib/libuuid
 
+#DEBHELPER#
+
+exit 0
index 63d83701a4eda784be8f028539ba5a46876910b5..8c286eeaba5c53ae78e598b1300f7d0e48e7054e 100644 (file)
@@ -4,3 +4,7 @@ if [ "$1" = purge ]
 then
        rm -rf /var/lib/libuuid
 fi
+
+#DEBHELPER#
+
+exit 0
index b49b0ca6ac320eeb13de2f4328c213163b87a6df..0f518188ea2f58cb75f203f0382f3aea2d3ba3d0 100755 (executable)
@@ -44,6 +44,7 @@ uuidudebdir=${debdir}/libuuid1-udeb
 maindir=${debdir}/e2fsprogs
 stdbuilddir=${debdir}/BUILD-STD
 bfbuilddir=${debdir}/BUILD-BF
+staticbuilddir=${debdir}/BUILD-STATIC
 mipsbuilddir=${debdir}/BUILD-MIPS
 mipsbuilddir64=${debdir}/BUILD-MIPS-64
 # docdir=${maindir}/usr/share/doc/${package}
@@ -62,8 +63,10 @@ UUID_UDEB_PRIORITY = $(shell grep '^Package: libuuid1-udeb' debian/control -A 10
 STAMPSDIR=debian/stampdir
 CFGSTDSTAMP=${STAMPSDIR}/configure-std-stamp
 CFGBFSTAMP=${STAMPSDIR}/configure-bf-stamp
+CFGSTATICSTAMP=${STAMPSDIR}/configure-static-stamp
 BUILDSTDSTAMP=${STAMPSDIR}/build-std-stamp
 BUILDBFSTAMP=${STAMPSDIR}/build-bf-stamp
+BUILDSTATICSTAMP=${STAMPSDIR}/build-static-stamp
 
 CCOPTS = -g
 
@@ -85,6 +88,10 @@ endif
 
 ifeq (${DEB_HOST_ARCH_OS},linux)
 DEVMAPPER = --enable-blkid-devmapper
+BUILD_STATIC = build-static
+E2FSCK_STATIC = ${staticbuilddir}/e2fsck/e2fsck.static
+else
+E2FSCK_STATIC = ${stdbuilddir}/e2fsck/e2fsck.static
 endif
 
 BF_CCOPTS = -Os -fomit-frame-pointer
@@ -98,10 +105,19 @@ STD_CONF_FLAGS = --with-ccopts="${CCOPTS}" --enable-compression \
 
 BF_CONF_FLAGS = --with-ccopts="${CCOPTS} ${BF_CCOPTS}" \
        --disable-nls --disable-imager \
+       --disable-uuidd --disable-tls \
        --disable-debugfs  --disable-e2initrd-helper
 
+STATIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
+       --disable-nls --disable-imager \
+       --disable-uuidd --disable-tls \
+       --disable-e2initrd-helper \
+       --with-diet-libc --with-ccopts=-fno-stack-protector
+
 MIPS_NOPIC_CONF_FLAGS = --with-ccopts="${CCOPTS}" \
-       --disable-nls --disable-imager --disable-resizer # --disable-debugfs
+       --disable-nls --disable-imager \
+       --disable-uuidd --disable-tls \
+        --disable-resizer # --disable-debugfs
 
 # we can't use those flags at configure time
 MIPS_CFLAGS= -G 0 -fno-pic -mno-abicalls
@@ -157,7 +173,23 @@ endif
        mkdir -p ${STAMPSDIR}
        touch ${CFGBFSTAMP}
 
-build: build-std build-bf
+${CFGSTATICSTAMP}:
+       dh_testdir
+       rm -f config.cache
+
+       mkdir -p ${staticbuilddir}
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+       cd ${staticbuilddir} && AWK=/usr/bin/awk \
+               ${topdir}/configure ${STATIC_CONF_FLAGS}
+else
+       cd ${staticbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
+               ${topdir}/configure ${COMMON_CONF_FLAGS} ${STATIC_CONF_FLAGS} \
+               --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
+       mkdir -p ${STAMPSDIR}
+       touch ${CFGSTATICSTAMP}
+
+build: build-std build-bf $(BUILD_STATIC)
 
 build-std: ${BUILDSTDSTAMP}
 ${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
@@ -191,12 +223,20 @@ ${BUILDBFSTAMP}: ${CFGBFSTAMP}
        make -C ${bfbuilddir}/misc all
        touch ${BUILDBFSTAMP}
 
+build-static: ${BUILDSTATICSTAMP}
+${BUILDSTATICSTAMP}: ${CFGSTATICSTAMP}
+       dh_testdir
+       make -C ${staticbuilddir} libs
+       make -C ${staticbuilddir}/e2fsck all
+       touch ${BUILDSTATICSTAMP}
+
 clean:
        dh_testdir
        rm -rf ${STAMPSDIR}
        [ ! -f ${stdbuilddir}/Makefile ] || make -C ${stdbuilddir} distclean
        [ ! -f ${bfbuilddir}/Makefile ] || make -C ${bfbuilddir} distclean
-       rm -rf ${stdbuilddir} ${bfbuilddir} ${mipsbuilddir} ${mipsbuilddir64}
+       [ ! -f ${staticbuilddir}/Makefile ] || make -C ${staticbuilddir} distclean
+       rm -rf ${stdbuilddir} ${bfbuilddir} ${staticbuilddir} ${mipsbuilddir} ${mipsbuilddir64}
        rm -f doc/libext2fs/*.html lib/et/com_err/*.html debian/*.substvars
        dh_clean
 
@@ -223,7 +263,7 @@ install-std: build
        make -C ${stdbuilddir} install-libs DESTDIR=${tmpdir} LDCONFIG=true
 
   # statically-linked fsck
-       ${INSTALL_PROGRAM} ${stdbuilddir}/e2fsck/e2fsck.static ${tmpdir}/sbin
+       ${INSTALL_PROGRAM} $(E2FSCK_STATIC) ${tmpdir}/sbin
        cp ${mandir}/man8/e2fsck.8 ${mandir}/man8/e2fsck.static.8
 
        ln -s et/com_err.h ${tmpdir}/usr/include
index 4ab013a3ac702f2356290f4eb811dd1a08a735d3..98293f90f287545957240a0c75f34524567520ee 100644 (file)
@@ -1,9 +1,12 @@
 #!/bin/sh
 
-adduser --system --group --no-create-home --disabled-login \
-       --quiet --home /var/lib/libuuid libuuid
-mkdir -p /var/run/uuidd
-chown libuuid:libuuid /var/run/uuidd
-chmod 775 /var/run/uuidd
+groupadd -f -K GID_MIN=1 -K GID_MAX=999 libuuid
+if ! grep -q libuuid /etc/passwd; then
+   useradd -d /var/lib/libuuid -K UID_MIN=1 -K UID_MAX=499 -g libuuid libuuid
+fi
 chown libuuid:libuuid /usr/sbin/uuidd
 chmod 6755 /usr/sbin/uuidd
+
+#DEBHELPER#
+
+exit 0
index 62b1c7d5c2cbac7bf38e813c5da5436dd9935524..f077001199536c0400542d69486e6cfdad0a188e 100644 (file)
@@ -5,3 +5,6 @@ then
        rm -rf /var/run/uuidd
 fi
 
+#DEBHELPER#
+
+exit 0
index 37884328ef790cf5c0c5e8d86d71bba0ec9af356..241d7a0bc56afd905b260fb80eeb7f6457974f51 100644 (file)
@@ -4,3 +4,7 @@ if [ -x /usr/sbin/uuidd ]
 then
        /usr/sbin/uuidd -k || true
 fi
+
+#DEBHELPER#
+
+exit 0
index a4d96704760b1133d0272f00de6ea5f924e784fb..b9de2341dc24b1eb61fcce3df005c3bcacdbbb2f 100644 (file)
@@ -446,6 +446,27 @@ Test if the inode
 .I filespec
 is marked as allocated in the inode bitmap.
 .TP
+.I undel <inode num> [pathname]
+Undelete the specified inode number (which must be surrounded by angle
+brackets) so that it and its blocks are marked in use, and optionally
+link the recovered inode to the specified pathname.  The 
+.B e2fsck
+command should always be run after using the 
+.B undel
+command to recover deleted files.
+.IP
+Note that if you are recovering a large number of deleted files, linking
+the inode to a directory may require the directory to be expanded, which
+could allocate a block that had been used by one of the
+yet-to-be-undeleted files.  So it is safer to undelete all of the 
+inodes without specifying a destination pathname, and then in a separate
+pass, use the debugfs
+.B link
+command to link the inode to the destination pathname, or use 
+.B e2fsck
+to check the filesystem and link all of the recovered inodes to the
+lost+found dirctory.
+.TP
 .I unlink pathname
 Remove the link specified by 
 .I pathname 
index 8261d184317011bed41be25173a4149f3e5d5e10..8fa24123918152fdd9371f241113e4ee68c0a043 100644 (file)
@@ -1079,8 +1079,8 @@ void do_undel(int argc, char *argv[])
        ext2_ino_t      ino;
        struct ext2_inode inode;
 
-       if (common_args_process(argc, argv, 3, 3, "undelete",
-                               "<inode_num> <dest_name>",
+       if (common_args_process(argc, argv, 2, 3, "undelete",
+                               "<inode_num> [dest_name]",
                                CHECK_FS_RW | CHECK_FS_BITMAPS))
                return;
 
@@ -1111,7 +1111,8 @@ void do_undel(int argc, char *argv[])
 
        ext2fs_inode_alloc_stats2(current_fs, ino, +1, 0);
 
-       make_link(argv[1], argv[2]);
+       if (argc > 2)
+               make_link(argv[1], argv[2]);
 }
 
 static void unlink_file_by_name(char *filename)
index 9ff7f8cee7512a9b9d8efa9a740de3e2fced4474..749155187a0a8d78960deaf56cd1f719465c9cb4 100644 (file)
@@ -16,6 +16,7 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
+#include <strings.h>
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 82661d034ac35648c13518ec7a73c199ccf883aa..613ecdbb07a49f5bb231a95f3b958604b128c89a 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo    @c -*-texinfo-*-
 @c %**start of header
 @setfilename libext2fs.info
-@settitle The EXT2FS Library (version 1.40)
+@settitle The EXT2FS Library (version 1.40.4)
 @synindex tp fn
 @comment %**end of header
 
@@ -59,8 +59,8 @@ by the author.
 
 @title The EXT2FS Library
 @subtitle The EXT2FS Library
-@subtitle Version 1.40
-@subtitle June 2007
+@subtitle Version 1.40.4
+@subtitle December 2007
 
 @author by Theodore Ts'o
 
@@ -101,7 +101,7 @@ by the Foundation.
 
 @top The EXT2FS Library
 
-This manual documents the EXT2FS Library, version 1.40.
+This manual documents the EXT2FS Library, version 1.40.4.
 
 @end ifinfo
 
index eb560bf0c7172b382e379766911ff6000dcdbcae..df6fd288c372dd2991406d7f8340c2823df3c64e 100644 (file)
@@ -154,6 +154,19 @@ try to optimize all directories, either by reindexing them if the
 filesystem supports directory indexing,  or by sorting and compressing
 directories for smaller directories, or for filesystems using
 traditional linear directories.
+.IP
+Even without the
+.B \-D
+option,
+.B e2fsck
+may sometimes optimize a few directories --- for example, if
+directory indexing is enabled and a directory is not indexed and would
+benefit from being indexed, or if the index structures are corrupted
+and need to be rebuilt.  The
+.B \-D
+option forces all directories in the filesystem to be optimized.  This can
+sometimes make them a little smaller and slightly faster to search, but
+in practice, you should rarely need to use this option.
 .TP
 .BI \-E " extended_options"
 Set e2fsck extended options.  Extended options are comma
index 8c1459c41900f0e90bf5213f6d2921bcb4d304a0..a1f75ef90c8042a03ddc37863aaf5693b45f6ed2 100644 (file)
@@ -66,6 +66,7 @@ struct fill_dir_struct {
 struct hash_entry {
        ext2_dirhash_t  hash;
        ext2_dirhash_t  minor_hash;
+       ino_t           ino;
        struct ext2_dir_entry   *dir;
 };
 
@@ -147,6 +148,7 @@ static int fill_dir_block(ext2_filsys fs,
                ent = fd->harray + fd->num_array++;
                ent->dir = dirent;
                fd->dir_size += EXT2_DIR_REC_LEN(dirent->name_len & 0xFF);
+               ent->ino = dirent->inode;
                if (fd->compress)
                        ent->hash = ent->minor_hash = 0;
                else {
@@ -162,6 +164,15 @@ static int fill_dir_block(ext2_filsys fs,
        return 0;
 }
 
+/* Used for sorting the hash entry */
+static EXT2_QSORT_TYPE ino_cmp(const void *a, const void *b)
+{
+       const struct hash_entry *he_a = (const struct hash_entry *) a;
+       const struct hash_entry *he_b = (const struct hash_entry *) b;
+
+       return (he_a->ino - he_b->ino);
+}
+
 /* Used for sorting the hash entry */
 static EXT2_QSORT_TYPE name_cmp(const void *a, const void *b)
 {
@@ -717,7 +728,7 @@ errcode_t e2fsck_rehash_dir(e2fsck_t ctx, ext2_ino_t ino)
 resort:
        if (fd.compress)
                qsort(fd.harray+2, fd.num_array-2,
-                     sizeof(struct hash_entry), name_cmp);
+                     sizeof(struct hash_entry), ino_cmp);
        else
                qsort(fd.harray, fd.num_array,
                      sizeof(struct hash_entry), hash_cmp);
index 22202e92e119ee9d22e556c23dc404b55640687d..c205d27d73af3d9cc0e161ad06408b3f14a6ff8a 100644 (file)
@@ -1,16 +1,16 @@
 Begin3
 Title:          EXT2 Filesystem utilities
-Version:        1.40.3
-Entered-date:   05Dec2007
+Version:        1.40.4
+Entered-date:   31Dec2007
 Description:    The filesystem utilities for the EXT2 filesystem, including 
                e2fsck, mke2fs, dumpe2fs, fsck, and others.
 Keywords:       utilities, fsck, filesystem, Ext2fs
 Author:         tytso@mit.edu (Theodore Tso)
 Maintained-by:  tytso@mit.edu (Theodore Tso)
 Primary-site:   download.sourceforge.net /pub/sourceforge/e2fsprogs
-               3976kB e2fsprogs-1.40.3.tar.gz
-               432kB e2fsprogs-libs-1.40.3.tar.gz
-                1kB   e2fsprogs-1.40.lsm
+               3960kB e2fsprogs-1.40.4.tar.gz
+               436kB e2fsprogs-libs-1.40.4.tar.gz
+                1kB   e2fsprogs-1.40.4.lsm
 Alternate-site: 
 Platforms:     linux 1.2.x/1.3.x/2.0.x/2.1.x/2.2.x/2.3.x/2.4.x/2.5.x/2.6.x
 Copying-policy: GPL/LGPL
index f5a3f6f8777867807c73999ec25020604cf9addf..8e3055d9dd4b894a4ce8bb0bc88a1cf3a934dad7 100644 (file)
@@ -9,6 +9,7 @@
  * %End-Header%
  */
 
+#include <sys/types.h>
 #include "blkid/blkid_types.h"
 
 #include <stdlib.h>
index a11e6be536949b52a2c01b933f6af1e49ebb4a47..e04ba9a154cb6f5e80fe2c669b0f20bd203bae55 100644 (file)
@@ -291,6 +291,10 @@ struct ext2_new_group_input {
        __u16 unused;           /* Number of reserved GDT blocks in group */
 };
 
+#ifdef __GNU__                 /* Needed for the Hurd */
+#define _IOT_ext2_new_group_input _IOT (_IOTS(__u32), 5, _IOTS(__u16), 2, 0, 0)
+#endif
+
 #define EXT2_IOC_GETFLAGS              _IOR('f', 1, long)
 #define EXT2_IOC_SETFLAGS              _IOW('f', 2, long)
 #define EXT2_IOC_GETVERSION            _IOR('v', 1, long)
@@ -412,8 +416,6 @@ struct ext2_inode_large {
 #define i_uid_high     osd2.linux2.l_i_uid_high
 #define i_gid_high     osd2.linux2.l_i_gid_high
 #define i_reserved2    osd2.linux2.l_i_reserved2
-#define inode_uid(inode)       ((inode).i_uid | (inode).i_uid_high << 16)
-#define inode_gid(inode)       ((inode).i_gid | (inode).i_gid_high << 16)
 #else
 #if defined(__GNU__)
 
@@ -423,12 +425,13 @@ struct ext2_inode_large {
 #define i_uid_high     osd2.hurd2.h_i_uid_high
 #define i_gid_high     osd2.hurd2.h_i_gid_high
 #define i_author       osd2.hurd2.h_i_author
-#define inode_uid(inode)       ((inode).i_uid | (inode).i_uid_high << 16)
-#define inode_gid(inode)       ((inode).i_gid | (inode).i_gid_high << 16)
 
 #endif  /* __GNU__ */
 #endif /* defined(__KERNEL__) || defined(__linux__) */
 
+#define inode_uid(inode)       ((inode).i_uid | (inode).osd2.linux2.l_i_uid_high << 16)
+#define inode_gid(inode)       ((inode).i_gid | (inode).osd2.linux2.l_i_gid_high << 16)
+
 /*
  * File system states
  */
index 12325928dff0b816d73fac1a0813caed469c0d5c..19213b8e3f2e5ff950f36d6ab0c9a83435e3fc1a 100644 (file)
@@ -1039,6 +1039,7 @@ _INLINE_ errcode_t ext2fs_get_mem(unsigned long size, void *ptr)
        memcpy(ptr, &pp, sizeof (pp));
        return 0;
 }
+
 _INLINE_ errcode_t ext2fs_get_array(unsigned long count, unsigned long size, void *ptr)
 {
        if (count && (-1UL)/count<size)
index aa4f94be2898831e02978b566275d38180c75152..23b5f6045cbea10409b46e86b6af70f2189163b3 100644 (file)
@@ -163,7 +163,7 @@ uninstall::
                $(DESTDIR)$(man1dir)/mk_cmds.1 
        $(RM) -rf $(DESTDIR)$(includedir)/ss $(DESTDIR)$(datadir)/ss
 
-test_ss: test_ss.o test_cmd.o $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR)
+test_ss: test_ss.o test_cmd.o $(LIBSS) $(LIBCOM_ERR)
        @echo " LD $@"
        @$(CC) -o $@ test_ss.o test_cmd.o $(ALL_CFLAGS) \
                $(LIBSS) $(LIBCOM_ERR)
index 2c6b4fa8f928dd5b0001189ecf537861eadd9da7..35fc2e938acd990285c9aa8a9e9686b23a0c0959 100644 (file)
@@ -189,7 +189,8 @@ $(OBJS): subdirs
 clear.o: $(srcdir)/clear.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
 compare.o: $(srcdir)/compare.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
 copy.o: $(srcdir)/copy.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
-gen_uuid.o: $(srcdir)/gen_uuid.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
+gen_uuid.o: $(srcdir)/gen_uuid.c $(srcdir)/uuidP.h $(srcdir)/uuid.h \
+ $(srcdir)/uuidd.h
 isnull.o: $(srcdir)/isnull.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
 pack.o: $(srcdir)/pack.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
 parse.o: $(srcdir)/parse.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
index a84ae1c8d22887e8ca1be83793c2d36f8912b930..78fb336f4527608a27d6b9eb7e5d1bc1cedab0ab 100644 (file)
@@ -50,6 +50,7 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/time.h>
+#include <sys/wait.h>
 #include <sys/stat.h>
 #include <sys/file.h>
 #ifdef HAVE_SYS_IOCTL_H
@@ -71,7 +72,7 @@
 #ifdef HAVE_NET_IF_DL_H
 #include <net/if_dl.h>
 #endif
-#ifdef __linux__
+#if defined(__linux__) && defined(HAVE_SYS_SYSCALL_H)
 #include <sys/syscall.h>
 #endif
 
@@ -384,14 +385,17 @@ static ssize_t read_all(int fd, char *buf, size_t count)
  */
 static int get_uuid_via_daemon(int op, uuid_t out, int *num)
 {
+#ifdef USE_UUIDD
        char op_buf[64];
        int op_len;
        int s;
        ssize_t ret;
        int32_t reply_len = 0, expected = 16;
        struct sockaddr_un srv_addr;
+       pid_t pid;
        static const char *uuidd_path = UUIDD_PATH;
        static int access_ret = -2;
+       static int start_attempts = 0;
 
        if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
                return -1;
@@ -403,12 +407,12 @@ static int get_uuid_via_daemon(int op, uuid_t out, int *num)
                    sizeof(struct sockaddr_un)) < 0) {
                if (access_ret == -2)
                        access_ret = access(uuidd_path, X_OK);
-               if (access_ret == 0) {
-                       if (fork() == 0) {
+               if (access_ret == 0 && start_attempts++ < 5) {
+                       if ((pid = fork()) == 0) {
                                execl(uuidd_path, "uuidd", "-qT", "300", 0);
                                exit(1);
                        }
-                       usleep(500);
+                       (void) waitpid(pid, 0, 0);
                        if (connect(s, (const struct sockaddr *) &srv_addr,
                                    sizeof(struct sockaddr_un)) < 0)
                                goto fail;
@@ -418,9 +422,9 @@ static int get_uuid_via_daemon(int op, uuid_t out, int *num)
        op_buf[0] = op;
        op_len = 1;
        if (op == UUIDD_OP_BULK_TIME_UUID) {
-               memcpy(op_buf+1, num, sizeof(num));
-               op_len += sizeof(num);
-               expected += sizeof(num);
+               memcpy(op_buf+1, num, sizeof(*num));
+               op_len += sizeof(*num);
+               expected += sizeof(*num);
        }
 
        ret = write(s, op_buf, op_len);
@@ -446,6 +450,7 @@ static int get_uuid_via_daemon(int op, uuid_t out, int *num)
 
 fail:
        close(s);
+#endif
        return -1;
 }
 
index c80723613fcc8df22912bfb9690a319b78aee1b5..528acdc9d0c9aba7c7a97e86081385d74ccfc480 100644 (file)
@@ -35,8 +35,8 @@
 #ifndef _UUID_UUIDD_H
 #define _UUID_UUIDD_H
 
-#define UUIDD_SOCKET_PATH      "/var/run/uuidd/request"
-#define UUIDD_PIDFILE_PATH     "/var/run/uuidd/uuidd.pid"
+#define UUIDD_SOCKET_PATH      "/var/lib/libuuid/request"
+#define UUIDD_PIDFILE_PATH     "/var/lib/libuuid/uuidd.pid"
 #define UUIDD_PATH             "/usr/sbin/uuidd"
 
 #define UUIDD_OP_GETPID                        0
index 0a38cf7cff1af0cbb5a771687cc0f58975afad40..be362e9189951ff9d33ae2304587ad9281a127c4 100644 (file)
@@ -14,12 +14,15 @@ INSTALL = @INSTALL@
 @IMAGER_CMT@E2IMAGE_PROG= e2image
 @IMAGER_CMT@E2IMAGE_MAN= e2image.8
 
+@UUIDD_CMT@UUIDD_PROG= uuidd
+@UUIDD_CMT@UUIDD_MAN= uuidd.8
+
 SPROGS=                mke2fs badblocks tune2fs dumpe2fs blkid logsave \
                        $(E2IMAGE_PROG) @FSCK_PROG@
-USPROGS=       mklost+found filefrag uuidd
+USPROGS=       mklost+found filefrag $(UUIDD_PROG)
 SMANPAGES=     tune2fs.8 mklost+found.8 mke2fs.8 dumpe2fs.8 badblocks.8 \
                        e2label.8 findfs.8 blkid.8 $(E2IMAGE_MAN) \
-                       logsave.8 filefrag.8 uuidd.8 @FSCK_MAN@
+                       logsave.8 filefrag.8 $(UUIDD_MAN) @FSCK_MAN@
 FMANPAGES=     mke2fs.conf.5
 
 UPROGS=                chattr lsattr uuidgen
@@ -366,7 +369,7 @@ clean:
                $(FMANPAGES) \
                base_device base_device.out mke2fs.static filefrag \
                e2initrd_helper partinfo prof_err.[ch] default_profile.c \
-               \#* *.s *.o *.a *~ core 
+               uuidd e2image \#* *.s *.o *.a *~ core 
 
 mostlyclean: clean
 distclean: clean
index d53679b48c114219e5e0bb6575629e5325967fe5..04d51d47e1be41c7957bfde69b9cc5ba75fcebe0 100644 (file)
@@ -329,6 +329,7 @@ static void write_block(int fd, char *buf, int sparse_offset,
                                err = 0;
                        com_err(program_name, err, "error writing block %u",
                                block);
+                       exit(1);
                }
        }
 }
index 19c862465328208771afa7e61adda7b7de96352d..2fb10575189f4b32d7c20d182bf2a24196916ab9 100644 (file)
@@ -9,6 +9,8 @@
  * %End-Header%
  */
 
+#define _GNU_SOURCE /* for setres[ug]id() */
+
 #include <stdio.h>
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
@@ -49,11 +51,10 @@ static void usage(const char *progname)
        exit(1);
 }
 
-static void create_daemon(const char *pidfile_path)
+static void create_daemon(void)
 {
        pid_t pid;
        uid_t euid;
-       FILE *f;
 
        pid = fork();
        if (pid == -1) {
@@ -74,12 +75,6 @@ static void create_daemon(const char *pidfile_path)
        (void) setsid();
        euid = geteuid();
        (void) setreuid(euid, euid);
-
-       f = fopen(pidfile_path, "w");
-       if (f) {
-               fprintf(f, "%d\n", getpid());
-               fclose(f);
-       }
 }
 
 static int read_all(int fd, char *buf, size_t count)
@@ -107,13 +102,13 @@ static const char *cleanup_pidfile, *cleanup_socket;
 static void terminate_intr(int signo CODE_ATTR((unused)))
 {
        (void) unlink(cleanup_pidfile);
-       (void) unlink(cleanup_socket);
+       if (cleanup_socket)
+               (void) unlink(cleanup_socket);
        exit(0);
 }
 
 static void server_loop(const char *socket_path, int debug,
-                       const char *pidfile_path,
-                       int timeout, int quiet)
+                       int fd_pidfile, int timeout, int quiet)
 {
        struct sockaddr_un      my_addr, from_addr;
        unsigned char           reply_buf[1024], *cp;
@@ -156,16 +151,15 @@ static void server_loop(const char *socket_path, int debug,
                exit(1);
        }
 
-       if (!debug) {
-               create_daemon(pidfile_path);
-               cleanup_pidfile = pidfile_path;
-               cleanup_socket = socket_path;
-               signal(SIGHUP, terminate_intr);
-               signal(SIGINT, terminate_intr);
-               signal(SIGPIPE, terminate_intr);
-               signal(SIGTERM, terminate_intr);
-               signal(SIGALRM, terminate_intr);
-       }
+       if (fd_pidfile > 1)
+               close(fd_pidfile); /* Unlock the pid file */
+       cleanup_socket = socket_path;
+       if (!debug)
+               create_daemon();
+       signal(SIGHUP, terminate_intr);
+       signal(SIGINT, terminate_intr);
+       signal(SIGTERM, terminate_intr);
+       signal(SIGALRM, terminate_intr);
        signal(SIGPIPE, SIG_IGN);
 
        while (1) {
@@ -270,7 +264,7 @@ static void server_loop(const char *socket_path, int debug,
        }
 }
 
-static int call_daemon(const char *socket_path, int op, unsigned char *buf,
+static int call_daemon(const char *socket_path, int op, char *buf,
                       int buflen, int *num, const char **err_context)
 {
        char op_buf[8];
@@ -356,18 +350,55 @@ static int call_daemon(const char *socket_path, int op, unsigned char *buf,
        return ret;
 }
 
+static int create_pidfile(const char *socket_path, const char *pidfile_path,
+                         int quiet)
+{
+       int     fd, ret;
+       char    buf[20];
+
+       fd = open(pidfile_path, O_CREAT | O_RDWR, 0664);
+       if (fd < 0) {
+               if (!quiet)
+                       fprintf(stderr, "Failed to open/create %s: %s\n",
+                               pidfile_path, strerror(errno));
+               exit(1);
+       }
+       cleanup_pidfile = pidfile_path;
+       cleanup_socket = 0;
+       signal(SIGALRM, terminate_intr);
+       alarm(30);
+       if (lockf(fd, F_LOCK, 0) < 0) {
+               if (!quiet)
+                       fprintf(stderr, "Failed to lock %s: %s\n", 
+                               pidfile_path, strerror(errno));
+               exit(1);
+       }
+       ret = call_daemon(socket_path, 0, buf, sizeof(buf), 0, 0);
+       if (ret > 0) {
+               if (!quiet)
+                       printf(_("uuidd daemon already running at pid %s\n"),
+                              buf);
+               exit(1);
+       }
+       alarm(0);
+
+       sprintf(buf, "%d\n", getpid());
+       ftruncate(fd, 0);
+       write(fd, buf, strlen(buf));
+       return(fd);
+}
 
 int main(int argc, char **argv)
 {
        const char      *socket_path = UUIDD_SOCKET_PATH;
        const char      *pidfile_path = UUIDD_PIDFILE_PATH;
        const char      *err_context;
-       unsigned char   buf[1024], *cp;
+       char            buf[1024], *cp;
        char            str[37], *tmp;
        uuid_t          uu;
        uid_t           uid;
        gid_t           gid;
-       int             i, c, ret;
+       int             i, c, ret, fd_pidfile = -1;
        int             debug = 0, do_type = 0, do_kill = 0, num = 0;
        int             timeout = 0, quiet = 0, drop_privs = 0;
 
@@ -450,23 +481,23 @@ int main(int argc, char **argv)
                        if (ret != sizeof(uu) + sizeof(num))
                                goto unexpected_size;
 
-                       uuid_unparse(buf, str);
+                       uuid_unparse((unsigned char *) buf, str);
 
                        printf(_("%s and subsequent %d UUID's\n"), str, num);
                } else {
                        printf(_("List of UUID's:\n"));
                        cp = buf + 4;
-                       if (ret != sizeof(num) + num*sizeof(uu))
+                       if (ret != (int) (sizeof(num) + num*sizeof(uu)))
                                goto unexpected_size;
                        for (i=0; i < num; i++, cp+=16) {
-                               uuid_unparse(cp, str);
+                               uuid_unparse((unsigned char *) cp, str);
                                printf("\t%s\n", str);
                        }
                }
                exit(0);
        }
        if (do_type) {
-               ret = call_daemon(socket_path, do_type, (unsigned char *) &uu,
+               ret = call_daemon(socket_path, do_type, (char *) &uu,
                                  sizeof(uu), 0, &err_context);
                if (ret < 0) {
                        printf(_("Error calling uuidd daemon (%s): %s\n"),
@@ -485,12 +516,9 @@ int main(int argc, char **argv)
                exit(0);
        }
 
-       /*
-        * Check to make sure there isn't another daemon running already
-        */
-       ret = call_daemon(socket_path, 0, buf, sizeof(buf), 0, 0);
-       if (ret > 0) {
-               if (do_kill && ((do_kill = atoi((char *) buf)) > 0)) {
+       if (do_kill) {
+               ret = call_daemon(socket_path, 0, buf, sizeof(buf), 0, 0);
+               if ((ret > 0) && ((do_kill = atoi((char *) buf)) > 0)) {
                        ret = kill(do_kill, SIGTERM);
                        if (ret < 0) {
                                if (!quiet)
@@ -503,16 +531,12 @@ int main(int argc, char **argv)
                        if (!quiet)
                                printf(_("Killed uuidd running at pid %d\n"),
                                       do_kill);
-                       exit(0);
                }
-               if (!quiet)
-                       printf(_("uuidd daemon already running at pid %s\n"),
-                              buf);
-               exit(1);
+               exit(0);
        }
-       if (do_kill)
-               exit(0);        /* Nothing to kill */
 
-       server_loop(socket_path, debug, pidfile_path, timeout, quiet);
+       fd_pidfile = create_pidfile(socket_path, pidfile_path, quiet);
+
+       server_loop(socket_path, debug, fd_pidfile, timeout, quiet);
        return 0;
 }
index e1ba2cac1a116e9606c66fab666f06c3c7fd5970..49cc490b1f6e11d51201c45f248f374c9b26e789 100644 (file)
Binary files a/po/vi.gmo and b/po/vi.gmo differ
index 28016e9f8c88ffeccfff025ed58a0d92511d3f04..4dd2fa90e1a6e3ab99a9bdaed958ce5f1b631df0 100644 (file)
--- a/po/vi.po
+++ b/po/vi.po
 #.
 msgid ""
 msgstr ""
-"Project-Id-Version: e2fsprogs 1.40.1\n"
+"Project-Id-Version: e2fsprogs 1.40.3\n"
 "Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
 "POT-Creation-Date: 2007-12-05 19:25-0500\n"
-"PO-Revision-Date: 2007-07-11 15:41+0930\n"
+"PO-Revision-Date: 2007-12-19 18:02+1030\n"
 "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
 "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: LocFactoryEditor 1.6.4a6\n"
+"X-Generator: LocFactoryEditor 1.7b1\n"
 
 #: e2fsck/badblocks.c:22 misc/mke2fs.c:156
 #, c-format
@@ -112,8 +112,7 @@ msgstr "trong khi cập nhật nút thông tin khối hỏng"
 #: e2fsck/badblocks.c:129
 #, c-format
 msgid "Warning: illegal block %u found in bad block inode.  Cleared.\n"
-msgstr ""
-"Cảnh báo : tìm thấy khối cấm %u trong nút thông tin khối hỏng nên bị xoá.\n"
+msgstr "Cảnh báo : tìm thấy khối cấm %u trong nút thông tin khối hỏng nên bị xoá.\n"
 
 #: e2fsck/ehandler.c:53
 #, c-format
@@ -879,13 +878,11 @@ msgstr "@j bên ngoài không hỗ trợ @f này\n"
 #: e2fsck/problem.c:212
 msgid ""
 "Ext3 @j @S is unknown type %N (unsupported).\n"
-"It is likely that your copy of e2fsck is old and/or doesn't support this @j "
-"format.\n"
+"It is likely that your copy of e2fsck is old and/or doesn't support this @j format.\n"
 "It is also possible the @j @S is corrupt.\n"
 msgstr ""
 "@S @j ext3 có kiểu lạ %N (không được hỗ trợ).\n"
-"Rất có thể là bạn có một bản sao e2fsck cũ mà/hay không hỗ trợ định dạng @j "
-"này.\n"
+"Rất có thể là bạn có một bản sao e2fsck cũ mà/hay không hỗ trợ định dạng @j này.\n"
 "It is also possible the @S @j is corrupt.\n"
 
 #. @-expanded: Ext3 journal superblock is corrupt.\n
@@ -1223,8 +1220,7 @@ msgstr "@S chính (%b) nằm trên danh sách các @b sai.\n"
 #. @-expanded: Block %b in the primary group descriptors is on the bad block list\n
 #: e2fsck/problem.c:490
 msgid "Block %b in the primary @g descriptors is on the bad @b list\n"
-msgstr ""
-"Khối %b trong những mô tả @g chính có nằm trong danh sách các @b sai.\n"
+msgstr "Khối %b trong những mô tả @g chính có nằm trong danh sách các @b sai.\n"
 
 #. @-expanded: Warning: Group %g's superblock (%b) is bad.\n
 #: e2fsck/problem.c:496
@@ -1239,8 +1235,7 @@ msgstr "Cảnh báo : bản sao các mô tả @g của nhóm %g có một @b sai
 #. @-expanded: Programming error?  block #%b claimed for no reason in process_bad_block.\n
 #: e2fsck/problem.c:507
 msgid "Programming error?  @b #%b claimed for no reason in process_bad_@b.\n"
-msgstr ""
-"Lỗi lập trình ? @b %b được tuyên bố, không có lý do, trong process_bad_@b\n"
+msgstr "Lỗi lập trình ? @b %b được tuyên bố, không có lý do, trong process_bad_@b\n"
 
 #. @-expanded: error allocating %N contiguous block(s) in block group %g for %s: %m\n
 #: e2fsck/problem.c:513
@@ -1750,15 +1745,13 @@ msgstr "@i @d %i có một @b #%B chưa cấp phát."
 #: e2fsck/problem.c:994
 #, c-format
 msgid "'.' @d @e in @d @i %i is not NULL terminated\n"
-msgstr ""
-"@e @d « . » trong @i @d %i không được chấm dứt bằng NULL (vô giá trị)\n"
+msgstr "@e @d « . » trong @i @d %i không được chấm dứt bằng NULL (vô giá trị)\n"
 
 #. @-expanded: '..' directory entry in directory inode %i is not NULL terminated\n
 #: e2fsck/problem.c:999
 #, c-format
 msgid "'..' @d @e in @d @i %i is not NULL terminated\n"
-msgstr ""
-"@e @d « .. » trong @i @d %i không được chấm dứt bằng NULL (vô giá trị)\n"
+msgstr "@e @d « .. » trong @i @d %i không được chấm dứt bằng NULL (vô giá trị)\n"
 
 #. @-expanded: inode %i (%Q) is an illegal character device.\n
 #: e2fsck/problem.c:1004
@@ -2201,12 +2194,8 @@ msgstr "Số đếm các @b rảnh không đúng (%b, đã đếm=%c).\n"
 #. @-expanded: PROGRAMMING ERROR: filesystem (#%N) bitmap endpoints (%b, %c) don't match calculated bitmap 
 #. @-expanded: endpoints (%i, %j)\n
 #: e2fsck/problem.c:1458
-msgid ""
-"PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B "
-"endpoints (%i, %j)\n"
-msgstr ""
-"LỖI LẬP TRÌNH: trong @f (#%N) có các điểm cuối @B (%b, %c) không tương ứng "
-"với các điểm cuối @B đã tính (%i, %j)\n"
+msgid "PROGRAMMING ERROR: @f (#%N) @B endpoints (%b, %c) don't match calculated @B endpoints (%i, %j)\n"
+msgstr "LỖI LẬP TRÌNH: trong @f (#%N) có các điểm cuối @B (%b, %c) không tương ứng với các điểm cuối @B đã tính (%i, %j)\n"
 
 #: e2fsck/problem.c:1464
 msgid "Internal error: fudging end of bitmap (%N)\n"
@@ -2258,15 +2247,13 @@ msgstr "trong khi chạy tiến trình quét nút thông tin"
 #: e2fsck/super.c:187
 #, c-format
 msgid "while calling ext2fs_block_iterate for inode %d"
-msgstr ""
-"trong khi gọi hàm lặp lại khối « ext2fs_block_iterate » cho nút thông tin %d"
+msgstr "trong khi gọi hàm lặp lại khối « ext2fs_block_iterate » cho nút thông tin %d"
 
 #: e2fsck/super.c:210
 #, c-format
 msgid "while calling ext2fs_adjust_ea_refcount for inode %d"
 msgstr ""
-"trong khi gọi hàm điều chỉnh số đếm tham chiếu « ext2fs_adjust_ea_refcount "
-"»\n"
+"trong khi gọi hàm điều chỉnh số đếm tham chiếu « ext2fs_adjust_ea_refcount »\n"
 "cho nút thông tin %d"
 
 #: e2fsck/super.c:268
@@ -2338,8 +2325,7 @@ msgid ""
 " -p                   Automatic repair (no questions)\n"
 " -n                   Make no changes to the filesystem\n"
 " -y                   Assume \"yes\" to all questions\n"
-" -c                   Check for bad blocks and add them to the badblock "
-"list\n"
+" -c                   Check for bad blocks and add them to the badblock list\n"
 " -f                   Force checking even if filesystem is marked clean\n"
 msgstr ""
 "\n"
@@ -2348,8 +2334,7 @@ msgstr ""
 " -n                   Không thay đổi hệ thống tập tin\n"
 " -y                   Giả sử trả lời « Có » mọi câu hỏi\n"
 " -c                   Kiểm tra tìm khối sai: thêm vào danh sách khối sai\n"
-" -f                   Buộc kiểm tra ngay cả khi hệ thống tập tin có nhãn là "
-"sạch\n"
+" -f                   Buộc kiểm tra ngay cả khi hệ thống tập tin có nhãn là sạch\n"
 
 #: e2fsck/unix.c:86
 #, c-format
@@ -2436,7 +2421,7 @@ msgstr " chưa tháo gắn kết sạch"
 
 #: e2fsck/unix.c:284
 msgid " primary superblock features different from backup"
-msgstr ""
+msgstr "các tính năng của siêu khối chính khác với bản sao lưu"
 
 #: e2fsck/unix.c:288
 #, c-format
@@ -2532,8 +2517,7 @@ msgstr "Không cho phép tùy chọn không tương thích khi trao đổi byte.
 #: e2fsck/unix.c:808
 #, c-format
 msgid "The -c and the -l/-L options may not be both used at the same time.\n"
-msgstr ""
-"Không cho phép sử dụng đồng thời cả hai tùy chọn « --c » và « --l/L ».\n"
+msgstr "Không cho phép sử dụng đồng thời cả hai tùy chọn « --c » và « --l/L ».\n"
 
 #: e2fsck/unix.c:856
 #, c-format
@@ -2541,6 +2525,8 @@ msgid ""
 "E2FSCK_JBD_DEBUG \"%s\" not an integer\n"
 "\n"
 msgstr ""
+"E2FSCK_JBD_DEBUG « %s » không phải số nguyên\n"
+"\n"
 
 #: e2fsck/unix.c:864
 #, c-format
@@ -2549,6 +2535,9 @@ msgid ""
 "Invalid non-numeric argument to -%c (\"%s\")\n"
 "\n"
 msgstr ""
+"\n"
+"Đối số không thuộc số không hợp lệ đối với -%c (« %s »)\n"
+"\n"
 
 #: e2fsck/unix.c:903
 #, c-format
@@ -2569,13 +2558,13 @@ msgid "need terminal for interactive repairs"
 msgstr "cần thiết thiết bị cuối để sửa chữa tương tác"
 
 #: e2fsck/unix.c:977
-#, fuzzy, c-format
+#, c-format
 msgid "%s: %s trying backup blocks...\n"
-msgstr "%s đang thử các khối dự trữ...\n"
+msgstr "%s %s đang thử các khối dự trữ...\n"
 
 #: e2fsck/unix.c:979
 msgid "Superblock invalid,"
-msgstr ""
+msgstr "Siêu khối không hợp lệ,"
 
 #: e2fsck/unix.c:980
 msgid "Group descriptors look bad..."
@@ -2600,9 +2589,7 @@ msgstr "Phân vùng này có thể có độ dài bằng không ?\n"
 #: e2fsck/unix.c:1002
 #, c-format
 msgid "You must have %s access to the filesystem or be root\n"
-msgstr ""
-"Bạn phải có quyền truy cập %s vào hệ thống tập tin, hoặc là người chủ "
-"(root)\n"
+msgstr "Bạn phải có quyền truy cập %s vào hệ thống tập tin, hoặc là người chủ (root)\n"
 
 #: e2fsck/unix.c:1007
 #, c-format
@@ -2612,8 +2599,7 @@ msgstr "Có thể là thiết bị không tồn tại, hoặc thiết bị trao
 #: e2fsck/unix.c:1009
 #, c-format
 msgid "Filesystem mounted or opened exclusively by another program?\n"
-msgstr ""
-"Hệ thống tập tin đã được gắn kết hay mở hoàn toàn bởi chương trình khác ?\n"
+msgstr "Hệ thống tập tin đã được gắn kết hay mở hoàn toàn bởi chương trình khác ?\n"
 
 #: e2fsck/unix.c:1013
 #, c-format
@@ -2635,12 +2621,8 @@ msgstr "trong khi kiểm tra nhật ký ext3 tìm %s"
 
 #: e2fsck/unix.c:1109
 #, c-format
-msgid ""
-"Warning: skipping journal recovery because doing a read-only filesystem "
-"check.\n"
-msgstr ""
-"Cảnh báo : đang bỏ qua việc phục hồi nhật ký vì đang kiểm tra hệ thống tập "
-"tin một cách chỉ đọc.\n"
+msgid "Warning: skipping journal recovery because doing a read-only filesystem check.\n"
+msgstr "Cảnh báo : đang bỏ qua việc phục hồi nhật ký vì đang kiểm tra hệ thống tập tin một cách chỉ đọc.\n"
 
 #: e2fsck/unix.c:1122
 #, c-format
@@ -2677,8 +2659,7 @@ msgstr "trong khi đọc nút thông tin khối sai"
 #: e2fsck/unix.c:1233
 #, c-format
 msgid "This doesn't bode well, but we'll try to go on...\n"
-msgstr ""
-"Đây không phải báo trước điềm hay, nhưng tiến trình này sẽ thử tiếp tục...\n"
+msgstr "Đây không phải báo trước điềm hay, nhưng tiến trình này sẽ thử tiếp tục...\n"
 
 #: e2fsck/unix.c:1259
 msgid "Couldn't determine journal size"
@@ -2895,13 +2876,11 @@ msgstr "done                                \n"
 #, c-format
 msgid ""
 "Usage: %s [-b block_size] [-i input_file] [-o output_file] [-svwnf]\n"
-" [-c blocks_at_once] [-p num_passes] [-t test_pattern [-t test_pattern "
-"[...]]]\n"
+" [-c blocks_at_once] [-p num_passes] [-t test_pattern [-t test_pattern [...]]]\n"
 " device [last_block [start_block]]\n"
 msgstr ""
 "Cách sử dụng: %s [-b cỡ_khối] [-i tập_tin_nhập] [-o tập_tin_xuất] [-svwnf]\n"
-" [-c các_khối_cùng_lúc] [-p số_lần_qua] [-t mẫu_thử_ra [-t mẫu_thử_ra "
-"[...]]]\n"
+" [-c các_khối_cùng_lúc] [-p số_lần_qua] [-t mẫu_thử_ra [-t mẫu_thử_ra [...]]]\n"
 " thiết_bị [khối_cuối [khối_đầu]]\n"
 
 #: misc/badblocks.c:88
@@ -3030,8 +3009,7 @@ msgstr "mẫu thử (test_pattern) không hợp lệ: %s\n"
 
 #: misc/badblocks.c:961
 msgid "Maximum of one test_pattern may be specified in read-only mode"
-msgstr ""
-"Trong chế độ chỉ đọc, có thể xác định tối đa một mẫu thử (test_pattern)"
+msgstr "Trong chế độ chỉ đọc, có thể xác định tối đa một mẫu thử (test_pattern)"
 
 #: misc/badblocks.c:967
 msgid "Random test_pattern is not allowed in read-only mode"
@@ -3414,10 +3392,8 @@ msgstr "Không thể cấp phát bộ nhớ cho kiểu hế thống tập tin\n"
 
 #: misc/fsck.c:875
 #, c-format
-msgid ""
-"%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass "
-"number\n"
-msgstr ""
+msgid "%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"
+msgstr "%s: đang bỏ qua dòng sai trong « /etc/fstab »: đóng kết lắp với số gửi qua fsck khác số không\n"
 
 #: misc/fsck.c:902
 #, c-format
@@ -3434,8 +3410,7 @@ msgid "--waiting-- (pass %d)\n"
 msgstr "--đang đợi-- (lần qua %d)\n"
 
 #: misc/fsck.c:1064
-msgid ""
-"Usage: fsck [-ANPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
+msgid "Usage: fsck [-ANPRTV] [ -C [ fd ] ] [-t fstype] [fs-options] [filesys ...]\n"
 msgstr ""
 "Cách sử dụng: fsck [-ANPRTV] [ -C [ fd ] ] [-t kiểu_HTT]\n"
 "[tùy_chọn_HTT] [HTT ...]\n"
@@ -3467,7 +3442,7 @@ msgid "While reading version on %s"
 msgstr "Trong khi đọc phiên bản trên %s"
 
 #: misc/mke2fs.c:97
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "Usage: %s [-c|-t|-l filename] [-b block-size] [-f fragment-size]\n"
 "\t[-i bytes-per-inode] [-I inode-size] [-j] [-J journal-options]\n"
@@ -3476,12 +3451,11 @@ msgid ""
 "\t[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]] [-qvSV]\n"
 "\tdevice [blocks-count]\n"
 msgstr ""
-"Cách sử dụng: %s [-c|-t|-l tên_tập_tin] [-b cỡ_khối] [-f cỡ_đoạn]\n"
-"\t[-i byte_mỗi_nút_thông_tin] [-I cỡ_nút_thông_tin] [-j] [-J "
-"tùy_chọn_nhật_ký]\n"
-"\t[-N số_nút_thông_tin] [-m phần_trăm_khối_dành_riêng] [-o HĐH_tạo]\n"
+"Sử dụng: %s [-c|-t|-l tên_tập_tin] [-b cỡ_khối] [-f cỡ_đoạn]\n"
+"\t[-i byte_mỗi_inode] [-I cỡ_inode] [-j] [-J tùy_chọn_nhật_ký]\n"
+"\t[-N số_inode] [-m phần_trăm_khối_dành_riêng] [-o HĐH_tạo]\n"
 "\t[-g khối_mỗi_nhóm] [-L nhãn_khối_tin] [-M thư_mục_lắp_cuối]\n"
-"\t[-O tính_năng[,...]] [-r bản_sửa_đổi_HTT] [-R tùy_chọn] [-qvSV]\n"
+"\t[-O tính_năng[,...]] [-r bản_sửa_đổi_HTT] [-E tùy_chọn_mở_rộng] [-qvSV]\n"
 "\tthiết_bị [số_đếm_khối]\n"
 "\n"
 "[HĐH: hệ điều hành\n"
@@ -3703,8 +3677,7 @@ msgstr "Tham số thay đổi kích cỡ không hợp lệ: %s\n"
 #: misc/mke2fs.c:819
 #, c-format
 msgid "The resize maximum must be greater than the filesystem size.\n"
-msgstr ""
-"Số thay đổi kích cỡ tối đa phải lớn hơn kích cỡ của hệ thống tập tin.\n"
+msgstr "Số thay đổi kích cỡ tối đa phải lớn hơn kích cỡ của hệ thống tập tin.\n"
 
 #: misc/mke2fs.c:843
 #, c-format
@@ -3828,8 +3801,7 @@ msgstr "Khối %d-byte quá lớn đối với hệ thống (tối đa %d)"
 
 #: misc/mke2fs.c:1211
 #, c-format
-msgid ""
-"Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
+msgid "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
 msgstr ""
 "Cảnh báo : khối %d-byte quá lớn đối với hệ thống (tối đa %d)\n"
 "nên bị buộc tiếp tục\n"
@@ -4531,9 +4503,3 @@ msgstr "khối siêu dữ liệu"
 #, c-format
 msgid "Should never happen: resize inode corrupt!\n"
 msgstr "Không bao giờ nên xảy ra: nút thông tin thay đổi kích cỡ bị hỏng !\n"
-
-#~ msgid "Couldn't find ext2 superblock,"
-#~ msgstr "Không tìm thấy siêu khối ext2,"
-
-#~ msgid "invalid blocks range: %lu-%lu"
-#~ msgstr "phạm vị khối không hợp lệ: %lu - %lu"
index bf53d129989ea44e764a58014d4be18422297ecf..ca2c68cd3f0272db14db96185155bb74c1b228c7 100644 (file)
@@ -49,7 +49,7 @@ errcode_t ext2fs_create_extent_table(ext2_extent *ret_extent, int size)
        extent->num = 0;
        extent->sorted = 1;
 
-       retval = ext2fs_get_mem(sizeof(struct ext2_extent_entry) *
+       retval = ext2fs_get_array(sizeof(struct ext2_extent_entry),
                                extent->size, &extent->list);
        if (retval) {
                ext2fs_free_mem(&extent);
index 12bdd896957f28cd1108afdef1cae411e7c188bf..c9409f4ef621842856fe2513991aa2ea42a62d95 100644 (file)
@@ -480,7 +480,7 @@ static errcode_t adjust_superblock(ext2_resize_t rfs, blk_t new_size)
        /*
         * Initialize the new block group descriptors
         */
-       retval = ext2fs_get_mem(fs->blocksize * fs->inode_blocks_per_group,
+       retval = ext2fs_get_array(fs->blocksize, fs->inode_blocks_per_group,
                                &rfs->itable_buf);
        if (retval)
                goto errout;
@@ -916,7 +916,7 @@ static errcode_t block_mover(ext2_resize_t rfs)
 
        new_blk = fs->super->s_first_data_block;
        if (!rfs->itable_buf) {
-               retval = ext2fs_get_mem(fs->blocksize *
+               retval = ext2fs_get_array(fs->blocksize,
                                        fs->inode_blocks_per_group,
                                        &rfs->itable_buf);
                if (retval)
@@ -1137,7 +1137,7 @@ static errcode_t inode_scan_and_fix(ext2_resize_t rfs)
 
        retval = ext2fs_init_dblist(rfs->old_fs, 0);
        if (retval) goto errout;
-       retval = ext2fs_get_mem(rfs->old_fs->blocksize * 3, &block_buf);
+       retval = ext2fs_get_array(rfs->old_fs->blocksize, 3, &block_buf);
        if (retval) goto errout;
 
        start_to_move = (rfs->new_fs->group_desc_count *
index 388e015d4cff8cdbdf7f5e10cd7c14a81c2191eb..b2c0979136ba62b5d97fdac4beb3cc773ad70f68 100644 (file)
--- a/version.h
+++ b/version.h
@@ -7,5 +7,5 @@
  * redistributed under the GNU Public License.
  */
 
-#define E2FSPROGS_VERSION "1.40.3"
-#define E2FSPROGS_DATE "05-Dec-2007"
+#define E2FSPROGS_VERSION "1.40.4"
+#define E2FSPROGS_DATE "31-Dec-2007"