mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-30 13:33:33 +08:00
Merge branch 'maint' into next
This commit is contained in:
commit
32d33132a8
@ -213,8 +213,7 @@ DEP_INSTALL_SYMLINK = $(top_builddir)/util/install-symlink \
|
||||
# Run make gcc-wall to do a build with warning messages.
|
||||
#
|
||||
#
|
||||
WFLAGS= -std=gnu99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
|
||||
-pedantic $(WFLAGS_EXTRA) \
|
||||
WFLAGS= -std=gnu99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE $(WFLAGS_EXTRA) \
|
||||
-Wall -W -Wwrite-strings -Wpointer-arith \
|
||||
-Wcast-qual -Wcast-align -Wno-variadic-macros \
|
||||
-Wstrict-prototypes -Wmissing-prototypes \
|
||||
@ -224,14 +223,14 @@ WFLAGS= -std=gnu99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
|
||||
-UENABLE_NLS
|
||||
|
||||
gcc-wall-new:
|
||||
($(MAKE) CFLAGS_WARN="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup
|
||||
($(MAKE) CFLAGS_WARN="$(WFLAGS)" > /dev/null) 2>&1
|
||||
|
||||
gcc-wall:
|
||||
$(MAKE) clean > /dev/null
|
||||
$(MAKE) gcc-wall-new
|
||||
|
||||
static-check:
|
||||
($(MAKE) C=1 V=1 CFLAGS="$(ALL_CFLAGS) $(WFLAGS)") 2>&1 | sed -f $(top_srcdir)/util/static-analysis-cleanup
|
||||
($(MAKE) C=1 V=1 CFLAGS="$(ALL_CFLAGS) $(WFLAGS)") 2>&1
|
||||
|
||||
static-check-all:
|
||||
$(MAKE) clean > /dev/null
|
||||
|
361
config/config.guess
vendored
Normal file → Executable file
361
config/config.guess
vendored
Normal file → Executable file
@ -1,8 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2018-03-01'
|
||||
timestamp='2020-01-01'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -50,7 +50,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
Copyright 1992-2020 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@ -84,8 +84,6 @@ if test $# != 0; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap 'exit 1' 1 2 15
|
||||
|
||||
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
||||
# compiler to aid in system detection is discouraged as it requires
|
||||
# temporary files to be created and, as you can see below, it is a
|
||||
@ -96,34 +94,40 @@ trap 'exit 1' 1 2 15
|
||||
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int x;" > "$dummy.c" ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac ; set_cc_for_build= ;'
|
||||
tmp=
|
||||
# shellcheck disable=SC2172
|
||||
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
|
||||
|
||||
set_cc_for_build() {
|
||||
# prevent multiple calls if $tmp is already set
|
||||
test "$tmp" && return 0
|
||||
: "${TMPDIR=/tmp}"
|
||||
# shellcheck disable=SC2039
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
|
||||
dummy=$tmp/dummy
|
||||
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
|
||||
,,) echo "int x;" > "$dummy.c"
|
||||
for driver in cc gcc c89 c99 ; do
|
||||
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD="$driver"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||
if test -f /.attbin/uname ; then
|
||||
PATH=$PATH:/.attbin ; export PATH
|
||||
fi
|
||||
|
||||
@ -138,7 +142,7 @@ Linux|GNU|GNU/*)
|
||||
# We could probably try harder.
|
||||
LIBC=gnu
|
||||
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
cat <<-EOF > "$dummy.c"
|
||||
#include <features.h>
|
||||
#if defined(__UCLIBC__)
|
||||
@ -199,7 +203,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
os=netbsdelf
|
||||
;;
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ELF__
|
||||
then
|
||||
@ -237,7 +241,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "$machine-${os}${release}${abi}"
|
||||
echo "$machine-${os}${release}${abi-}"
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
@ -260,6 +264,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
*:SolidBSD:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
*:OS108:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
macppc:MirBSD:*:*)
|
||||
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
@ -269,12 +276,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
*:Sortix:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-sortix
|
||||
exit ;;
|
||||
*:Twizzler:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-twizzler
|
||||
exit ;;
|
||||
*:Redox:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-redox
|
||||
exit ;;
|
||||
mips:OSF1:*.*)
|
||||
echo mips-dec-osf1
|
||||
exit ;;
|
||||
echo mips-dec-osf1
|
||||
exit ;;
|
||||
alpha:OSF1:*:*)
|
||||
case $UNAME_RELEASE in
|
||||
*4.0)
|
||||
@ -389,7 +399,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
echo i386-pc-auroraux"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
SUN_ARCH=i386
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
@ -482,7 +492,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
|
||||
echo clipper-intergraph-clix"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
@ -579,7 +589,7 @@ EOF
|
||||
exit ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
@ -660,7 +670,7 @@ EOF
|
||||
esac
|
||||
fi
|
||||
if [ "$HP_ARCH" = "" ]; then
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
@ -700,7 +710,7 @@ EOF
|
||||
esac
|
||||
if [ "$HP_ARCH" = hppa2.0w ]
|
||||
then
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
|
||||
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
|
||||
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
|
||||
@ -726,7 +736,7 @@ EOF
|
||||
echo ia64-hp-hpux"$HPUX_REV"
|
||||
exit ;;
|
||||
3050*:HI-UX:*:*)
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#include <unistd.h>
|
||||
int
|
||||
@ -840,6 +850,17 @@ EOF
|
||||
*:BSD/OS:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
arm:FreeBSD:*:*)
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
set_cc_for_build
|
||||
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_PCS_VFP
|
||||
then
|
||||
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
|
||||
else
|
||||
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
|
||||
fi
|
||||
exit ;;
|
||||
*:FreeBSD:*:*)
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
case "$UNAME_PROCESSOR" in
|
||||
@ -881,7 +902,7 @@ EOF
|
||||
echo "$UNAME_MACHINE"-pc-uwin
|
||||
exit ;;
|
||||
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
|
||||
echo x86_64-unknown-cygwin
|
||||
echo x86_64-pc-cygwin
|
||||
exit ;;
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
||||
@ -894,8 +915,8 @@ EOF
|
||||
# other systems with GNU libc and userland
|
||||
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
||||
exit ;;
|
||||
i*86:Minix:*:*)
|
||||
echo "$UNAME_MACHINE"-pc-minix
|
||||
*:Minix:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-minix
|
||||
exit ;;
|
||||
aarch64:Linux:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
@ -905,7 +926,7 @@ EOF
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
EV56) UNAME_MACHINE=alphaev56 ;;
|
||||
PCA56) UNAME_MACHINE=alphapca56 ;;
|
||||
@ -922,7 +943,7 @@ EOF
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
@ -971,23 +992,51 @@ EOF
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
exit ;;
|
||||
mips:Linux:*:* | mips64:Linux:*:*)
|
||||
eval "$set_cc_for_build"
|
||||
set_cc_for_build
|
||||
IS_GLIBC=0
|
||||
test x"${LIBC}" = xgnu && IS_GLIBC=1
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#undef CPU
|
||||
#undef ${UNAME_MACHINE}
|
||||
#undef ${UNAME_MACHINE}el
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if ${IS_GLIBC} && defined(_ABI64)
|
||||
LIBCABI=gnuabi64
|
||||
#else
|
||||
#if ${IS_GLIBC} && defined(_ABIN32)
|
||||
LIBCABI=gnuabin32
|
||||
#else
|
||||
LIBCABI=${LIBC}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
|
||||
CPU=mipsisa64r6
|
||||
#else
|
||||
#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
|
||||
CPU=mipsisa32r6
|
||||
#else
|
||||
#if defined(__mips64)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=mips
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=${UNAME_MACHINE}el
|
||||
MIPS_ENDIAN=el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=${UNAME_MACHINE}
|
||||
MIPS_ENDIAN=
|
||||
#else
|
||||
CPU=
|
||||
MIPS_ENDIAN=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
|
||||
test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
|
||||
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
|
||||
test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
|
||||
;;
|
||||
mips64el:Linux:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
@ -1100,7 +1149,7 @@ EOF
|
||||
*Pentium) UNAME_MACHINE=i586 ;;
|
||||
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
|
||||
esac
|
||||
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
|
||||
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
|
||||
exit ;;
|
||||
i*86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
@ -1284,38 +1333,39 @@ EOF
|
||||
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
eval "$set_cc_for_build"
|
||||
if test "$UNAME_PROCESSOR" = unknown ; then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
case $UNAME_PROCESSOR in
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
if command -v xcode-select > /dev/null 2> /dev/null && \
|
||||
! xcode-select --print-path > /dev/null 2> /dev/null ; then
|
||||
# Avoid executing cc if there is no toolchain installed as
|
||||
# cc will be a stub that puts up a graphical alert
|
||||
# prompting the user to install developer tools.
|
||||
CC_FOR_BUILD=no_compiler_found
|
||||
else
|
||||
set_cc_for_build
|
||||
fi
|
||||
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
||||
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_PPC >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
case $UNAME_PROCESSOR in
|
||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||
esac
|
||||
fi
|
||||
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
||||
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_PPC >/dev/null
|
||||
then
|
||||
UNAME_PROCESSOR=powerpc
|
||||
fi
|
||||
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
||||
# that puts up a graphical alert prompting to install
|
||||
# developer tools. Any system running Mac OS X 10.7 or
|
||||
# later (Darwin 11 and later) is required to have a 64-bit
|
||||
# processor. This is not true of the ARM version of Darwin
|
||||
# that Apple uses in portable devices.
|
||||
UNAME_PROCESSOR=x86_64
|
||||
# uname -m returns i386 or x86_64
|
||||
UNAME_PROCESSOR=$UNAME_MACHINE
|
||||
fi
|
||||
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
@ -1358,6 +1408,7 @@ EOF
|
||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||
# is converted to i386 for consistency with other x86
|
||||
# operating systems.
|
||||
# shellcheck disable=SC2154
|
||||
if test "$cputype" = 386; then
|
||||
UNAME_MACHINE=i386
|
||||
else
|
||||
@ -1414,8 +1465,148 @@ EOF
|
||||
amd64:Isilon\ OneFS:*:*)
|
||||
echo x86_64-unknown-onefs
|
||||
exit ;;
|
||||
*:Unleashed:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
# No uname command or uname output not recognized.
|
||||
set_cc_for_build
|
||||
cat > "$dummy.c" <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
#include <sys/types.h>
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
|
||||
#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
|
||||
#include <signal.h>
|
||||
#if defined(_SIZE_T_) || defined(SIGLOST)
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
#include <sys/param.h>
|
||||
#if defined (BSD)
|
||||
#if BSD == 43
|
||||
printf ("vax-dec-bsd4.3\n"); exit (0);
|
||||
#else
|
||||
#if BSD == 199006
|
||||
printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#endif
|
||||
#else
|
||||
#if defined(_SIZE_T_) || defined(SIGLOST)
|
||||
struct utsname un;
|
||||
uname (&un);
|
||||
printf ("vax-dec-ultrix%s\n", un.release); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
|
||||
#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
|
||||
#if defined(_SIZE_T_) || defined(SIGLOST)
|
||||
struct utsname *un;
|
||||
uname (&un);
|
||||
printf ("mips-dec-ultrix%s\n", un.release); exit (0);
|
||||
#else
|
||||
printf ("mips-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
|
||||
{ echo "$SYSTEM_NAME"; exit; }
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
|
||||
|
||||
echo "$0: unable to guess system type" >&2
|
||||
|
||||
case "$UNAME_MACHINE:$UNAME_SYSTEM" in
|
||||
@ -1469,7 +1660,7 @@ EOF
|
||||
exit 1
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-functions 'time-stamp)
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "timestamp='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
|
2716
config/config.sub
vendored
Normal file → Executable file
2716
config/config.sub
vendored
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@ -72,8 +72,7 @@ static struct basefs_entry *basefs_readline(FILE *f, const char *mountpoint,
|
||||
range_start = atoll(block);
|
||||
block = strtok_r(NULL, "-", &saveptr2);
|
||||
range_end = block ? atoll(block) : range_start;
|
||||
add_blocks_to_range(&entry->head, &entry->tail, range_start,
|
||||
range_end);
|
||||
add_blocks_to_range(&entry->blocks, range_start, range_end);
|
||||
block_range = strtok_r(NULL, ",\n", &saveptr1);
|
||||
}
|
||||
end:
|
||||
@ -151,7 +150,6 @@ static int start_new_file(char *path, ext2_ino_t ino EXT2FS_ATTR((unused)),
|
||||
{
|
||||
struct base_fs *params = data;
|
||||
|
||||
params->entry.head = params->entry.tail = NULL;
|
||||
params->entry.path = LINUX_S_ISREG(inode->i_mode) ? path : NULL;
|
||||
return 0;
|
||||
}
|
||||
@ -162,8 +160,7 @@ static int add_block(ext2_filsys fs EXT2FS_ATTR((unused)), blk64_t blocknr,
|
||||
struct base_fs *params = data;
|
||||
|
||||
if (params->entry.path && !metadata)
|
||||
add_blocks_to_range(¶ms->entry.head, ¶ms->entry.tail,
|
||||
blocknr, blocknr);
|
||||
add_blocks_to_range(¶ms->entry.blocks, blocknr, blocknr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -181,11 +178,11 @@ static int end_new_file(void *data)
|
||||
return 0;
|
||||
if (fprintf(params->file, "%s%s ", params->mountpoint,
|
||||
params->entry.path) < 0
|
||||
|| write_block_ranges(params->file, params->entry.head, ",")
|
||||
|| write_block_ranges(params->file, params->entry.blocks.head, ",")
|
||||
|| fwrite("\n", 1, 1, params->file) != 1)
|
||||
return -1;
|
||||
|
||||
delete_block_ranges(params->entry.head);
|
||||
delete_block_ranges(¶ms->entry.blocks);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,7 @@
|
||||
|
||||
struct basefs_entry {
|
||||
char *path;
|
||||
struct block_range *head;
|
||||
struct block_range *tail;
|
||||
struct block_range_list blocks;
|
||||
};
|
||||
|
||||
extern struct fsmap_format base_fs_format;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "basefs_allocator.h"
|
||||
@ -8,108 +9,249 @@
|
||||
struct base_fs_allocator {
|
||||
struct ext2fs_hashmap *entries;
|
||||
struct basefs_entry *cur_entry;
|
||||
/* Blocks which are definitely owned by a single inode in BaseFS. */
|
||||
ext2fs_block_bitmap exclusive_block_map;
|
||||
/* Blocks which are available to the first inode that requests it. */
|
||||
ext2fs_block_bitmap dedup_block_map;
|
||||
};
|
||||
|
||||
static errcode_t basefs_block_allocator(ext2_filsys, blk64_t, blk64_t *,
|
||||
struct blk_alloc_ctx *ctx);
|
||||
|
||||
static void fs_free_blocks_range(ext2_filsys fs, struct block_range *blocks)
|
||||
/*
|
||||
* Free any reserved, but unconsumed block ranges in the allocator. This both
|
||||
* frees the block_range_list data structure and unreserves exclusive blocks
|
||||
* from the block map.
|
||||
*/
|
||||
static void fs_free_blocks_range(ext2_filsys fs,
|
||||
struct base_fs_allocator *allocator,
|
||||
struct block_range_list *list)
|
||||
{
|
||||
ext2fs_block_bitmap exclusive_map = allocator->exclusive_block_map;
|
||||
|
||||
blk64_t block;
|
||||
while (list->head) {
|
||||
block = consume_next_block(list);
|
||||
if (ext2fs_test_block_bitmap2(exclusive_map, block)) {
|
||||
ext2fs_unmark_block_bitmap2(fs->block_map, block);
|
||||
ext2fs_unmark_block_bitmap2(exclusive_map, block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void basefs_allocator_free(ext2_filsys fs,
|
||||
struct base_fs_allocator *allocator)
|
||||
{
|
||||
struct basefs_entry *e;
|
||||
struct ext2fs_hashmap_entry *it = NULL;
|
||||
struct ext2fs_hashmap *entries = allocator->entries;
|
||||
|
||||
if (entries) {
|
||||
while ((e = ext2fs_hashmap_iter_in_order(entries, &it))) {
|
||||
fs_free_blocks_range(fs, allocator, &e->blocks);
|
||||
delete_block_ranges(&e->blocks);
|
||||
}
|
||||
ext2fs_hashmap_free(entries);
|
||||
}
|
||||
ext2fs_free_block_bitmap(allocator->exclusive_block_map);
|
||||
ext2fs_free_block_bitmap(allocator->dedup_block_map);
|
||||
free(allocator);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build a bitmap of which blocks are definitely owned by exactly one file in
|
||||
* Base FS. Blocks which are not valid or are de-duplicated are skipped. This
|
||||
* is called during allocator initialization, to ensure that libext2fs does
|
||||
* not allocate which we want to re-use.
|
||||
*
|
||||
* If a block was allocated in the initial filesystem, it can never be re-used,
|
||||
* so it will appear in neither the exclusive or dedup set. If a block is used
|
||||
* by multiple files, it will be removed from the owned set and instead added
|
||||
* to the dedup set.
|
||||
*
|
||||
* The dedup set is not removed from fs->block_map. This allows us to re-use
|
||||
* dedup blocks separately and not have them be allocated outside of file data.
|
||||
*/
|
||||
static void fs_reserve_block(ext2_filsys fs,
|
||||
struct base_fs_allocator *allocator,
|
||||
blk64_t block)
|
||||
{
|
||||
ext2fs_block_bitmap exclusive_map = allocator->exclusive_block_map;
|
||||
ext2fs_block_bitmap dedup_map = allocator->dedup_block_map;
|
||||
|
||||
if (block >= ext2fs_blocks_count(fs->super))
|
||||
return;
|
||||
|
||||
if (ext2fs_test_block_bitmap2(fs->block_map, block)) {
|
||||
if (!ext2fs_test_block_bitmap2(exclusive_map, block))
|
||||
return;
|
||||
ext2fs_unmark_block_bitmap2(exclusive_map, block);
|
||||
ext2fs_mark_block_bitmap2(dedup_map, block);
|
||||
} else {
|
||||
ext2fs_mark_block_bitmap2(fs->block_map, block);
|
||||
ext2fs_mark_block_bitmap2(exclusive_map, block);
|
||||
}
|
||||
}
|
||||
|
||||
static void fs_reserve_blocks_range(ext2_filsys fs,
|
||||
struct base_fs_allocator *allocator,
|
||||
struct block_range_list *list)
|
||||
{
|
||||
blk64_t block;
|
||||
struct block_range *blocks = list->head;
|
||||
|
||||
while (blocks) {
|
||||
ext2fs_unmark_block_bitmap_range2(fs->block_map, blocks->start,
|
||||
blocks->end - blocks->start + 1);
|
||||
for (block = blocks->start; block <= blocks->end; block++)
|
||||
fs_reserve_block(fs, allocator, block);
|
||||
blocks = blocks->next;
|
||||
}
|
||||
}
|
||||
|
||||
static void fs_reserve_blocks_range(ext2_filsys fs, struct block_range *blocks)
|
||||
/*
|
||||
* For each file in the base FS map, ensure that its blocks are reserved in
|
||||
* the actual block map. This prevents libext2fs from allocating them for
|
||||
* general purpose use, and ensures that if the file needs data blocks, they
|
||||
* can be re-acquired exclusively for that file.
|
||||
*
|
||||
* If a file in the base map is missing, or not a regular file in the new
|
||||
* filesystem, then it's skipped to ensure that its blocks are reusable.
|
||||
*/
|
||||
static errcode_t fs_reserve_blocks(ext2_filsys fs,
|
||||
struct base_fs_allocator *allocator,
|
||||
const char *src_dir)
|
||||
{
|
||||
while (blocks) {
|
||||
ext2fs_mark_block_bitmap_range2(fs->block_map,
|
||||
blocks->start, blocks->end - blocks->start + 1);
|
||||
blocks = blocks->next;
|
||||
int nbytes;
|
||||
char full_path[PATH_MAX];
|
||||
const char *sep = "/";
|
||||
struct stat st;
|
||||
struct basefs_entry *e;
|
||||
struct ext2fs_hashmap_entry *it = NULL;
|
||||
struct ext2fs_hashmap *entries = allocator->entries;
|
||||
|
||||
if (strlen(src_dir) && src_dir[strlen(src_dir) - 1] == '/')
|
||||
sep = "";
|
||||
|
||||
while ((e = ext2fs_hashmap_iter_in_order(entries, &it))) {
|
||||
nbytes = snprintf(full_path, sizeof(full_path), "%s%s%s",
|
||||
src_dir, sep, e->path);
|
||||
if (nbytes >= sizeof(full_path))
|
||||
return ENAMETOOLONG;
|
||||
if (lstat(full_path, &st) || !S_ISREG(st.st_mode))
|
||||
continue;
|
||||
fs_reserve_blocks_range(fs, allocator, &e->blocks);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
errcode_t base_fs_alloc_load(ext2_filsys fs, const char *file,
|
||||
const char *mountpoint)
|
||||
const char *mountpoint, const char *src_dir)
|
||||
{
|
||||
errcode_t retval;
|
||||
struct basefs_entry *e;
|
||||
struct ext2fs_hashmap_entry *it = NULL;
|
||||
errcode_t retval = 0;
|
||||
struct base_fs_allocator *allocator;
|
||||
struct ext2fs_hashmap *entries = basefs_parse(file, mountpoint);
|
||||
if (!entries)
|
||||
return -1;
|
||||
|
||||
allocator = malloc(sizeof(*allocator));
|
||||
if (!allocator)
|
||||
goto err_alloc;
|
||||
allocator = calloc(1, sizeof(*allocator));
|
||||
if (!allocator) {
|
||||
retval = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
retval = ext2fs_read_bitmaps(fs);
|
||||
if (retval)
|
||||
goto err_bitmap;
|
||||
while ((e = ext2fs_hashmap_iter_in_order(entries, &it)))
|
||||
fs_reserve_blocks_range(fs, e->head);
|
||||
goto err_load;
|
||||
|
||||
allocator->cur_entry = NULL;
|
||||
allocator->entries = entries;
|
||||
allocator->entries = basefs_parse(file, mountpoint);
|
||||
if (!allocator->entries) {
|
||||
retval = EIO;
|
||||
goto err_load;
|
||||
}
|
||||
retval = ext2fs_allocate_block_bitmap(fs, "exclusive map",
|
||||
&allocator->exclusive_block_map);
|
||||
if (retval)
|
||||
goto err_load;
|
||||
retval = ext2fs_allocate_block_bitmap(fs, "dedup map",
|
||||
&allocator->dedup_block_map);
|
||||
if (retval)
|
||||
goto err_load;
|
||||
|
||||
retval = fs_reserve_blocks(fs, allocator, src_dir);
|
||||
if (retval)
|
||||
goto err_load;
|
||||
|
||||
/* Override the default allocator */
|
||||
fs->get_alloc_block2 = basefs_block_allocator;
|
||||
fs->priv_data = allocator;
|
||||
|
||||
return 0;
|
||||
goto out;
|
||||
|
||||
err_bitmap:
|
||||
free(allocator);
|
||||
err_alloc:
|
||||
ext2fs_hashmap_free(entries);
|
||||
return EXIT_FAILURE;
|
||||
err_load:
|
||||
basefs_allocator_free(fs, allocator);
|
||||
out:
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Try and acquire the next usable block from the Base FS map. */
|
||||
static int get_next_block(ext2_filsys fs, struct base_fs_allocator *allocator,
|
||||
struct block_range_list* list, blk64_t *ret)
|
||||
{
|
||||
blk64_t block;
|
||||
ext2fs_block_bitmap exclusive_map = allocator->exclusive_block_map;
|
||||
ext2fs_block_bitmap dedup_map = allocator->dedup_block_map;
|
||||
|
||||
while (list->head) {
|
||||
block = consume_next_block(list);
|
||||
if (block >= ext2fs_blocks_count(fs->super))
|
||||
continue;
|
||||
if (ext2fs_test_block_bitmap2(exclusive_map, block)) {
|
||||
ext2fs_unmark_block_bitmap2(exclusive_map, block);
|
||||
*ret = block;
|
||||
return 0;
|
||||
}
|
||||
if (ext2fs_test_block_bitmap2(dedup_map, block)) {
|
||||
ext2fs_unmark_block_bitmap2(dedup_map, block);
|
||||
*ret = block;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static errcode_t basefs_block_allocator(ext2_filsys fs, blk64_t goal,
|
||||
blk64_t *ret, struct blk_alloc_ctx *ctx)
|
||||
{
|
||||
errcode_t retval;
|
||||
struct block_range *next_range;
|
||||
struct base_fs_allocator *allocator = fs->priv_data;
|
||||
struct basefs_entry *e = allocator->cur_entry;
|
||||
ext2fs_block_bitmap dedup_map = allocator->dedup_block_map;
|
||||
|
||||
/* Try to get a block from the base_fs */
|
||||
if (e && e->head && ctx && (ctx->flags & BLOCK_ALLOC_DATA)) {
|
||||
*ret = e->head->start;
|
||||
e->head->start += 1;
|
||||
if (e->head->start > e->head->end) {
|
||||
next_range = e->head->next;
|
||||
free(e->head);
|
||||
e->head = next_range;
|
||||
}
|
||||
} else { /* Allocate a new block */
|
||||
retval = ext2fs_new_block2(fs, goal, fs->block_map, ret);
|
||||
if (retval)
|
||||
return retval;
|
||||
ext2fs_mark_block_bitmap2(fs->block_map, *ret);
|
||||
if (e && ctx && (ctx->flags & BLOCK_ALLOC_DATA)) {
|
||||
if (!get_next_block(fs, allocator, &e->blocks, ret))
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
retval = ext2fs_new_block2(fs, goal, fs->block_map, ret);
|
||||
if (!retval) {
|
||||
ext2fs_mark_block_bitmap2(fs->block_map, *ret);
|
||||
return 0;
|
||||
}
|
||||
if (retval == EXT2_ET_BLOCK_ALLOC_FAIL) {
|
||||
/* Try to steal a block from the dedup pool. */
|
||||
retval = ext2fs_find_first_set_block_bitmap2(dedup_map,
|
||||
fs->super->s_first_data_block,
|
||||
ext2fs_blocks_count(fs->super) - 1, ret);
|
||||
if (!retval) {
|
||||
ext2fs_unmark_block_bitmap2(dedup_map, *ret);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
void base_fs_alloc_cleanup(ext2_filsys fs)
|
||||
{
|
||||
struct basefs_entry *e;
|
||||
struct ext2fs_hashmap_entry *it = NULL;
|
||||
struct base_fs_allocator *allocator = fs->priv_data;
|
||||
|
||||
while ((e = ext2fs_hashmap_iter_in_order(allocator->entries, &it))) {
|
||||
fs_free_blocks_range(fs, e->head);
|
||||
delete_block_ranges(e->head);
|
||||
e->head = e->tail = NULL;
|
||||
}
|
||||
|
||||
basefs_allocator_free(fs, fs->priv_data);
|
||||
fs->priv_data = NULL;
|
||||
fs->get_alloc_block2 = NULL;
|
||||
ext2fs_hashmap_free(allocator->entries);
|
||||
free(allocator);
|
||||
}
|
||||
|
||||
errcode_t base_fs_alloc_set_target(ext2_filsys fs, const char *target_path,
|
||||
@ -140,9 +282,7 @@ errcode_t base_fs_alloc_unset_target(ext2_filsys fs,
|
||||
if (!allocator || !allocator->cur_entry || mode != S_IFREG)
|
||||
return 0;
|
||||
|
||||
fs_free_blocks_range(fs, allocator->cur_entry->head);
|
||||
delete_block_ranges(allocator->cur_entry->head);
|
||||
allocator->cur_entry->head = allocator->cur_entry->tail = NULL;
|
||||
allocator->cur_entry = NULL;
|
||||
fs_free_blocks_range(fs, allocator, &allocator->cur_entry->blocks);
|
||||
delete_block_ranges(&allocator->cur_entry->blocks);
|
||||
return 0;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
# include <ext2fs/ext2fs.h>
|
||||
|
||||
errcode_t base_fs_alloc_load(ext2_filsys fs, const char *file,
|
||||
const char *mountpoint);
|
||||
const char *mountpoint, const char *src_dir);
|
||||
void base_fs_alloc_cleanup(ext2_filsys fs);
|
||||
|
||||
errcode_t base_fs_alloc_set_target(ext2_filsys fs, const char *target_path,
|
||||
|
@ -9,16 +9,13 @@ struct block_list {
|
||||
FILE *f;
|
||||
const char *mountpoint;
|
||||
|
||||
struct {
|
||||
const char *filename;
|
||||
struct block_range *head;
|
||||
struct block_range *tail;
|
||||
} entry;
|
||||
const char *filename;
|
||||
struct block_range_list blocks;
|
||||
};
|
||||
|
||||
static void *init(const char *file, const char *mountpoint)
|
||||
{
|
||||
struct block_list *params = malloc(sizeof(*params));
|
||||
struct block_list *params = calloc(1, sizeof(*params));
|
||||
|
||||
if (!params)
|
||||
return NULL;
|
||||
@ -37,8 +34,7 @@ static int start_new_file(char *path, ext2_ino_t ino EXT2FS_ATTR((unused)),
|
||||
{
|
||||
struct block_list *params = data;
|
||||
|
||||
params->entry.head = params->entry.tail = NULL;
|
||||
params->entry.filename = LINUX_S_ISREG(inode->i_mode) ? path : NULL;
|
||||
params->filename = LINUX_S_ISREG(inode->i_mode) ? path : NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -47,9 +43,8 @@ static int add_block(ext2_filsys fs EXT2FS_ATTR((unused)), blk64_t blocknr,
|
||||
{
|
||||
struct block_list *params = data;
|
||||
|
||||
if (params->entry.filename && !metadata)
|
||||
add_blocks_to_range(¶ms->entry.head, ¶ms->entry.tail,
|
||||
blocknr, blocknr);
|
||||
if (params->filename && !metadata)
|
||||
add_blocks_to_range(¶ms->blocks, blocknr, blocknr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -63,15 +58,15 @@ static int end_new_file(void *data)
|
||||
{
|
||||
struct block_list *params = data;
|
||||
|
||||
if (!params->entry.filename || !params->entry.head)
|
||||
if (!params->filename || !params->blocks.head)
|
||||
return 0;
|
||||
if (fprintf(params->f, "%s%s ", params->mountpoint,
|
||||
params->entry.filename) < 0
|
||||
|| write_block_ranges(params->f, params->entry.head, " ")
|
||||
params->filename) < 0
|
||||
|| write_block_ranges(params->f, params->blocks.head, " ")
|
||||
|| fwrite("\n", 1, 1, params->f) != 1)
|
||||
return -1;
|
||||
|
||||
delete_block_ranges(params->entry.head);
|
||||
delete_block_ranges(¶ms->blocks);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -12,29 +12,35 @@ struct block_range *new_block_range(blk64_t start, blk64_t end)
|
||||
return range;
|
||||
}
|
||||
|
||||
void add_blocks_to_range(struct block_range **head, struct block_range **tail,
|
||||
blk64_t blk_start, blk64_t blk_end)
|
||||
void add_blocks_to_range(struct block_range_list *list, blk64_t blk_start,
|
||||
blk64_t blk_end)
|
||||
{
|
||||
if (*head == NULL)
|
||||
*head = *tail = new_block_range(blk_start, blk_end);
|
||||
else if ((*tail)->end + 1 == blk_start)
|
||||
(*tail)->end += (blk_end - blk_start + 1);
|
||||
if (list->head == NULL)
|
||||
list->head = list->tail = new_block_range(blk_start, blk_end);
|
||||
else if (list->tail->end + 1 == blk_start)
|
||||
list->tail->end += (blk_end - blk_start + 1);
|
||||
else {
|
||||
struct block_range *range = new_block_range(blk_start, blk_end);
|
||||
(*tail)->next = range;
|
||||
*tail = range;
|
||||
list->tail->next = range;
|
||||
list->tail = range;
|
||||
}
|
||||
}
|
||||
|
||||
void delete_block_ranges(struct block_range *head)
|
||||
static void remove_head(struct block_range_list *list)
|
||||
{
|
||||
struct block_range *tmp;
|
||||
struct block_range *next_range = list->head->next;
|
||||
|
||||
while (head) {
|
||||
tmp = head->next;
|
||||
free(head);
|
||||
head = tmp;
|
||||
}
|
||||
free(list->head);
|
||||
if (next_range == NULL)
|
||||
list->head = list->tail = NULL;
|
||||
else
|
||||
list->head = next_range;
|
||||
}
|
||||
|
||||
void delete_block_ranges(struct block_range_list *list)
|
||||
{
|
||||
while (list->head)
|
||||
remove_head(list);
|
||||
}
|
||||
|
||||
int write_block_ranges(FILE *f, struct block_range *range,
|
||||
@ -62,3 +68,13 @@ int write_block_ranges(FILE *f, struct block_range *range,
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
blk64_t consume_next_block(struct block_range_list *list)
|
||||
{
|
||||
blk64_t ret = list->head->start;
|
||||
|
||||
list->head->start += 1;
|
||||
if (list->head->start > list->head->end)
|
||||
remove_head(list);
|
||||
return ret;
|
||||
}
|
||||
|
@ -10,9 +10,20 @@ struct block_range {
|
||||
struct block_range *next;
|
||||
};
|
||||
|
||||
void add_blocks_to_range(struct block_range **head, struct block_range **tail,
|
||||
blk64_t blk_start, blk64_t blk_end);
|
||||
void delete_block_ranges(struct block_range *head);
|
||||
struct block_range_list {
|
||||
struct block_range *head;
|
||||
struct block_range *tail;
|
||||
};
|
||||
|
||||
void add_blocks_to_range(struct block_range_list *list, blk64_t blk_start,
|
||||
blk64_t blk_end);
|
||||
void delete_block_ranges(struct block_range_list *list);
|
||||
int write_block_ranges(FILE *f, struct block_range *range, char *sep);
|
||||
|
||||
/*
|
||||
* Given a non-empty range list, return the next block and remove it from the
|
||||
* list.
|
||||
*/
|
||||
blk64_t consume_next_block(struct block_range_list *list);
|
||||
|
||||
#endif /* !BLOCK_RANGE_H */
|
||||
|
@ -301,7 +301,8 @@ int main(int argc, char *argv[])
|
||||
if (src_dir) {
|
||||
ext2fs_read_bitmaps(fs);
|
||||
if (basefs_in) {
|
||||
retval = base_fs_alloc_load(fs, basefs_in, mountpoint);
|
||||
retval = base_fs_alloc_load(fs, basefs_in, mountpoint,
|
||||
src_dir);
|
||||
if (retval) {
|
||||
com_err(prog_name, retval, "%s",
|
||||
"while reading base_fs file");
|
||||
|
2
debian/compat
vendored
2
debian/compat
vendored
@ -1 +1 @@
|
||||
11
|
||||
12
|
||||
|
@ -264,7 +264,7 @@ extents_loaded:
|
||||
goto err;
|
||||
|
||||
ext_written = 0;
|
||||
start_val = ext2fs_inode_i_blocks(ctx->fs, EXT2_INODE(&inode));
|
||||
start_val = ext2fs_get_stat_i_blocks(ctx->fs, EXT2_INODE(&inode));
|
||||
for (i = 0, ex = list->extents; i < list->count; i++, ex++) {
|
||||
memcpy(&extent, ex, sizeof(struct ext2fs_extent));
|
||||
extent.e_flags &= EXT2_EXTENT_FLAGS_UNINIT;
|
||||
@ -302,15 +302,10 @@ extents_loaded:
|
||||
ext_written++;
|
||||
}
|
||||
|
||||
delta = ext2fs_inode_i_blocks(ctx->fs, EXT2_INODE(&inode)) - start_val;
|
||||
if (delta) {
|
||||
if (!ext2fs_has_feature_huge_file(ctx->fs->super) ||
|
||||
!(inode.i_flags & EXT4_HUGE_FILE_FL))
|
||||
delta <<= 9;
|
||||
else
|
||||
delta *= ctx->fs->blocksize;
|
||||
quota_data_add(ctx->qctx, &inode, ino, delta);
|
||||
}
|
||||
delta = ext2fs_get_stat_i_blocks(ctx->fs, EXT2_INODE(&inode)) -
|
||||
start_val;
|
||||
if (delta)
|
||||
quota_data_add(ctx->qctx, &inode, ino, delta << 9);
|
||||
|
||||
#if defined(DEBUG) || defined(DEBUG_SUMMARY)
|
||||
printf("rebuild: ino=%d extents=%d->%d\n", ino, list->ext_read,
|
||||
|
@ -1171,6 +1171,7 @@ void e2fsck_pass1(e2fsck_t ctx)
|
||||
struct scan_callback_struct scan_struct;
|
||||
struct ext2_super_block *sb = ctx->fs->super;
|
||||
const char *old_op;
|
||||
const char *eop_next_inode = _("getting next inode from scan");
|
||||
int imagic_fs, extent_fs, inlinedata_fs, casefold_fs;
|
||||
int low_dtime_check = 1;
|
||||
unsigned int inode_size = EXT2_INODE_SIZE(fs->super);
|
||||
@ -1363,7 +1364,7 @@ void e2fsck_pass1(e2fsck_t ctx)
|
||||
if (e2fsck_mmp_update(fs))
|
||||
fatal_error(ctx, 0);
|
||||
}
|
||||
old_op = ehandler_operation(_("getting next inode from scan"));
|
||||
old_op = ehandler_operation(eop_next_inode);
|
||||
pctx.errcode = ext2fs_get_next_inode_full(scan, &ino,
|
||||
inode, inode_size);
|
||||
if (ino > ino_threshold)
|
||||
|
@ -705,6 +705,10 @@ static void delete_file(e2fsck_t ctx, ext2_ino_t ino,
|
||||
fix_problem(ctx, PR_1B_BLOCK_ITERATE, &pctx);
|
||||
if (ctx->inode_bad_map)
|
||||
ext2fs_unmark_inode_bitmap2(ctx->inode_bad_map, ino);
|
||||
if (ctx->inode_reg_map)
|
||||
ext2fs_unmark_inode_bitmap2(ctx->inode_reg_map, ino);
|
||||
ext2fs_unmark_inode_bitmap2(ctx->inode_dir_map, ino);
|
||||
ext2fs_unmark_inode_bitmap2(ctx->inode_used_map, ino);
|
||||
ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(dp->inode.i_mode));
|
||||
quota_data_sub(ctx->qctx, &dp->inode, ino,
|
||||
pb.dup_blocks * fs->blocksize);
|
||||
|
@ -996,6 +996,7 @@ static int check_dir_block(ext2_filsys fs,
|
||||
__u32 dir_encpolicy_id = NO_ENCRYPTION_POLICY;
|
||||
size_t max_block_size;
|
||||
int hash_flags = 0;
|
||||
static char *eop_read_dirblock = NULL;
|
||||
|
||||
cd = (struct check_dir_struct *) priv_data;
|
||||
ibuf = buf = cd->buf;
|
||||
@ -1066,7 +1067,9 @@ static int check_dir_block(ext2_filsys fs,
|
||||
db->blockcnt, ino);
|
||||
#endif
|
||||
|
||||
ehandler_operation(_("reading directory block"));
|
||||
if (!eop_read_dirblock)
|
||||
eop_read_dirblock = (char *) _("reading directory block");
|
||||
ehandler_operation(eop_read_dirblock);
|
||||
if (inline_data_size) {
|
||||
memset(buf, 0, fs->blocksize - inline_data_size);
|
||||
cd->pctx.errcode = ext2fs_inline_data_get(fs, ino, 0, buf, 0);
|
||||
|
@ -160,6 +160,10 @@ static int fill_dir_block(ext2_filsys fs,
|
||||
dir_offset += rec_len;
|
||||
if (dirent->inode == 0)
|
||||
continue;
|
||||
if ((name_len) == 0) {
|
||||
fd->err = EXT2_ET_DIR_CORRUPTED;
|
||||
return BLOCK_ABORT;
|
||||
}
|
||||
if (!fd->compress && (name_len == 1) &&
|
||||
(dirent->name[0] == '.'))
|
||||
continue;
|
||||
@ -272,7 +276,11 @@ static errcode_t alloc_size_dir(ext2_filsys fs, struct out_dir *outdir,
|
||||
outdir->hashes = new_mem;
|
||||
} else {
|
||||
outdir->buf = malloc(blocks * fs->blocksize);
|
||||
if (!outdir->buf)
|
||||
return ENOMEM;
|
||||
outdir->hashes = malloc(blocks * sizeof(ext2_dirhash_t));
|
||||
if (!outdir->hashes)
|
||||
return ENOMEM;
|
||||
outdir->num = 0;
|
||||
}
|
||||
outdir->max = blocks;
|
||||
@ -293,7 +301,11 @@ static errcode_t get_next_block(ext2_filsys fs, struct out_dir *outdir,
|
||||
errcode_t retval;
|
||||
|
||||
if (outdir->num >= outdir->max) {
|
||||
retval = alloc_size_dir(fs, outdir, outdir->max + 50);
|
||||
int increment = outdir->max / 10;
|
||||
|
||||
if (increment < 50)
|
||||
increment = 50;
|
||||
retval = alloc_size_dir(fs, outdir, outdir->max + increment);
|
||||
if (retval)
|
||||
return retval;
|
||||
}
|
||||
@ -401,6 +413,11 @@ static int duplicate_search_and_fix(e2fsck_t ctx, ext2_filsys fs,
|
||||
continue;
|
||||
}
|
||||
new_len = ext2fs_dirent_name_len(ent->dir);
|
||||
if (new_len == 0) {
|
||||
/* should never happen */
|
||||
ext2fs_unmark_valid(fs);
|
||||
continue;
|
||||
}
|
||||
memcpy(new_name, ent->dir->name, new_len);
|
||||
mutate_name(new_name, &new_len);
|
||||
for (j=0; j < fd->num_array; j++) {
|
||||
@ -632,6 +649,9 @@ static int alloc_blocks(ext2_filsys fs,
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
/* outdir->buf might be reallocated */
|
||||
*prev_ent = (struct ext2_dx_entry *) (outdir->buf + *prev_offset);
|
||||
|
||||
*next_ent = set_int_node(fs, block_start);
|
||||
*limit = (struct ext2_dx_countlimit *)(*next_ent);
|
||||
if (next_offset)
|
||||
@ -721,6 +741,9 @@ static errcode_t calculate_tree(ext2_filsys fs,
|
||||
return retval;
|
||||
}
|
||||
if (c3 == 0) {
|
||||
int delta1 = (char *)int_limit - outdir->buf;
|
||||
int delta2 = (char *)root - outdir->buf;
|
||||
|
||||
retval = alloc_blocks(fs, &limit, &int_ent,
|
||||
&dx_ent, &int_offset,
|
||||
NULL, outdir, i, &c2,
|
||||
@ -728,6 +751,11 @@ static errcode_t calculate_tree(ext2_filsys fs,
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
/* outdir->buf might be reallocated */
|
||||
int_limit = (struct ext2_dx_countlimit *)
|
||||
(outdir->buf + delta1);
|
||||
root = (struct ext2_dx_entry *)
|
||||
(outdir->buf + delta2);
|
||||
}
|
||||
dx_ent->block = ext2fs_cpu_to_le32(i);
|
||||
if (c3 != limit->limit)
|
||||
@ -1019,6 +1047,8 @@ void e2fsck_rehash_directories(e2fsck_t ctx)
|
||||
if (!ext2fs_u32_list_iterate(iter, &ino))
|
||||
break;
|
||||
}
|
||||
if (!ext2fs_test_inode_bitmap2(ctx->inode_dir_map, ino))
|
||||
continue;
|
||||
|
||||
pctx.dir = ino;
|
||||
if (first) {
|
||||
|
@ -1038,7 +1038,7 @@ void check_super_block(e2fsck_t ctx)
|
||||
* Check to see if the superblock last mount time or last
|
||||
* write time is in the future.
|
||||
*/
|
||||
if (!broken_system_clock &&
|
||||
if (!broken_system_clock && fs->super->s_checkinterval &&
|
||||
!(ctx->flags & E2F_FLAG_TIME_INSANE) &&
|
||||
fs->super->s_mtime > (__u32) ctx->now) {
|
||||
pctx.num = fs->super->s_mtime;
|
||||
@ -1050,7 +1050,7 @@ void check_super_block(e2fsck_t ctx)
|
||||
fs->flags |= EXT2_FLAG_DIRTY;
|
||||
}
|
||||
}
|
||||
if (!broken_system_clock &&
|
||||
if (!broken_system_clock && fs->super->s_checkinterval &&
|
||||
!(ctx->flags & E2F_FLAG_TIME_INSANE) &&
|
||||
fs->super->s_wtime > (__u32) ctx->now) {
|
||||
pctx.num = fs->super->s_wtime;
|
||||
|
@ -6,6 +6,7 @@
|
||||
cc_library_headers {
|
||||
name: "libext2-headers",
|
||||
host_supported: true,
|
||||
vendor_available: true,
|
||||
recovery_available: true,
|
||||
target: {
|
||||
windows: {
|
||||
|
@ -85,6 +85,22 @@ blk64_t ext2fs_inode_i_blocks(ext2_filsys fs,
|
||||
(__u64)inode->osd2.linux2.l_i_blocks_hi << 32 : 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the inode i_blocks in stat (512 byte) units
|
||||
*/
|
||||
blk64_t ext2fs_get_stat_i_blocks(ext2_filsys fs,
|
||||
struct ext2_inode *inode)
|
||||
{
|
||||
blk64_t ret = inode->i_blocks;
|
||||
|
||||
if (ext2fs_has_feature_huge_file(fs->super)) {
|
||||
ret += ((long long) inode->osd2.linux2.l_i_blocks_hi) << 32;
|
||||
if (inode->i_flags & EXT4_HUGE_FILE_FL)
|
||||
ret *= (fs->blocksize / 512);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the fs block count
|
||||
*/
|
||||
@ -554,6 +570,9 @@ void ext2fs_file_acl_block_set(ext2_filsys fs, struct ext2_inode *inode,
|
||||
errcode_t ext2fs_inode_size_set(ext2_filsys fs, struct ext2_inode *inode,
|
||||
ext2_off64_t size)
|
||||
{
|
||||
if (size < 0)
|
||||
return EINVAL;
|
||||
|
||||
/* Only regular files get to be larger than 4GB */
|
||||
if (!LINUX_S_ISREG(inode->i_mode) && (size >> 32))
|
||||
return EXT2_ET_FILE_TOO_BIG;
|
||||
|
@ -77,8 +77,8 @@ typedef __u32 __bitwise ext2_ino_t;
|
||||
typedef __u32 __bitwise blk_t;
|
||||
typedef __u64 __bitwise blk64_t;
|
||||
typedef __u32 __bitwise dgrp_t;
|
||||
typedef __u32 __bitwise ext2_off_t;
|
||||
typedef __u64 __bitwise ext2_off64_t;
|
||||
typedef __s32 __bitwise ext2_off_t;
|
||||
typedef __s64 __bitwise ext2_off64_t;
|
||||
typedef __s64 __bitwise e2_blkcnt_t;
|
||||
typedef __u32 __bitwise ext2_dirhash_t;
|
||||
|
||||
@ -910,7 +910,9 @@ extern int ext2fs_group_blocks_count(ext2_filsys fs, dgrp_t group);
|
||||
extern blk64_t ext2fs_inode_data_blocks2(ext2_filsys fs,
|
||||
struct ext2_inode *inode);
|
||||
extern blk64_t ext2fs_inode_i_blocks(ext2_filsys fs,
|
||||
struct ext2_inode *inode);
|
||||
struct ext2_inode *inode);
|
||||
extern blk64_t ext2fs_get_stat_i_blocks(ext2_filsys fs,
|
||||
struct ext2_inode *inode);
|
||||
extern blk64_t ext2fs_blocks_count(struct ext2_super_block *super);
|
||||
extern void ext2fs_blocks_count_set(struct ext2_super_block *super,
|
||||
blk64_t blk);
|
||||
|
@ -924,8 +924,8 @@ static errcode_t read_xattrs_from_buffer(struct ext2_xattr_handle *handle,
|
||||
!(ea_inode->i_flags & EXT4_EA_INODE_FL) ||
|
||||
ea_inode->i_links_count == 0)
|
||||
err = EXT2_ET_EA_INODE_CORRUPTED;
|
||||
else if (ext2fs_file_get_size(ea_file) !=
|
||||
entry->e_value_size)
|
||||
else if ((__u64) ext2fs_file_get_size(ea_file) !=
|
||||
entry->e_value_size)
|
||||
err = EXT2_ET_EA_BAD_VALUE_SIZE;
|
||||
else
|
||||
err = ext2fs_file_read(ea_file, x->value,
|
||||
|
@ -215,9 +215,9 @@ static errcode_t inode_read_blk64(io_channel channel,
|
||||
data = (struct inode_private_data *) channel->private_data;
|
||||
EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
|
||||
|
||||
if ((retval = ext2fs_file_lseek(data->file,
|
||||
block * channel->block_size,
|
||||
EXT2_SEEK_SET, 0)))
|
||||
if ((retval = ext2fs_file_llseek(data->file,
|
||||
(ext2_off64_t)(block * channel->block_size),
|
||||
EXT2_SEEK_SET, 0)))
|
||||
return retval;
|
||||
|
||||
count = (count < 0) ? -count : (count * channel->block_size);
|
||||
@ -241,9 +241,9 @@ static errcode_t inode_write_blk64(io_channel channel,
|
||||
data = (struct inode_private_data *) channel->private_data;
|
||||
EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
|
||||
|
||||
if ((retval = ext2fs_file_lseek(data->file,
|
||||
block * channel->block_size,
|
||||
EXT2_SEEK_SET, 0)))
|
||||
if ((retval = ext2fs_file_llseek(data->file,
|
||||
(ext2_off64_t) (block * channel->block_size),
|
||||
EXT2_SEEK_SET, 0)))
|
||||
return retval;
|
||||
|
||||
count = (count < 0) ? -count : (count * channel->block_size);
|
||||
|
@ -114,7 +114,7 @@ static int qcow2_read_l1_table(struct ext2_qcow2_image *img)
|
||||
}
|
||||
|
||||
static int qcow2_read_l2_table(struct ext2_qcow2_image *img,
|
||||
ext2_off64_t offset, blk64_t **l2_table)
|
||||
__u64 offset, blk64_t **l2_table)
|
||||
{
|
||||
int fd = img->fd;
|
||||
size_t size;
|
||||
@ -131,8 +131,8 @@ static int qcow2_read_l2_table(struct ext2_qcow2_image *img,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int qcow2_copy_data(int fdin, int fdout, ext2_off64_t off_in,
|
||||
ext2_off64_t off_out, void *buf, size_t count)
|
||||
static int qcow2_copy_data(int fdin, int fdout, __u64 off_in,
|
||||
__u64 off_out, void *buf, size_t count)
|
||||
{
|
||||
size_t size;
|
||||
|
||||
@ -162,7 +162,7 @@ int qcow2_write_raw_image(int qcow2_fd, int raw_fd,
|
||||
struct ext2_qcow2_image img;
|
||||
errcode_t ret = 0;
|
||||
unsigned int l1_index, l2_index;
|
||||
ext2_off64_t offset;
|
||||
__u64 offset;
|
||||
blk64_t *l1_table, *l2_table = NULL;
|
||||
void *copy_buf = NULL;
|
||||
size_t size;
|
||||
@ -212,7 +212,7 @@ int qcow2_write_raw_image(int qcow2_fd, int raw_fd,
|
||||
l1_table = img.l1_table;
|
||||
/* Walk through l1 table */
|
||||
for (l1_index = 0; l1_index < img.l1_size; l1_index++) {
|
||||
ext2_off64_t off_out;
|
||||
__u64 off_out;
|
||||
|
||||
offset = ext2fs_be64_to_cpu(l1_table[l1_index]) &
|
||||
~QCOW_OFLAG_COPIED;
|
||||
|
@ -503,8 +503,8 @@ errcode_t quota_compute_usage(quota_ctx_t qctx)
|
||||
if (inode->i_links_count &&
|
||||
(ino == EXT2_ROOT_INO ||
|
||||
ino >= EXT2_FIRST_INODE(fs->super))) {
|
||||
space = ext2fs_inode_i_blocks(fs,
|
||||
EXT2_INODE(inode)) << 9;
|
||||
space = ext2fs_get_stat_i_blocks(fs,
|
||||
EXT2_INODE(inode)) << 9;
|
||||
quota_data_add(qctx, inode, ino, space);
|
||||
quota_data_inodes(qctx, inode, ino, +1);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ cc_library {
|
||||
name: "libext2_uuid",
|
||||
host_supported: true,
|
||||
recovery_available: true,
|
||||
vendor_available: true,
|
||||
unique_host_soname: true,
|
||||
defaults: ["e2fsprogs-defaults"],
|
||||
srcs: [
|
||||
|
@ -121,7 +121,9 @@ static errcode_t set_inode_extra(ext2_filsys fs, ext2_ino_t ino,
|
||||
}
|
||||
|
||||
inode.i_uid = st->st_uid;
|
||||
ext2fs_set_i_uid_high(inode, st->st_uid >> 16);
|
||||
inode.i_gid = st->st_gid;
|
||||
ext2fs_set_i_gid_high(inode, st->st_gid >> 16);
|
||||
inode.i_mode |= st->st_mode;
|
||||
inode.i_atime = st->st_atime;
|
||||
inode.i_mtime = st->st_mtime;
|
||||
|
@ -8,10 +8,12 @@ e2image \- Save critical ext2/ext3/ext4 filesystem metadata to a file
|
||||
.SH SYNOPSIS
|
||||
.B e2image
|
||||
[
|
||||
.B \-r|Q
|
||||
.B \-r|\-Q
|
||||
]
|
||||
[
|
||||
.B \-f
|
||||
]
|
||||
[
|
||||
.B \-b
|
||||
.I superblock
|
||||
]
|
||||
@ -19,9 +21,6 @@ e2image \- Save critical ext2/ext3/ext4 filesystem metadata to a file
|
||||
.B \-B
|
||||
.I blocksize
|
||||
]
|
||||
[
|
||||
.B \-fr
|
||||
]
|
||||
.I device
|
||||
.I image-file
|
||||
.br
|
||||
|
@ -104,11 +104,11 @@ static int get_bits_from_size(size_t size)
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, _("Usage: %s [ -r|Q ] [ -f ] [ -b superblock ] [ -B blocksize]"
|
||||
"[ -fr ] device image-file\n"),
|
||||
fprintf(stderr, _("Usage: %s [ -r|-Q ] [ -f ] [ -b superblock ] [ -B blocksize ] "
|
||||
"device image-file\n"),
|
||||
program_name);
|
||||
fprintf(stderr, _(" %s -I device image-file\n"), program_name);
|
||||
fprintf(stderr, _(" %s -ra [ -cfnp ] [ -o src_offset ] "
|
||||
fprintf(stderr, _(" %s -ra [ -cfnp ] [ -o src_offset ] "
|
||||
"[ -O dest_offset ] src_fs [ dest_fs ]\n"),
|
||||
program_name);
|
||||
exit (1);
|
||||
|
@ -649,8 +649,8 @@ static int check_inum_access(ext2_filsys fs, ext2_ino_t ino, mode_t mask)
|
||||
dbg_printf("access ino=%d mask=e%s%s%s perms=0%o fuid=%d fgid=%d "
|
||||
"uid=%d gid=%d\n", ino,
|
||||
(mask & R_OK ? "r" : ""), (mask & W_OK ? "w" : ""),
|
||||
(mask & X_OK ? "x" : ""), perms, inode.i_uid, inode.i_gid,
|
||||
ctxt->uid, ctxt->gid);
|
||||
(mask & X_OK ? "x" : ""), perms, inode_uid(inode),
|
||||
inode_gid(inode), ctxt->uid, ctxt->gid);
|
||||
|
||||
/* existence check */
|
||||
if (mask == 0)
|
||||
@ -680,14 +680,14 @@ static int check_inum_access(ext2_filsys fs, ext2_ino_t ino, mode_t mask)
|
||||
}
|
||||
|
||||
/* allow owner, if perms match */
|
||||
if (inode.i_uid == ctxt->uid) {
|
||||
if (inode_uid(inode) == ctxt->uid) {
|
||||
if ((mask & (perms >> 6)) == mask)
|
||||
return 0;
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
/* allow group, if perms match */
|
||||
if (inode.i_gid == ctxt->gid) {
|
||||
if (inode_gid(inode) == ctxt->gid) {
|
||||
if ((mask & (perms >> 3)) == mask)
|
||||
return 0;
|
||||
return -EACCES;
|
||||
@ -755,23 +755,6 @@ static void *op_init(struct fuse_conn_info *conn)
|
||||
return ff;
|
||||
}
|
||||
|
||||
static blkcnt_t blocks_from_inode(ext2_filsys fs,
|
||||
struct ext2_inode_large *inode)
|
||||
{
|
||||
blkcnt_t b;
|
||||
|
||||
b = inode->i_blocks;
|
||||
if (ext2fs_has_feature_huge_file(fs->super))
|
||||
b += ((long long) inode->osd2.linux2.l_i_blocks_hi) << 32;
|
||||
|
||||
if (!ext2fs_has_feature_huge_file(fs->super) ||
|
||||
!(inode->i_flags & EXT4_HUGE_FILE_FL))
|
||||
b *= fs->blocksize / 512;
|
||||
b *= EXT2FS_CLUSTER_RATIO(fs);
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
static int stat_inode(ext2_filsys fs, ext2_ino_t ino, struct stat *statbuf)
|
||||
{
|
||||
struct ext2_inode_large inode;
|
||||
@ -791,11 +774,12 @@ static int stat_inode(ext2_filsys fs, ext2_ino_t ino, struct stat *statbuf)
|
||||
statbuf->st_ino = ino;
|
||||
statbuf->st_mode = inode.i_mode;
|
||||
statbuf->st_nlink = inode.i_links_count;
|
||||
statbuf->st_uid = inode.i_uid;
|
||||
statbuf->st_gid = inode.i_gid;
|
||||
statbuf->st_uid = inode_uid(inode);
|
||||
statbuf->st_gid = inode_gid(inode);
|
||||
statbuf->st_size = EXT2_I_SIZE(&inode);
|
||||
statbuf->st_blksize = fs->blocksize;
|
||||
statbuf->st_blocks = blocks_from_inode(fs, &inode);
|
||||
statbuf->st_blocks = ext2fs_get_stat_i_blocks(fs,
|
||||
(struct ext2_inode *)&inode);
|
||||
EXT4_INODE_GET_XTIME(i_atime, &tv, &inode);
|
||||
statbuf->st_atime = tv.tv_sec;
|
||||
EXT4_INODE_GET_XTIME(i_mtime, &tv, &inode);
|
||||
@ -1015,7 +999,9 @@ static int op_mknod(const char *path, mode_t mode, dev_t dev)
|
||||
inode.i_extra_isize = sizeof(struct ext2_inode_large) -
|
||||
EXT2_GOOD_OLD_INODE_SIZE;
|
||||
inode.i_uid = ctxt->uid;
|
||||
ext2fs_set_i_uid_high(inode, ctxt->uid >> 16);
|
||||
inode.i_gid = ctxt->gid;
|
||||
ext2fs_set_i_gid_high(inode, ctxt->gid >> 16);
|
||||
|
||||
err = ext2fs_write_new_inode(fs, child, (struct ext2_inode *)&inode);
|
||||
if (err) {
|
||||
@ -1139,7 +1125,9 @@ static int op_mkdir(const char *path, mode_t mode)
|
||||
}
|
||||
|
||||
inode.i_uid = ctxt->uid;
|
||||
ext2fs_set_i_uid_high(inode, ctxt->uid >> 16);
|
||||
inode.i_gid = ctxt->gid;
|
||||
ext2fs_set_i_gid_high(inode, ctxt->gid >> 16);
|
||||
inode.i_mode = LINUX_S_IFDIR | (mode & ~(S_ISUID | fs->umask)) |
|
||||
parent_sgid;
|
||||
inode.i_generation = ff->next_generation++;
|
||||
@ -1512,7 +1500,9 @@ static int op_symlink(const char *src, const char *dest)
|
||||
}
|
||||
|
||||
inode.i_uid = ctxt->uid;
|
||||
ext2fs_set_i_uid_high(inode, ctxt->uid >> 16);
|
||||
inode.i_gid = ctxt->gid;
|
||||
ext2fs_set_i_gid_high(inode, ctxt->gid >> 16);
|
||||
inode.i_generation = ff->next_generation++;
|
||||
|
||||
err = ext2fs_write_inode_full(fs, child, (struct ext2_inode *)&inode,
|
||||
@ -1908,7 +1898,7 @@ static int op_chmod(const char *path, mode_t mode)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && ctxt->uid != inode.i_uid) {
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && ctxt->uid != inode_uid(inode)) {
|
||||
ret = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
@ -1918,7 +1908,7 @@ static int op_chmod(const char *path, mode_t mode)
|
||||
* of the user's groups, but FUSE only tells us about the primary
|
||||
* group.
|
||||
*/
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && ctxt->gid != inode.i_gid)
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && ctxt->gid != inode_gid(inode))
|
||||
mode &= ~S_ISGID;
|
||||
|
||||
inode.i_mode &= ~0xFFF;
|
||||
@ -1972,22 +1962,25 @@ static int op_chown(const char *path, uid_t owner, gid_t group)
|
||||
if (owner != (uid_t) ~0) {
|
||||
/* Only root gets to change UID. */
|
||||
if (!ff->fakeroot && ctxt->uid != 0 &&
|
||||
!(inode.i_uid == ctxt->uid && owner == ctxt->uid)) {
|
||||
!(inode_uid(inode) == ctxt->uid && owner == ctxt->uid)) {
|
||||
ret = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
inode.i_uid = owner;
|
||||
ext2fs_set_i_uid_high(inode, owner >> 16);
|
||||
}
|
||||
|
||||
if (group != (gid_t) ~0) {
|
||||
/* Only root or the owner get to change GID. */
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && inode.i_uid != ctxt->uid) {
|
||||
if (!ff->fakeroot && ctxt->uid != 0 &&
|
||||
inode_uid(inode) != ctxt->uid) {
|
||||
ret = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* XXX: We /should/ check group membership but FUSE */
|
||||
inode.i_gid = group;
|
||||
ext2fs_set_i_gid_high(inode, group >> 16);
|
||||
}
|
||||
|
||||
ret = update_ctime(fs, ino, &inode);
|
||||
@ -2915,7 +2908,9 @@ static int op_create(const char *path, mode_t mode, struct fuse_file_info *fp)
|
||||
inode.i_extra_isize = sizeof(struct ext2_inode_large) -
|
||||
EXT2_GOOD_OLD_INODE_SIZE;
|
||||
inode.i_uid = ctxt->uid;
|
||||
ext2fs_set_i_uid_high(inode, ctxt->uid >> 16);
|
||||
inode.i_gid = ctxt->gid;
|
||||
ext2fs_set_i_gid_high(inode, ctxt->gid >> 16);
|
||||
if (ext2fs_has_feature_extents(fs->super)) {
|
||||
ext2_extent_handle_t handle;
|
||||
|
||||
@ -3133,7 +3128,7 @@ static int ioctl_setflags(ext2_filsys fs, struct fuse2fs_file_handle *fh,
|
||||
if (err)
|
||||
return translate_error(fs, fh->ino, err);
|
||||
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && inode.i_uid != ctxt->uid)
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && inode_uid(inode) != ctxt->uid)
|
||||
return -EPERM;
|
||||
|
||||
if ((inode.i_flags ^ flags) & ~FUSE2FS_MODIFIABLE_IFLAGS)
|
||||
@ -3190,7 +3185,7 @@ static int ioctl_setversion(ext2_filsys fs, struct fuse2fs_file_handle *fh,
|
||||
if (err)
|
||||
return translate_error(fs, fh->ino, err);
|
||||
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && inode.i_uid != ctxt->uid)
|
||||
if (!ff->fakeroot && ctxt->uid != 0 && inode_uid(inode) != ctxt->uid)
|
||||
return -EPERM;
|
||||
|
||||
inode.i_generation = generation;
|
||||
|
@ -344,7 +344,7 @@ _("Warning: the backup superblock/group descriptors at block %u contain\n"
|
||||
exit(1);
|
||||
}
|
||||
while (ext2fs_badblocks_list_iterate(bb_iter, &blk))
|
||||
ext2fs_mark_block_bitmap2(fs->block_map, EXT2FS_B2C(fs, blk));
|
||||
ext2fs_mark_block_bitmap2(fs->block_map, blk);
|
||||
ext2fs_badblocks_list_iterate_end(bb_iter);
|
||||
}
|
||||
|
||||
|
159
po/ms.po
159
po/ms.po
@ -77,7 +77,7 @@ msgstr ""
|
||||
"Project-Id-Version: e2fsprogs 1.45.3\n"
|
||||
"Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
|
||||
"POT-Creation-Date: 2019-07-14 20:56-0400\n"
|
||||
"PO-Revision-Date: 2019-09-01 22:24+0800\n"
|
||||
"PO-Revision-Date: 2019-12-27 12:44+0800\n"
|
||||
"Last-Translator: Sharuzzaman Ahmat Raslan <sharuzzaman@gmail.com>\n"
|
||||
"Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n"
|
||||
"Language: ms\n"
|
||||
@ -86,7 +86,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.2.3\n"
|
||||
"X-Generator: Poedit 2.2.4\n"
|
||||
|
||||
#: e2fsck/badblocks.c:23 misc/mke2fs.c:220
|
||||
#, c-format
|
||||
@ -384,7 +384,7 @@ msgstr ""
|
||||
#: e2fsck/message.c:140
|
||||
#, fuzzy
|
||||
msgid "rroot @i"
|
||||
msgstr "<i>(tiada cadangan)</i>"
|
||||
msgstr "@u @z @i %i. "
|
||||
|
||||
#: e2fsck/message.c:141
|
||||
#, fuzzy
|
||||
@ -542,7 +542,7 @@ msgstr ""
|
||||
#, fuzzy
|
||||
#| msgid "unknown os - %s"
|
||||
msgid "unknown quota type"
|
||||
msgstr "%s mempunyai jenis fail yang tidak diketahui"
|
||||
msgstr "Jenis kandungan struktur PKCS tidak diketahui."
|
||||
|
||||
#: e2fsck/pass1b.c:222
|
||||
msgid "multiply claimed inode map"
|
||||
@ -590,7 +590,7 @@ msgstr "Peta terjemahan: sintaks tidak betul"
|
||||
#: e2fsck/pass1.c:1245
|
||||
#, fuzzy
|
||||
msgid "regular file inode map"
|
||||
msgstr "Mencipta fail biasa %s\n"
|
||||
msgstr "fail kosong biasa"
|
||||
|
||||
#: e2fsck/pass1.c:1254 misc/e2image.c:1282
|
||||
#, fuzzy
|
||||
@ -723,9 +723,7 @@ msgstr "Auto simpan ketika keluar, jangan maklum"
|
||||
#: e2fsck/problem.c:53
|
||||
#, fuzzy
|
||||
msgid "Fix"
|
||||
msgstr ""
|
||||
"Tidak dapat membaiki induk untuk @i %i: %m\n"
|
||||
"\n"
|
||||
msgstr "pembetulan boleh diterapkan. Ulang laksana dengan pilihan '--update'."
|
||||
|
||||
#: e2fsck/problem.c:54
|
||||
#, fuzzy
|
||||
@ -1026,7 +1024,7 @@ msgstr ""
|
||||
#: e2fsck/problem.c:180
|
||||
#, fuzzy
|
||||
msgid "Corruption found in @S. (%s = %N).\n"
|
||||
msgstr "%s: `%s': padanan tak dijumpai"
|
||||
msgstr "Hujah sah adalah nombor bulat n seperti: %s\n"
|
||||
|
||||
#. @-expanded: Error determining size of the physical device: %m\n
|
||||
#: e2fsck/problem.c:186
|
||||
@ -1403,7 +1401,7 @@ msgstr ""
|
||||
#: e2fsck/problem.c:512
|
||||
#, fuzzy
|
||||
msgid "Invalid %U @q @i %i. "
|
||||
msgstr "@i %i (%Q) adalah @I FIFO.\n"
|
||||
msgstr "@u @z @i %i. "
|
||||
|
||||
#. @-expanded: superblock would have too many inodes (%N).\n
|
||||
#: e2fsck/problem.c:517
|
||||
@ -1456,7 +1454,7 @@ msgstr ""
|
||||
#: e2fsck/problem.c:562
|
||||
#, fuzzy, no-c-format
|
||||
msgid "@i %i is a @z @d. "
|
||||
msgstr "/@l adalah bukan sejenis @d (ino=%i)\n"
|
||||
msgstr "@u @z @i %i. "
|
||||
|
||||
#. @-expanded: group %g's block bitmap at %b conflicts with some other fs block.\n
|
||||
#: e2fsck/problem.c:567
|
||||
@ -1726,7 +1724,7 @@ msgstr ""
|
||||
#: e2fsck/problem.c:806
|
||||
#, fuzzy
|
||||
msgid "@j is not regular file. "
|
||||
msgstr "Mencipta fail biasa %s\n"
|
||||
msgstr "fail kosong biasa"
|
||||
|
||||
#. @-expanded: inode %i was part of the orphaned inode list.
|
||||
#: e2fsck/problem.c:812
|
||||
@ -2239,7 +2237,7 @@ msgstr ""
|
||||
#: e2fsck/problem.c:1288 e2fsck/problem.c:1663
|
||||
#, fuzzy
|
||||
msgid "Error adjusting refcount for @a @b %b (@i %i): %m\n"
|
||||
msgstr "Ralat membaca @d @b %b (@i %i): %m\n"
|
||||
msgstr "Ralat menyalin dalam penggantian @i @B: %m\n"
|
||||
|
||||
#. @-expanded: Pass 1C: Scanning directories for inodes with multiply-claimed blocks\n
|
||||
#: e2fsck/problem.c:1298
|
||||
@ -2291,9 +2289,7 @@ msgstr ""
|
||||
#: e2fsck/problem.c:1344
|
||||
#, fuzzy, no-c-format
|
||||
msgid "Couldn't clone file: %m\n"
|
||||
msgstr ""
|
||||
"Tidak dapat membaiki induk untuk @i %i: %m\n"
|
||||
"\n"
|
||||
msgstr "Tidak dapat membuka fail profil"
|
||||
|
||||
#. @-expanded: Pass 1E: Optimizing extent trees\n
|
||||
#: e2fsck/problem.c:1350
|
||||
@ -2358,7 +2354,7 @@ msgstr ""
|
||||
#: e2fsck/problem.c:1414
|
||||
#, fuzzy
|
||||
msgid "@E @L to '.' "
|
||||
msgstr "/@l tidak dijumpai."
|
||||
msgstr "@E adalah salinan '.' @e.\n"
|
||||
|
||||
#. @-expanded: entry '%Dn' in %p (%i) points to inode (%Di) located in a bad block.\n
|
||||
#: e2fsck/problem.c:1419
|
||||
@ -2927,15 +2923,15 @@ msgstr ""
|
||||
|
||||
#. @-expanded: unattached zero-length inode %i.
|
||||
#: e2fsck/problem.c:1970
|
||||
#, fuzzy, no-c-format
|
||||
#, no-c-format
|
||||
msgid "@u @z @i %i. "
|
||||
msgstr "<i>(tiada cadangan)</i>"
|
||||
msgstr "@u @z @i %i. "
|
||||
|
||||
#. @-expanded: unattached inode %i\n
|
||||
#: e2fsck/problem.c:1976
|
||||
#, fuzzy, no-c-format
|
||||
#, no-c-format
|
||||
msgid "@u @i %i\n"
|
||||
msgstr "<i>(tiada cadangan)</i>"
|
||||
msgstr "@u @i %i\n"
|
||||
|
||||
#. @-expanded: inode %i ref count is %Il, should be %N.
|
||||
#: e2fsck/problem.c:1981
|
||||
@ -2956,7 +2952,7 @@ msgstr ""
|
||||
#: e2fsck/problem.c:1992
|
||||
#, fuzzy
|
||||
msgid "@a @i %i ref count is %N, @s %n. "
|
||||
msgstr "i_blocks_hi @F %N, @s sifar.\n"
|
||||
msgstr "i_frag @F %N, @s sifar.\n"
|
||||
|
||||
#. @-expanded: directory exceeds max links, but no DIR_NLINK feature in superblock.\n
|
||||
#: e2fsck/problem.c:1997
|
||||
@ -3226,7 +3222,7 @@ msgstr[0] "ketika menetapkan inod blok buruk"
|
||||
#, fuzzy, c-format
|
||||
msgid "%12u large file\n"
|
||||
msgid_plural "%12u large files\n"
|
||||
msgstr[0] "%s adalah terlalu besar"
|
||||
msgstr[0] "%12u fifo\n"
|
||||
|
||||
#: e2fsck/unix.c:202
|
||||
#, fuzzy, c-format
|
||||
@ -3236,13 +3232,13 @@ msgid ""
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"%12u regular files\n"
|
||||
msgstr[0] "Mencipta fail biasa %s\n"
|
||||
msgstr[0] "fail biasa"
|
||||
|
||||
#: e2fsck/unix.c:204
|
||||
#, fuzzy, c-format
|
||||
msgid "%12u directory\n"
|
||||
msgid_plural "%12u directories\n"
|
||||
msgstr[0] "direktori"
|
||||
msgstr[0] "%12u fifo\n"
|
||||
|
||||
#: e2fsck/unix.c:206
|
||||
#, fuzzy, c-format
|
||||
@ -3257,16 +3253,16 @@ msgid_plural "%12u block device files\n"
|
||||
msgstr[0] "%s adalah bukan peranti khas.\n"
|
||||
|
||||
#: e2fsck/unix.c:211
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid "%12u fifo\n"
|
||||
msgid_plural "%12u fifos\n"
|
||||
msgstr[0] "fifo"
|
||||
msgstr[0] "%12u fifo\n"
|
||||
|
||||
#: e2fsck/unix.c:213
|
||||
#, fuzzy, c-format
|
||||
msgid "%12u link\n"
|
||||
msgid_plural "%12u links\n"
|
||||
msgstr[0] "Pautan ke %s\n"
|
||||
msgstr[0] "%12u fifo\n"
|
||||
|
||||
#: e2fsck/unix.c:215
|
||||
#, fuzzy, c-format
|
||||
@ -3284,13 +3280,13 @@ msgstr[0] "pautan simbolik"
|
||||
#, fuzzy, c-format
|
||||
msgid "%12u socket\n"
|
||||
msgid_plural "%12u sockets\n"
|
||||
msgstr[0] "soket"
|
||||
msgstr[0] "%12u fifo\n"
|
||||
|
||||
#: e2fsck/unix.c:225
|
||||
#, fuzzy, c-format
|
||||
msgid "%12u file\n"
|
||||
msgid_plural "%12u files\n"
|
||||
msgstr[0] " Fail: ..."
|
||||
msgstr[0] "%12u fifo\n"
|
||||
|
||||
#: e2fsck/unix.c:238 misc/badblocks.c:1002 misc/tune2fs.c:2986 misc/util.c:129
|
||||
#: resize/main.c:354
|
||||
@ -3301,7 +3297,7 @@ msgstr "ketika menentukan sama ada %s telah dilekapkan."
|
||||
#: e2fsck/unix.c:259
|
||||
#, fuzzy, c-format
|
||||
msgid "Warning! %s is mounted.\n"
|
||||
msgstr "\tterakhir dilekapkan pada %s"
|
||||
msgstr "\tterakhir dilekapkan pada %s pada %s"
|
||||
|
||||
#: e2fsck/unix.c:262
|
||||
#, fuzzy, c-format
|
||||
@ -3778,9 +3774,8 @@ msgid "nN"
|
||||
msgstr "tTnN"
|
||||
|
||||
#: e2fsck/util.c:198
|
||||
#, fuzzy
|
||||
msgid "aA"
|
||||
msgstr "Ss"
|
||||
msgstr "aA"
|
||||
|
||||
#: e2fsck/util.c:202
|
||||
#, fuzzy
|
||||
@ -3788,9 +3783,8 @@ msgid " ('a' enables 'yes' to all) "
|
||||
msgstr "Semua"
|
||||
|
||||
#: e2fsck/util.c:219
|
||||
#, fuzzy
|
||||
msgid "<y>"
|
||||
msgstr "\t\tY: "
|
||||
msgstr "<y>"
|
||||
|
||||
#: e2fsck/util.c:221
|
||||
#, fuzzy
|
||||
@ -3942,7 +3936,7 @@ msgstr ""
|
||||
#: misc/badblocks.c:337
|
||||
#, fuzzy
|
||||
msgid "Testing with random pattern: "
|
||||
msgstr "Menyemai penjana nombor rawak..."
|
||||
msgstr "Gagal untuk mendapatkan data rawak."
|
||||
|
||||
#: misc/badblocks.c:355
|
||||
#, fuzzy
|
||||
@ -4423,13 +4417,15 @@ msgstr "(0x%x, '%s') "
|
||||
|
||||
#: misc/dumpe2fs.c:263
|
||||
msgid ","
|
||||
msgstr ""
|
||||
msgstr ","
|
||||
|
||||
#: misc/dumpe2fs.c:265
|
||||
msgid ""
|
||||
"\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" "
|
||||
|
||||
#: misc/dumpe2fs.c:266
|
||||
#, fuzzy
|
||||
@ -4795,7 +4791,7 @@ msgstr ""
|
||||
#: misc/e2image.c:1663
|
||||
#, fuzzy
|
||||
msgid "Can not stat output\n"
|
||||
msgstr "Keluaran:\n"
|
||||
msgstr "ketika cuba untuk stat %s"
|
||||
|
||||
#: misc/e2image.c:1673
|
||||
#, fuzzy, c-format
|
||||
@ -4999,7 +4995,7 @@ msgstr "ketika membuka %s"
|
||||
#: misc/e2undo.c:466
|
||||
#, fuzzy
|
||||
msgid "specified offset is too large"
|
||||
msgstr "%s adalah terlalu besar"
|
||||
msgstr "nombor token terlalu besar"
|
||||
|
||||
#: misc/e2undo.c:507
|
||||
#, fuzzy
|
||||
@ -5324,7 +5320,7 @@ msgstr ""
|
||||
#: misc/mke2fs.c:343
|
||||
#, fuzzy
|
||||
msgid "while marking bad blocks as used"
|
||||
msgstr "ketika membaca dalam senarai blok buruk dari fail"
|
||||
msgstr "ketika memeriksa kewarasan blok inode buruk"
|
||||
|
||||
#: misc/mke2fs.c:368
|
||||
#, fuzzy
|
||||
@ -5442,7 +5438,7 @@ msgstr "Saiz blok=%u (log=%u)\n"
|
||||
#: misc/mke2fs.c:686
|
||||
#, fuzzy, c-format
|
||||
msgid "Cluster size=%u (log=%u)\n"
|
||||
msgstr "Saiz blok=%u (log=%u)\n"
|
||||
msgstr "Saiz pecahan=%u (log=%u)\n"
|
||||
|
||||
#: misc/mke2fs.c:690
|
||||
#, c-format
|
||||
@ -5695,7 +5691,7 @@ msgstr ""
|
||||
#: misc/mke2fs.c:1661
|
||||
#, fuzzy, c-format
|
||||
msgid "invalid cluster size - %s"
|
||||
msgstr "saiz blok tidak sah - %s"
|
||||
msgstr "saiz pecahan tidak sah - %s"
|
||||
|
||||
#: misc/mke2fs.c:1674
|
||||
msgid "'-R' is deprecated, use '-E' instead"
|
||||
@ -6218,7 +6214,7 @@ msgstr ""
|
||||
#: misc/mk_hugefiles.c:583
|
||||
#, fuzzy
|
||||
msgid "Huge files will be zero'ed\n"
|
||||
msgstr "Salinan fail"
|
||||
msgstr " %d fail,"
|
||||
|
||||
#: misc/mk_hugefiles.c:584
|
||||
#, fuzzy, c-format
|
||||
@ -6358,14 +6354,14 @@ msgid "Please run `resize2fs %s %s"
|
||||
msgstr "ketika cuba untuk melaksana '%s'"
|
||||
|
||||
#: misc/tune2fs.c:493
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid " -z \"%s\""
|
||||
msgstr "@E mempunyai nama @z.\n"
|
||||
msgstr " -z \"%s\""
|
||||
|
||||
#: misc/tune2fs.c:495
|
||||
#, fuzzy, c-format
|
||||
msgid "' to enable 64-bit mode.\n"
|
||||
msgstr "Aktifkan gantungan"
|
||||
msgstr "enable/disable"
|
||||
|
||||
#: misc/tune2fs.c:497
|
||||
#, fuzzy, c-format
|
||||
@ -7032,18 +7028,9 @@ msgid " %s [-r|t] [-n num] [-s socketpath]\n"
|
||||
msgstr ""
|
||||
|
||||
#: misc/uuidd.c:53
|
||||
#, fuzzy, c-format
|
||||
#, c-format
|
||||
msgid " %s -k\n"
|
||||
msgstr ""
|
||||
" --prologue=FAIL masukkan FAIL.pro sebagai prolog PostScript\n"
|
||||
" --ppd[=KEKUNCI] pilihan PPD automatik atau tetapkan kepada KEKUNCI\n"
|
||||
" -n, --copies=NOM cetak NOM salinan bagi setiap laman\n"
|
||||
" -s, --sides=MOD tetapkan MOD dupleks (`1' atau `simplex',\n"
|
||||
" `2' atau `duplex', `tumble')\n"
|
||||
" -S, --setpagedevice=K[:V] hantar laman definisi alat kepada keluaran\n"
|
||||
" --statusdict=K[:[:]V] hantar definisi statusdict kepada keluaran\n"
|
||||
" -k, --page-prefeed hidupkan laman prasuap\n"
|
||||
" -K, --no-page-prefeed matikan laman prasuap\n"
|
||||
msgstr " %s -k\n"
|
||||
|
||||
#: misc/uuidd.c:155
|
||||
#, fuzzy
|
||||
@ -7058,7 +7045,7 @@ msgstr "IDENT: connect() gagal: %s."
|
||||
#: misc/uuidd.c:192
|
||||
#, fuzzy
|
||||
msgid "write"
|
||||
msgstr "Tidak dapat menulis diluar daripada %s"
|
||||
msgstr "Tidak dapat menulis salinan: %s"
|
||||
|
||||
#: misc/uuidd.c:200
|
||||
#, fuzzy
|
||||
@ -7068,7 +7055,7 @@ msgstr "Kiraan Perkataan"
|
||||
#: misc/uuidd.c:206
|
||||
#, fuzzy
|
||||
msgid "bad response length"
|
||||
msgstr "Panjang stride tidak sah"
|
||||
msgstr "\t\t\tKekangan Panjang Laluan: %d\n"
|
||||
|
||||
#: misc/uuidd.c:271
|
||||
#, c-format
|
||||
@ -7245,7 +7232,7 @@ msgstr ""
|
||||
#: resize/main.c:507
|
||||
#, fuzzy, c-format
|
||||
msgid "Invalid new size: %s\n"
|
||||
msgstr "%s: fail saiz tidak sah"
|
||||
msgstr "saiz inode tidak sah - %s"
|
||||
|
||||
#: resize/main.c:526
|
||||
msgid "New size too large to be expressed in 32 bits\n"
|
||||
@ -7344,7 +7331,7 @@ msgstr ""
|
||||
#: resize/main.c:650
|
||||
#, fuzzy, c-format
|
||||
msgid "while trying to truncate %s"
|
||||
msgstr "ketika cuba untuk melaksana '%s'"
|
||||
msgstr "ketika cuba untuk memadam %s"
|
||||
|
||||
#: resize/online.c:81
|
||||
msgid "kernel does not support online resize with sparse_super2"
|
||||
@ -7448,7 +7435,7 @@ msgstr ""
|
||||
#: lib/ext2fs/ext2_err.c:11
|
||||
#, fuzzy
|
||||
msgid "EXT2FS Library version 1.45.3"
|
||||
msgstr "Versi pustaka gcrypt terlalu lama."
|
||||
msgstr "Versi pustaka tasn1 terlalu lama."
|
||||
|
||||
#: lib/ext2fs/ext2_err.c:12
|
||||
msgid "Wrong magic number for ext2_filsys structure"
|
||||
@ -7644,7 +7631,7 @@ msgstr "Nombor tidak sah untuk saiz flex_bg"
|
||||
#: lib/ext2fs/ext2_err.c:54
|
||||
#, fuzzy
|
||||
msgid "Internal error in ext2fs_expand_dir"
|
||||
msgstr "Ralat aliran data dalaman."
|
||||
msgstr "Ralat dalaman GnuTLS."
|
||||
|
||||
#: lib/ext2fs/ext2_err.c:55
|
||||
msgid "Not enough space to build proposed filesystem"
|
||||
@ -7804,7 +7791,7 @@ msgstr "Menulis bitmap blok"
|
||||
#: lib/ext2fs/ext2_err.c:90
|
||||
#, fuzzy
|
||||
msgid "Ext2 directory already exists"
|
||||
msgstr "tak dapat menyenaraikan direktori tersedia-tersenarai: %s"
|
||||
msgstr "Seksyen telah wujud"
|
||||
|
||||
#: lib/ext2fs/ext2_err.c:91
|
||||
msgid "Unimplemented ext2 library function"
|
||||
@ -8041,7 +8028,7 @@ msgstr "Tiada corak carian semasa"
|
||||
#: lib/ext2fs/ext2_err.c:140
|
||||
#, fuzzy
|
||||
msgid "Ext2fs operation not supported"
|
||||
msgstr "Arahan tidak disokong."
|
||||
msgstr "Buat semula tindakan nyahbuat terakhir"
|
||||
|
||||
#: lib/ext2fs/ext2_err.c:141
|
||||
msgid "No room to insert extent in node"
|
||||
@ -8152,7 +8139,7 @@ msgstr "Perkara yang sama bagi hujah pilihan.\n"
|
||||
#: lib/ext2fs/ext2_err.c:166
|
||||
#, fuzzy
|
||||
msgid "Ext2 file already exists"
|
||||
msgstr "File wujud, TULISGANTI ?"
|
||||
msgstr "Seksyen telah wujud"
|
||||
|
||||
#: lib/ext2fs/ext2_err.c:167
|
||||
#, fuzzy
|
||||
@ -8250,42 +8237,28 @@ msgid "The journal superblock is corrupt"
|
||||
msgstr "ketika membaca superblok jurnal"
|
||||
|
||||
#: lib/ext2fs/ext2_err.c:188
|
||||
#, fuzzy
|
||||
msgid "Inode is corrupted"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Jadual inode di"
|
||||
msgstr "Inode rosak"
|
||||
|
||||
#: lib/ext2fs/ext2_err.c:189
|
||||
msgid "Inode containing extended attribute value is corrupted"
|
||||
msgstr ""
|
||||
|
||||
#: lib/support/prof_err.c:11
|
||||
#, fuzzy
|
||||
msgid "Profile version 0.0"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"profil mendatar:\n"
|
||||
msgstr "Versi profil 0.0"
|
||||
|
||||
#: lib/support/prof_err.c:12
|
||||
msgid "Bad magic value in profile_node"
|
||||
msgstr ""
|
||||
|
||||
#: lib/support/prof_err.c:13
|
||||
#, fuzzy
|
||||
msgid "Profile section not found"
|
||||
msgstr "Bahagian Bras"
|
||||
msgstr "Seksyen profil tidak dijumpai"
|
||||
|
||||
#: lib/support/prof_err.c:14
|
||||
#, fuzzy
|
||||
msgid "Profile relation not found"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"profil mendatar:\n"
|
||||
msgstr "Kaitan profil tidak dijumpai"
|
||||
|
||||
#: lib/support/prof_err.c:15
|
||||
msgid "Attempt to add a relation to node which is not a section"
|
||||
@ -8329,20 +8302,19 @@ msgstr ""
|
||||
|
||||
#: lib/support/prof_err.c:25
|
||||
msgid "Syntax error in profile section header"
|
||||
msgstr ""
|
||||
msgstr "Ralat sintaks dalam pengepala seksyen profil"
|
||||
|
||||
#: lib/support/prof_err.c:26
|
||||
#, fuzzy
|
||||
msgid "Syntax error in profile relation"
|
||||
msgstr "ralat sintaks, tidak menjangka %s"
|
||||
msgstr "Ralat sintaks dalam kaitan profil"
|
||||
|
||||
#: lib/support/prof_err.c:27
|
||||
msgid "Extra closing brace in profile"
|
||||
msgstr ""
|
||||
msgstr "Penutup pendakap tambahan dalam profil"
|
||||
|
||||
#: lib/support/prof_err.c:28
|
||||
msgid "Missing open brace in profile"
|
||||
msgstr ""
|
||||
msgstr "Hilang pembuka pendakap dalam profil"
|
||||
|
||||
#: lib/support/prof_err.c:29
|
||||
msgid "Bad magic value in profile_t"
|
||||
@ -8357,23 +8329,20 @@ msgid "Iteration through all top level section not supported"
|
||||
msgstr ""
|
||||
|
||||
#: lib/support/prof_err.c:32
|
||||
#, fuzzy
|
||||
msgid "Invalid profile_section object"
|
||||
msgstr "Tetapan pilihan sistemfail tidak sah: %s\n"
|
||||
msgstr "Objek profile_section tidak sah"
|
||||
|
||||
#: lib/support/prof_err.c:33
|
||||
#, fuzzy
|
||||
msgid "No more sections"
|
||||
msgstr "Lagi..."
|
||||
msgstr "Tiada lagi seksyen"
|
||||
|
||||
#: lib/support/prof_err.c:34
|
||||
msgid "Bad nameset passed to query routine"
|
||||
msgstr ""
|
||||
|
||||
#: lib/support/prof_err.c:35
|
||||
#, fuzzy
|
||||
msgid "No profile file open"
|
||||
msgstr "tidak dapat membuka fail `%s'"
|
||||
msgstr "Tiada fail profil dibuka"
|
||||
|
||||
#: lib/support/prof_err.c:36
|
||||
msgid "Bad magic value in profile_file_t"
|
||||
|
2652
po/zh_CN.po
2652
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@ -201,7 +201,7 @@ mark_corrupt() {
|
||||
|
||||
setup() {
|
||||
# Try to remove snapshot for 30s, bail out if we can't remove it.
|
||||
lveremove_deadline="$(( $(date "+%s") + 30))"
|
||||
lvremove_deadline="$(( $(date "+%s") + 30))"
|
||||
${DBG} lvremove -f "${LVM2_VG_NAME}/${snap}" 2>/dev/null
|
||||
while [ -e "${snap_dev}" ] && [ "$?" -eq "5" ] &&
|
||||
[ "$(date "+%s")" -lt "${lvremove_deadline}" ]; do
|
||||
|
@ -1,23 +0,0 @@
|
||||
#!/bin/sed -f
|
||||
#
|
||||
# This script filters out gcc-wall crud that we're not interested in seeing.
|
||||
#
|
||||
/^cc /d
|
||||
/^kcc /d
|
||||
/^gcc /d
|
||||
/does not support `long long'/d
|
||||
/forbids long long integer constants/d
|
||||
/does not support the `ll' length modifier/d
|
||||
/does not support the `ll' printf length modifier/d
|
||||
/ANSI C forbids long long integer constants/d
|
||||
/traditional C rejects string concatenation/d
|
||||
/integer constant is unsigned in ANSI C, signed with -traditional/d
|
||||
/ISO C forbids conversion of object pointer to function pointer type/,+2d
|
||||
/ISO C does not support ‘__FUNCTION__’ predefined identifier/d
|
||||
/At top level:/d
|
||||
/In file included from/d
|
||||
/In function `.*':/d
|
||||
/zero-length format string/d
|
||||
/warning: (near initialization for/d
|
||||
/^[ ]*from/d
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/sed -f
|
||||
#
|
||||
# This script filters out gcc-wall crud that we're not interested in seeing.
|
||||
#
|
||||
/^cc /d
|
||||
/^kcc /d
|
||||
/^gcc /d
|
||||
/does not support `long long'/d
|
||||
/forbids long long integer constants/d
|
||||
/does not support the `ll' length modifier/d
|
||||
/does not support the `ll' printf length modifier/d
|
||||
/ANSI C forbids long long integer constants/d
|
||||
/traditional C rejects string concatenation/d
|
||||
/integer constant is unsigned in ANSI C, signed with -traditional/d
|
||||
/warning: missing initializer/d
|
||||
/warning: (near initialization for/d
|
||||
/^[ ]*from/d
|
||||
/unused parameter/d
|
||||
/e2_types.h" not found.$/d
|
||||
/e2_bitops.h" not found.$/d
|
Loading…
Reference in New Issue
Block a user