parent
5ebfeaf282
commit
2a78639c1c
@ -1 +0,0 @@
|
|||||||
DIST ecryptfs-utils-111_p20170609.tar.gz 1433722 BLAKE2B eeb8840e0b369d2eb420e7853629086cbf430daed2dbf3ed620f5c2489de711c9d8dc5c2b555db5d09b968df6d07da19b93ca46add3b7987d3ff1ad9f06adc69 SHA512 4788a35d68bbb6b769803754adad14d063564e6285edcec4d68df076e96c61550ab6487a1b84498e24e3f56f8c9fda6eb63a66d469d3e654834357c5e2b4c781
|
|
@ -1,94 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="6"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python2_7 )
|
|
||||||
|
|
||||||
inherit flag-o-matic pam python2-single linux-info autotools
|
|
||||||
|
|
||||||
DESCRIPTION="eCryptfs userspace utilities"
|
|
||||||
HOMEPAGE="https://launchpad.net/ecryptfs"
|
|
||||||
SRC_URI="https://dev.gentoo.org/~bkohler/dist/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
|
|
||||||
IUSE="doc gpg gtk nls openssl pam pkcs11 python suid tpm"
|
|
||||||
|
|
||||||
RDEPEND=">=sys-apps/keyutils-1.5.11-r1:=
|
|
||||||
>=dev-libs/libgcrypt-1.2.0:0
|
|
||||||
dev-libs/nss
|
|
||||||
gpg? ( app-crypt/gpgme )
|
|
||||||
gtk? ( x11-libs/gtk+:2 )
|
|
||||||
openssl? ( >=dev-libs/openssl-0.9.7:= )
|
|
||||||
pam? ( sys-libs/pam )
|
|
||||||
pkcs11? (
|
|
||||||
>=dev-libs/openssl-0.9.7:=
|
|
||||||
>=dev-libs/pkcs11-helper-1.04
|
|
||||||
)
|
|
||||||
python? ( ${PYTHON_DEPS} )
|
|
||||||
tpm? ( app-crypt/trousers )"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
virtual/pkgconfig
|
|
||||||
sys-devel/gettext
|
|
||||||
>=dev-util/intltool-0.41.0
|
|
||||||
python? ( dev-lang/swig )"
|
|
||||||
|
|
||||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
use python && python2-single_pkg_setup
|
|
||||||
|
|
||||||
CONFIG_CHECK="~ECRYPT_FS"
|
|
||||||
linux-info_pkg_setup
|
|
||||||
}
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
mkdir -p "${S}" || die
|
|
||||||
tar -xf "${DISTDIR}/${P}.tar.gz" --strip-components=3 -C "${S}"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
default
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
append-cppflags -D_FILE_OFFSET_BITS=64
|
|
||||||
|
|
||||||
econf \
|
|
||||||
--enable-nss \
|
|
||||||
--with-pamdir=$(getpam_mod_dir) \
|
|
||||||
$(use_enable doc docs) \
|
|
||||||
$(use_enable gpg) \
|
|
||||||
$(use_enable gtk gui) \
|
|
||||||
$(use_enable nls) \
|
|
||||||
$(use_enable openssl) \
|
|
||||||
$(use_enable pam) \
|
|
||||||
$(use_enable pkcs11 pkcs11-helper) \
|
|
||||||
$(use_enable python pywrap) \
|
|
||||||
$(use_enable tpm tspi)
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
echo "ecryptfs-utils" > "${D}$(python_get_sitedir)/ecryptfs-utils.pth" || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
use suid && fperms u+s /sbin/mount.ecryptfs_private
|
|
||||||
|
|
||||||
find "${ED}" -name '*.la' -exec rm -f '{}' + || die
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
if use suid; then
|
|
||||||
ewarn
|
|
||||||
ewarn "You have chosen to install ${PN} with the binary setuid root. This"
|
|
||||||
ewarn "means that if there are any undetected vulnerabilities in the binary,"
|
|
||||||
ewarn "then local users may be able to gain root access on your machine."
|
|
||||||
ewarn
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
|
||||||
<pkgmetadata>
|
|
||||||
<!-- maintainer-needed -->
|
|
||||||
<use>
|
|
||||||
<flag name="gpg">Enable <pkg>app-crypt/gnupg</pkg> key module</flag>
|
|
||||||
<flag name="openssl">Enable <pkg>dev-libs/openssl</pkg> key
|
|
||||||
module</flag>
|
|
||||||
<flag name="pkcs11">Enable PKCS#11 (Smartcards) key module</flag>
|
|
||||||
<flag name="tpm">Enable support for Trusted Platform Module (TPM) using <pkg>app-crypt/trousers</pkg></flag>
|
|
||||||
</use>
|
|
||||||
<upstream>
|
|
||||||
<remote-id type="cpe">cpe:/a:ecryptfs:ecryptfs_utils</remote-id>
|
|
||||||
<remote-id type="launchpad">ecryptfs</remote-id>
|
|
||||||
</upstream>
|
|
||||||
</pkgmetadata>
|
|
@ -1,2 +0,0 @@
|
|||||||
DIST squashfs-tools_4.3-6.debian.tar.xz 19060 BLAKE2B 4fc28fae1da2bd1bfbf774acd4f4b29e382760078efd16c655a9178633a58e1ab15fb0203a626dc6353df8ff6860f7da5f9369fd920cf773dd53f8b90cffe13c SHA512 e2f64cdcfe01696980a45d4d6ec50e82626cb3e25e8c98d63b68c9754f519171fcfc4586b4ef88104e28275e1daf94a23f5b7dd08d37fe6e8417b054954de1e7
|
|
||||||
DIST squashfs4.3.tar.gz 182550 BLAKE2B f56ff33a505f7d60cced11224526bfce003bc06184ad7e8cb9cd08b14854164da8d2ecc64694d44085c46bcfa3aaa85939c97820415345053f7956af04066fdb SHA512 854ed7acc99920f24ecf11e0da807e5a2a162eeda55db971aba63a03f0da2c13b20ec0564a906c4b0e415bd8258b273a10208c7abc0704f2ceea773aa6148a79
|
|
@ -1,15 +0,0 @@
|
|||||||
the mksquashfs code has an all_zeros func that does:
|
|
||||||
long *p = (long *) file_buffer->data;
|
|
||||||
|
|
||||||
make sure we force the data field to be aligned so that still works.
|
|
||||||
|
|
||||||
--- a/squashfs-tools/caches-queues-lists.h
|
|
||||||
+++ b/squashfs-tools/caches-queues-lists.h
|
|
||||||
@@ -123,6 +123,7 @@ struct file_buffer {
|
|
||||||
char locked;
|
|
||||||
char wait_on_unlock;
|
|
||||||
char noD;
|
|
||||||
+ long _pad;
|
|
||||||
char data[0];
|
|
||||||
};
|
|
||||||
|
|
@ -1,121 +0,0 @@
|
|||||||
From https://github.com/plougher/squashfs-tools/pull/9
|
|
||||||
|
|
||||||
From 4280e74de14070869787a9166242f9ce2dafd82e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexandru Ardelean <aa@ocedo.com>
|
|
||||||
Date: Wed, 6 Jan 2016 15:33:43 +0200
|
|
||||||
Subject: [PATCH] squashfs-tools: with fnmatch.h compatibility with musl
|
|
||||||
|
|
||||||
musl does not define FNM_EXTMATCH
|
|
||||||
|
|
||||||
Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
|
|
||||||
---
|
|
||||||
squashfs-tools/action.c | 2 +-
|
|
||||||
squashfs-tools/fnmatch_compat.h | 32 ++++++++++++++++++++++++++++++++
|
|
||||||
squashfs-tools/mksquashfs.c | 2 +-
|
|
||||||
squashfs-tools/unsquashfs.c | 1 +
|
|
||||||
squashfs-tools/unsquashfs.h | 1 -
|
|
||||||
5 files changed, 35 insertions(+), 3 deletions(-)
|
|
||||||
create mode 100644 squashfs-tools/fnmatch_compat.h
|
|
||||||
|
|
||||||
diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c
|
|
||||||
index 35889a4..4b06ccb 100644
|
|
||||||
--- a/squashfs-tools/action.c
|
|
||||||
+++ b/squashfs-tools/action.c
|
|
||||||
@@ -31,7 +31,6 @@
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
-#include <fnmatch.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <grp.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
@@ -43,6 +42,7 @@
|
|
||||||
#include "mksquashfs.h"
|
|
||||||
#include "action.h"
|
|
||||||
#include "error.h"
|
|
||||||
+#include "fnmatch_compat.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* code to parse actions
|
|
||||||
diff --git a/squashfs-tools/fnmatch_compat.h b/squashfs-tools/fnmatch_compat.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..7b4afd8
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/squashfs-tools/fnmatch_compat.h
|
|
||||||
@@ -0,0 +1,32 @@
|
|
||||||
+#ifndef FNMATCH_COMPAT
|
|
||||||
+#define FNMATCH_COMPAT
|
|
||||||
+/*
|
|
||||||
+ * Squashfs
|
|
||||||
+ *
|
|
||||||
+ * Copyright (c) 2015
|
|
||||||
+ * Phillip Lougher <phillip@squashfs.org.uk>
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU General Public License
|
|
||||||
+ * as published by the Free Software Foundation; either version 2,
|
|
||||||
+ * or (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This program is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * You should have received a copy of the GNU General Public License
|
|
||||||
+ * along with this program; if not, write to the Free Software
|
|
||||||
+ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
+ *
|
|
||||||
+ * fnmatch_compat.h
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <fnmatch.h>
|
|
||||||
+
|
|
||||||
+#ifndef FNM_EXTMATCH
|
|
||||||
+#define FNM_EXTMATCH 0
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
|
|
||||||
index d221c35..4e7cbdd 100644
|
|
||||||
--- a/squashfs-tools/mksquashfs.c
|
|
||||||
+++ b/squashfs-tools/mksquashfs.c
|
|
||||||
@@ -46,7 +46,6 @@
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <regex.h>
|
|
||||||
-#include <fnmatch.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
@@ -76,6 +75,7 @@
|
|
||||||
#include "read_fs.h"
|
|
||||||
#include "restore.h"
|
|
||||||
#include "process_fragments.h"
|
|
||||||
+#include "fnmatch_compat.h"
|
|
||||||
|
|
||||||
int delete = FALSE;
|
|
||||||
int fd;
|
|
||||||
diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
|
|
||||||
index 1323dd6..2428baa 100644
|
|
||||||
--- a/squashfs-tools/unsquashfs.c
|
|
||||||
+++ b/squashfs-tools/unsquashfs.c
|
|
||||||
@@ -30,6 +30,7 @@
|
|
||||||
#include "xattr.h"
|
|
||||||
#include "unsquashfs_info.h"
|
|
||||||
#include "stdarg.h"
|
|
||||||
+#include "fnmatch_compat.h"
|
|
||||||
|
|
||||||
#include <sys/sysinfo.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
|
|
||||||
index ecd0bb4..0edbd25 100644
|
|
||||||
--- a/squashfs-tools/unsquashfs.h
|
|
||||||
+++ b/squashfs-tools/unsquashfs.h
|
|
||||||
@@ -40,7 +40,6 @@
|
|
||||||
#include <grp.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <regex.h>
|
|
||||||
-#include <fnmatch.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <math.h>
|
|
@ -1,19 +0,0 @@
|
|||||||
taken from Fedora
|
|
||||||
|
|
||||||
commit af393379e34c5677f95bbec11645b6c3028195b4
|
|
||||||
Author: Bruno Wolff III <bruno@wolff.to>
|
|
||||||
Date: Wed Jun 24 14:27:31 2015 -0500
|
|
||||||
|
|
||||||
Update printf formats to match datatypes after CVE patch
|
|
||||||
|
|
||||||
--- a/squashfs-tools/unsquash-4.c
|
|
||||||
+++ b/squashfs-tools/unsquash-4.c
|
|
||||||
@@ -35,7 +35,7 @@
|
|
||||||
size_t indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
|
|
||||||
long long *fragment_table_index;
|
|
||||||
|
|
||||||
- TRACE("read_fragment_table: %d fragments, reading %d fragment indexes "
|
|
||||||
+ TRACE("read_fragment_table: %u fragments, reading %zu fragment indexes "
|
|
||||||
"from 0x%llx\n", sBlk.s.fragments, indexes,
|
|
||||||
sBlk.s.fragment_table_start);
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
taken from Fedora
|
|
||||||
|
|
||||||
From 604b607d8ac91eb8afc0b6e3d917d5c073096103 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Phillip Lougher <phillip@squashfs.org.uk>
|
|
||||||
Date: Wed, 11 Jun 2014 04:51:37 +0100
|
|
||||||
Subject: mksquashfs: ensure value does not overflow a signed int in -mem
|
|
||||||
option
|
|
||||||
|
|
||||||
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
||||||
|
|
||||||
diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
|
|
||||||
index 5370ecf..9676dc8 100644
|
|
||||||
--- a/squashfs-tools/mksquashfs.c
|
|
||||||
+++ b/squashfs-tools/mksquashfs.c
|
|
||||||
@@ -5193,7 +5193,16 @@ print_compressor_options:
|
|
||||||
argv[0]);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
- /* convert from bytes to Mbytes */
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * convert from bytes to Mbytes, ensuring the value
|
|
||||||
+ * does not overflow a signed int
|
|
||||||
+ */
|
|
||||||
+ if(number >= (1LL << 51)) {
|
|
||||||
+ ERROR("%s: -mem invalid mem size\n", argv[0]);
|
|
||||||
+ exit(1);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
total_mem = number / 1048576;
|
|
||||||
if(total_mem < (SQUASHFS_LOWMEM / SQUASHFS_TAKE)) {
|
|
||||||
ERROR("%s: -mem should be %d Mbytes or "
|
|
||||||
--
|
|
||||||
cgit v0.10.1
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From https://github.com/plougher/squashfs-tools/pull/9
|
|
||||||
|
|
||||||
From b0ca8a5c98ff73e70b2ab1bc24aa824aa2458287 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexandru Ardelean <aa@ocedo.com>
|
|
||||||
Date: Wed, 6 Jan 2016 15:36:48 +0200
|
|
||||||
Subject: [PATCH] pseudo.c: add explicit <sys/stat.h> include
|
|
||||||
|
|
||||||
Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
|
|
||||||
---
|
|
||||||
squashfs-tools/pseudo.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c
|
|
||||||
index f85fe60..83bfc97 100644
|
|
||||||
--- a/squashfs-tools/pseudo.c
|
|
||||||
+++ b/squashfs-tools/pseudo.c
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#include "pseudo.h"
|
|
@ -1,25 +0,0 @@
|
|||||||
sys/types.h might not always include sys/sysmacros.h for major/minor/makedev
|
|
||||||
|
|
||||||
--- a/squashfs-tools/mksquashfs.c
|
|
||||||
+++ b/squashfs-tools/mksquashfs.c
|
|
||||||
@@ -59,6 +59,7 @@
|
|
||||||
#else
|
|
||||||
#include <endian.h>
|
|
||||||
#include <sys/sysinfo.h>
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "squashfs_fs.h"
|
|
||||||
--- a/squashfs-tools/unsquashfs.c
|
|
||||||
+++ b/squashfs-tools/unsquashfs.c
|
|
||||||
@@ -38,6 +38,10 @@
|
|
||||||
#include <limits.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
+#ifdef linux
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
struct cache *fragment_cache, *data_cache;
|
|
||||||
struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
|
|
||||||
pthread_t *thread, *inflator_thread;
|
|
@ -1,402 +0,0 @@
|
|||||||
commit 6113361316d5ce5bfdc118d188e5617a1fcd747c
|
|
||||||
Author: Sean Purcell <me@seanp.xyz>
|
|
||||||
Date: Mon Aug 14 22:46:04 2017 -0700
|
|
||||||
|
|
||||||
squashfs-tools: Add zstd support
|
|
||||||
|
|
||||||
This patch adds zstd support to squashfs-tools. It works with zstd
|
|
||||||
versions >= 1.0.0. It was originally written by Sean Purcell.
|
|
||||||
|
|
||||||
Signed-off-by: Sean Purcell <me@seanp.xyz>
|
|
||||||
Signed-off-by: Nick Terrell <terrelln@fb.com>
|
|
||||||
|
|
||||||
diff --git a/squashfs-tools/Makefile b/squashfs-tools/Makefile
|
|
||||||
index 52d2582..22fc559 100644
|
|
||||||
--- a/squashfs-tools/Makefile
|
|
||||||
+++ b/squashfs-tools/Makefile
|
|
||||||
@@ -75,6 +75,18 @@ GZIP_SUPPORT = 1
|
|
||||||
#LZMA_SUPPORT = 1
|
|
||||||
#LZMA_DIR = ../../../../LZMA/lzma465
|
|
||||||
|
|
||||||
+
|
|
||||||
+########### Building ZSTD support ############
|
|
||||||
+#
|
|
||||||
+# The ZSTD library is supported
|
|
||||||
+# ZSTD homepage: http://zstd.net
|
|
||||||
+# ZSTD source repository: https://github.com/facebook/zstd
|
|
||||||
+#
|
|
||||||
+# To build using the ZSTD library - install the library and uncomment the
|
|
||||||
+# ZSTD_SUPPORT line below.
|
|
||||||
+#
|
|
||||||
+#ZSTD_SUPPORT = 1
|
|
||||||
+
|
|
||||||
######## Specifying default compression ########
|
|
||||||
#
|
|
||||||
# The next line specifies which compression algorithm is used by default
|
|
||||||
@@ -177,6 +189,14 @@ LIBS += -llz4
|
|
||||||
COMPRESSORS += lz4
|
|
||||||
endif
|
|
||||||
|
|
||||||
+ifeq ($(ZSTD_SUPPORT),1)
|
|
||||||
+CFLAGS += -DZSTD_SUPPORT
|
|
||||||
+MKSQUASHFS_OBJS += zstd_wrapper.o
|
|
||||||
+UNSQUASHFS_OBJS += zstd_wrapper.o
|
|
||||||
+LIBS += -lzstd
|
|
||||||
+COMPRESSORS += zstd
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
ifeq ($(XATTR_SUPPORT),1)
|
|
||||||
ifeq ($(XATTR_DEFAULT),1)
|
|
||||||
CFLAGS += -DXATTR_SUPPORT -DXATTR_DEFAULT
|
|
||||||
diff --git a/squashfs-tools/compressor.c b/squashfs-tools/compressor.c
|
|
||||||
index 525e316..02b5e90 100644
|
|
||||||
--- a/squashfs-tools/compressor.c
|
|
||||||
+++ b/squashfs-tools/compressor.c
|
|
||||||
@@ -65,6 +65,13 @@ static struct compressor xz_comp_ops = {
|
|
||||||
extern struct compressor xz_comp_ops;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifndef ZSTD_SUPPORT
|
|
||||||
+static struct compressor zstd_comp_ops = {
|
|
||||||
+ ZSTD_COMPRESSION, "zstd"
|
|
||||||
+};
|
|
||||||
+#else
|
|
||||||
+extern struct compressor zstd_comp_ops;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static struct compressor unknown_comp_ops = {
|
|
||||||
0, "unknown"
|
|
||||||
@@ -77,6 +84,7 @@ struct compressor *compressor[] = {
|
|
||||||
&lzo_comp_ops,
|
|
||||||
&lz4_comp_ops,
|
|
||||||
&xz_comp_ops,
|
|
||||||
+ &zstd_comp_ops,
|
|
||||||
&unknown_comp_ops
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/squashfs-tools/squashfs_fs.h b/squashfs-tools/squashfs_fs.h
|
|
||||||
index 791fe12..afca918 100644
|
|
||||||
--- a/squashfs-tools/squashfs_fs.h
|
|
||||||
+++ b/squashfs-tools/squashfs_fs.h
|
|
||||||
@@ -277,6 +277,7 @@ typedef long long squashfs_inode;
|
|
||||||
#define LZO_COMPRESSION 3
|
|
||||||
#define XZ_COMPRESSION 4
|
|
||||||
#define LZ4_COMPRESSION 5
|
|
||||||
+#define ZSTD_COMPRESSION 6
|
|
||||||
|
|
||||||
struct squashfs_super_block {
|
|
||||||
unsigned int s_magic;
|
|
||||||
diff --git a/squashfs-tools/zstd_wrapper.c b/squashfs-tools/zstd_wrapper.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..dcab75a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/squashfs-tools/zstd_wrapper.c
|
|
||||||
@@ -0,0 +1,254 @@
|
|
||||||
+/*
|
|
||||||
+ * Copyright (c) 2017
|
|
||||||
+ * Phillip Lougher <phillip@squashfs.org.uk>
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU General Public License
|
|
||||||
+ * as published by the Free Software Foundation; either version 2,
|
|
||||||
+ * or (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This program is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * zstd_wrapper.c
|
|
||||||
+ *
|
|
||||||
+ * Support for ZSTD compression http://zstd.net
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <string.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+#include <zstd.h>
|
|
||||||
+#include <zstd_errors.h>
|
|
||||||
+
|
|
||||||
+#include "squashfs_fs.h"
|
|
||||||
+#include "zstd_wrapper.h"
|
|
||||||
+#include "compressor.h"
|
|
||||||
+
|
|
||||||
+static int compression_level = ZSTD_DEFAULT_COMPRESSION_LEVEL;
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * This function is called by the options parsing code in mksquashfs.c
|
|
||||||
+ * to parse any -X compressor option.
|
|
||||||
+ *
|
|
||||||
+ * This function returns:
|
|
||||||
+ * >=0 (number of additional args parsed) on success
|
|
||||||
+ * -1 if the option was unrecognised, or
|
|
||||||
+ * -2 if the option was recognised, but otherwise bad in
|
|
||||||
+ * some way (e.g. invalid parameter)
|
|
||||||
+ *
|
|
||||||
+ * Note: this function sets internal compressor state, but does not
|
|
||||||
+ * pass back the results of the parsing other than success/failure.
|
|
||||||
+ * The zstd_dump_options() function is called later to get the options in
|
|
||||||
+ * a format suitable for writing to the filesystem.
|
|
||||||
+ */
|
|
||||||
+static int zstd_options(char *argv[], int argc)
|
|
||||||
+{
|
|
||||||
+ if (strcmp(argv[0], "-Xcompression-level") == 0) {
|
|
||||||
+ if (argc < 2) {
|
|
||||||
+ fprintf(stderr, "zstd: -Xcompression-level missing "
|
|
||||||
+ "compression level\n");
|
|
||||||
+ fprintf(stderr, "zstd: -Xcompression-level it should "
|
|
||||||
+ "be 1 <= n <= %d\n", ZSTD_maxCLevel());
|
|
||||||
+ goto failed;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ compression_level = atoi(argv[1]);
|
|
||||||
+ if (compression_level < 1 ||
|
|
||||||
+ compression_level > ZSTD_maxCLevel()) {
|
|
||||||
+ fprintf(stderr, "zstd: -Xcompression-level invalid, it "
|
|
||||||
+ "should be 1 <= n <= %d\n", ZSTD_maxCLevel());
|
|
||||||
+ goto failed;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return -1;
|
|
||||||
+failed:
|
|
||||||
+ return -2;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * This function is called by mksquashfs to dump the parsed
|
|
||||||
+ * compressor options in a format suitable for writing to the
|
|
||||||
+ * compressor options field in the filesystem (stored immediately
|
|
||||||
+ * after the superblock).
|
|
||||||
+ *
|
|
||||||
+ * This function returns a pointer to the compression options structure
|
|
||||||
+ * to be stored (and the size), or NULL if there are no compression
|
|
||||||
+ * options.
|
|
||||||
+ */
|
|
||||||
+static void *zstd_dump_options(int block_size, int *size)
|
|
||||||
+{
|
|
||||||
+ static struct zstd_comp_opts comp_opts;
|
|
||||||
+
|
|
||||||
+ /* don't return anything if the options are all default */
|
|
||||||
+ if (compression_level == ZSTD_DEFAULT_COMPRESSION_LEVEL)
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
+ comp_opts.compression_level = compression_level;
|
|
||||||
+
|
|
||||||
+ SQUASHFS_INSWAP_COMP_OPTS(&comp_opts);
|
|
||||||
+
|
|
||||||
+ *size = sizeof(comp_opts);
|
|
||||||
+ return &comp_opts;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * This function is a helper specifically for the append mode of
|
|
||||||
+ * mksquashfs. Its purpose is to set the internal compressor state
|
|
||||||
+ * to the stored compressor options in the passed compressor options
|
|
||||||
+ * structure.
|
|
||||||
+ *
|
|
||||||
+ * In effect this function sets up the compressor options
|
|
||||||
+ * to the same state they were when the filesystem was originally
|
|
||||||
+ * generated, this is to ensure on appending, the compressor uses
|
|
||||||
+ * the same compression options that were used to generate the
|
|
||||||
+ * original filesystem.
|
|
||||||
+ *
|
|
||||||
+ * Note, even if there are no compressor options, this function is still
|
|
||||||
+ * called with an empty compressor structure (size == 0), to explicitly
|
|
||||||
+ * set the default options, this is to ensure any user supplied
|
|
||||||
+ * -X options on the appending mksquashfs command line are over-ridden.
|
|
||||||
+ *
|
|
||||||
+ * This function returns 0 on sucessful extraction of options, and -1 on error.
|
|
||||||
+ */
|
|
||||||
+static int zstd_extract_options(int block_size, void *buffer, int size)
|
|
||||||
+{
|
|
||||||
+ struct zstd_comp_opts *comp_opts = buffer;
|
|
||||||
+
|
|
||||||
+ if (size == 0) {
|
|
||||||
+ /* Set default values */
|
|
||||||
+ compression_level = ZSTD_DEFAULT_COMPRESSION_LEVEL;
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* we expect a comp_opts structure of sufficient size to be present */
|
|
||||||
+ if (size < sizeof(*comp_opts))
|
|
||||||
+ goto failed;
|
|
||||||
+
|
|
||||||
+ SQUASHFS_INSWAP_COMP_OPTS(comp_opts);
|
|
||||||
+
|
|
||||||
+ if (comp_opts->compression_level < 1 ||
|
|
||||||
+ comp_opts->compression_level > ZSTD_maxCLevel()) {
|
|
||||||
+ fprintf(stderr, "zstd: bad compression level in compression "
|
|
||||||
+ "options structure\n");
|
|
||||||
+ goto failed;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ compression_level = comp_opts->compression_level;
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+failed:
|
|
||||||
+ fprintf(stderr, "zstd: error reading stored compressor options from "
|
|
||||||
+ "filesystem!\n");
|
|
||||||
+
|
|
||||||
+ return -1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void zstd_display_options(void *buffer, int size)
|
|
||||||
+{
|
|
||||||
+ struct zstd_comp_opts *comp_opts = buffer;
|
|
||||||
+
|
|
||||||
+ /* we expect a comp_opts structure of sufficient size to be present */
|
|
||||||
+ if (size < sizeof(*comp_opts))
|
|
||||||
+ goto failed;
|
|
||||||
+
|
|
||||||
+ SQUASHFS_INSWAP_COMP_OPTS(comp_opts);
|
|
||||||
+
|
|
||||||
+ if (comp_opts->compression_level < 1 ||
|
|
||||||
+ comp_opts->compression_level > ZSTD_maxCLevel()) {
|
|
||||||
+ fprintf(stderr, "zstd: bad compression level in compression "
|
|
||||||
+ "options structure\n");
|
|
||||||
+ goto failed;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ printf("\tcompression-level %d\n", comp_opts->compression_level);
|
|
||||||
+
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+failed:
|
|
||||||
+ fprintf(stderr, "zstd: error reading stored compressor options from "
|
|
||||||
+ "filesystem!\n");
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * This function is called by mksquashfs to initialise the
|
|
||||||
+ * compressor, before compress() is called.
|
|
||||||
+ *
|
|
||||||
+ * This function returns 0 on success, and -1 on error.
|
|
||||||
+ */
|
|
||||||
+static int zstd_init(void **strm, int block_size, int datablock)
|
|
||||||
+{
|
|
||||||
+ ZSTD_CCtx *cctx = ZSTD_createCCtx();
|
|
||||||
+
|
|
||||||
+ if (!cctx) {
|
|
||||||
+ fprintf(stderr, "zstd: failed to allocate compression "
|
|
||||||
+ "context!\n");
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ *strm = cctx;
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int zstd_compress(void *strm, void *dest, void *src, int size,
|
|
||||||
+ int block_size, int *error)
|
|
||||||
+{
|
|
||||||
+ const size_t res = ZSTD_compressCCtx((ZSTD_CCtx*)strm, dest, block_size,
|
|
||||||
+ src, size, compression_level);
|
|
||||||
+
|
|
||||||
+ if (ZSTD_isError(res)) {
|
|
||||||
+ /* FIXME:
|
|
||||||
+ * zstd does not expose stable error codes. The error enum may
|
|
||||||
+ * change between versions. Until upstream zstd stablizes the
|
|
||||||
+ * error codes, we have no way of knowing why the error occurs.
|
|
||||||
+ * zstd shouldn't fail to compress any input unless there isn't
|
|
||||||
+ * enough output space. We assume that is the cause and return
|
|
||||||
+ * the special error code for not enough output space.
|
|
||||||
+ */
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return (int)res;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int zstd_uncompress(void *dest, void *src, int size, int outsize,
|
|
||||||
+ int *error)
|
|
||||||
+{
|
|
||||||
+ const size_t res = ZSTD_decompress(dest, outsize, src, size);
|
|
||||||
+
|
|
||||||
+ if (ZSTD_isError(res)) {
|
|
||||||
+ fprintf(stderr, "\t%d %d\n", outsize, size);
|
|
||||||
+
|
|
||||||
+ *error = (int)ZSTD_getErrorCode(res);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return (int)res;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void zstd_usage(void)
|
|
||||||
+{
|
|
||||||
+ fprintf(stderr, "\t -Xcompression-level <compression-level>\n");
|
|
||||||
+ fprintf(stderr, "\t\t<compression-level> should be 1 .. %d (default "
|
|
||||||
+ "%d)\n", ZSTD_maxCLevel(), ZSTD_DEFAULT_COMPRESSION_LEVEL);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+struct compressor zstd_comp_ops = {
|
|
||||||
+ .init = zstd_init,
|
|
||||||
+ .compress = zstd_compress,
|
|
||||||
+ .uncompress = zstd_uncompress,
|
|
||||||
+ .options = zstd_options,
|
|
||||||
+ .dump_options = zstd_dump_options,
|
|
||||||
+ .extract_options = zstd_extract_options,
|
|
||||||
+ .display_options = zstd_display_options,
|
|
||||||
+ .usage = zstd_usage,
|
|
||||||
+ .id = ZSTD_COMPRESSION,
|
|
||||||
+ .name = "zstd",
|
|
||||||
+ .supported = 1
|
|
||||||
+};
|
|
||||||
diff --git a/squashfs-tools/zstd_wrapper.h b/squashfs-tools/zstd_wrapper.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..4fbef0a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/squashfs-tools/zstd_wrapper.h
|
|
||||||
@@ -0,0 +1,48 @@
|
|
||||||
+#ifndef ZSTD_WRAPPER_H
|
|
||||||
+#define ZSTD_WRAPPER_H
|
|
||||||
+/*
|
|
||||||
+ * Squashfs
|
|
||||||
+ *
|
|
||||||
+ * Copyright (c) 2017
|
|
||||||
+ * Phillip Lougher <phillip@squashfs.org.uk>
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU General Public License
|
|
||||||
+ * as published by the Free Software Foundation; either version 2,
|
|
||||||
+ * or (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This program is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * zstd_wrapper.h
|
|
||||||
+ *
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef linux
|
|
||||||
+#define __BYTE_ORDER BYTE_ORDER
|
|
||||||
+#define __BIG_ENDIAN BIG_ENDIAN
|
|
||||||
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
|
||||||
+#else
|
|
||||||
+#include <endian.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
+extern unsigned int inswap_le16(unsigned short);
|
|
||||||
+extern unsigned int inswap_le32(unsigned int);
|
|
||||||
+
|
|
||||||
+#define SQUASHFS_INSWAP_COMP_OPTS(s) { \
|
|
||||||
+ (s)->compression_level = inswap_le32((s)->compression_level); \
|
|
||||||
+}
|
|
||||||
+#else
|
|
||||||
+#define SQUASHFS_INSWAP_COMP_OPTS(s)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/* Default compression */
|
|
||||||
+#define ZSTD_DEFAULT_COMPRESSION_LEVEL 15
|
|
||||||
+
|
|
||||||
+struct zstd_comp_opts {
|
|
||||||
+ int compression_level;
|
|
||||||
+};
|
|
||||||
+#endif
|
|
@ -1,85 +0,0 @@
|
|||||||
# Copyright 1999-2018 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=6
|
|
||||||
inherit flag-o-matic toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="Tool for creating compressed filesystem type squashfs"
|
|
||||||
HOMEPAGE="http://squashfs.sourceforge.net"
|
|
||||||
SRC_URI="
|
|
||||||
mirror://sourceforge/squashfs/squashfs${PV/_p*}.tar.gz
|
|
||||||
mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}-${PV/*_p}.debian.tar.xz
|
|
||||||
"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86"
|
|
||||||
IUSE="debug lz4 lzma lzo static xattr +xz zstd"
|
|
||||||
|
|
||||||
LIB_DEPEND="
|
|
||||||
sys-libs/zlib[static-libs(+)]
|
|
||||||
!xz? ( !lzo? ( sys-libs/zlib[static-libs(+)] ) )
|
|
||||||
lz4? ( app-arch/lz4[static-libs(+)] )
|
|
||||||
lzma? ( app-arch/xz-utils[static-libs(+)] )
|
|
||||||
lzo? ( dev-libs/lzo[static-libs(+)] )
|
|
||||||
xattr? ( sys-apps/attr[static-libs(+)] )
|
|
||||||
xz? ( app-arch/xz-utils[static-libs(+)] )
|
|
||||||
zstd? ( app-arch/zstd[static-libs(+)] )
|
|
||||||
"
|
|
||||||
RDEPEND="
|
|
||||||
!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
|
|
||||||
"
|
|
||||||
DEPEND="
|
|
||||||
${RDEPEND}
|
|
||||||
static? ( ${LIB_DEPEND} )
|
|
||||||
"
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${P/_p*}-sysmacros.patch
|
|
||||||
"${FILESDIR}"/${P/_p*}-aligned-data.patch
|
|
||||||
"${FILESDIR}"/${P/_p*}-local-cve-fix.patch
|
|
||||||
"${FILESDIR}"/${P/_p*}-mem-overflow.patch
|
|
||||||
"${FILESDIR}"/${P/_p*}-extmatch.patch
|
|
||||||
"${FILESDIR}"/${P/_p*}-musl.patch
|
|
||||||
"${FILESDIR}"/${P/_p*}-zstd.patch
|
|
||||||
)
|
|
||||||
|
|
||||||
S="${WORKDIR}/squashfs${PV/_p*}/${PN}"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
eapply -p2 "${WORKDIR}"/debian/patches/*.patch
|
|
||||||
eapply -p2 ${PATCHES[@]}
|
|
||||||
eapply_user
|
|
||||||
}
|
|
||||||
|
|
||||||
use10() { usex $1 1 0 ; }
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
# restore GNU89 inline semantics to
|
|
||||||
# emit function symbols, bug 595290
|
|
||||||
append-cflags -std=gnu89
|
|
||||||
|
|
||||||
# set up make command line variables in EMAKE_SQUASHFS_CONF
|
|
||||||
EMAKE_SQUASHFS_CONF=(
|
|
||||||
LZMA_XZ_SUPPORT=$(use10 lzma)
|
|
||||||
LZO_SUPPORT=$(use10 lzo)
|
|
||||||
LZ4_SUPPORT=$(use10 lz4)
|
|
||||||
XATTR_SUPPORT=$(use10 xattr)
|
|
||||||
XZ_SUPPORT=$(use10 xz)
|
|
||||||
ZSTD_SUPPORT=$(use10 zstd)
|
|
||||||
)
|
|
||||||
|
|
||||||
tc-export CC
|
|
||||||
use debug && append-cppflags -DSQUASHFS_TRACE
|
|
||||||
use static && append-ldflags -static
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake "${EMAKE_SQUASHFS_CONF[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dobin mksquashfs unsquashfs
|
|
||||||
cd ..
|
|
||||||
dodoc CHANGES PERFORMANCE.README pseudo-file.example README* OLD-READMEs/*
|
|
||||||
doman "${WORKDIR}"/debian/manpages/*.[0-9]
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
DIST xfsdump-dev-2019.5.20.tar.gz 584960 BLAKE2B a4cc3e5b75d7c39aafdf81b3d05ae35aca553e4f491ccdc6c5c6aa0953fc302b5e81cfea414c6097536252b5f8c72c33e26efe43df07c26428b3c4768ec3ddb6 SHA512 68f932d4664013c2ef7a28112b6a3f74e455d226a92977b3bb9ab4c58f8bdaec3d6c506fe271b9e8dd4df7b1b71e0a92de78e6a566f78d215f4059b36eb2c54c
|
|
@ -1,875 +0,0 @@
|
|||||||
From mboxrd@z Thu Jan 1 00:00:00 1970
|
|
||||||
Return-Path: <SRS0=kQBn=WQ=vger.kernel.org=linux-xfs-owner@kernel.org>
|
|
||||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
|
||||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
|
||||||
X-Spam-Level:
|
|
||||||
X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
|
|
||||||
INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,
|
|
||||||
UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0
|
|
||||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
|
||||||
by smtp.lore.kernel.org (Postfix) with ESMTP id EC877C3A589
|
|
||||||
for <linux-xfs@archiver.kernel.org>; Tue, 20 Aug 2019 20:21:33 +0000 (UTC)
|
|
||||||
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
|
|
||||||
by mail.kernel.org (Postfix) with ESMTP id ADDF322D6D
|
|
||||||
for <linux-xfs@archiver.kernel.org>; Tue, 20 Aug 2019 20:21:33 +0000 (UTC)
|
|
||||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
|
||||||
id S1729156AbfHTUVd (ORCPT <rfc822;linux-xfs@archiver.kernel.org>);
|
|
||||||
Tue, 20 Aug 2019 16:21:33 -0400
|
|
||||||
Received: from userp2130.oracle.com ([156.151.31.86]:33876 "EHLO
|
|
||||||
userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
|
||||||
with ESMTP id S1727358AbfHTUVd (ORCPT
|
|
||||||
<rfc822;linux-xfs@vger.kernel.org>); Tue, 20 Aug 2019 16:21:33 -0400
|
|
||||||
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
|
|
||||||
by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7KKJ3iU143537;
|
|
||||||
Tue, 20 Aug 2019 20:21:28 GMT
|
|
||||||
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
|
|
||||||
by userp2130.oracle.com with ESMTP id 2ue90th3qh-1
|
|
||||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
|
|
||||||
Tue, 20 Aug 2019 20:21:27 +0000
|
|
||||||
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
|
|
||||||
by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7KKIK3C043131;
|
|
||||||
Tue, 20 Aug 2019 20:21:27 GMT
|
|
||||||
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
|
|
||||||
by aserp3030.oracle.com with ESMTP id 2ugj7pn60v-1
|
|
||||||
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
|
|
||||||
Tue, 20 Aug 2019 20:21:26 +0000
|
|
||||||
Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25])
|
|
||||||
by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x7KKLPrW012599;
|
|
||||||
Tue, 20 Aug 2019 20:21:26 GMT
|
|
||||||
Received: from localhost (/67.169.218.210)
|
|
||||||
by default (Oracle Beehive Gateway v4.0)
|
|
||||||
with ESMTP ; Tue, 20 Aug 2019 13:21:25 -0700
|
|
||||||
Subject: [PATCH 1/1] common: remove old ioctl typedef usage
|
|
||||||
From: "Darrick J. Wong" <djwong@maple.djwong.org>
|
|
||||||
To: sandeen@sandeen.net, darrick.wong@oracle.com
|
|
||||||
Cc: linux-xfs@vger.kernel.org
|
|
||||||
Date: Tue, 20 Aug 2019 13:21:24 -0700
|
|
||||||
Message-ID: <156633248463.1207676.7759376831498692189.stgit@magnolia>
|
|
||||||
In-Reply-To: <156633247851.1207676.6729479783498588132.stgit@magnolia>
|
|
||||||
References: <156633247851.1207676.6729479783498588132.stgit@magnolia>
|
|
||||||
User-Agent: StGit/0.17.1-dirty
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset="utf-8"
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9355 signatures=668684
|
|
||||||
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0
|
|
||||||
phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999
|
|
||||||
adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
|
|
||||||
engine=8.0.1-1906280000 definitions=main-1908200181
|
|
||||||
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9355 signatures=668684
|
|
||||||
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0
|
|
||||||
suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1034
|
|
||||||
lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0
|
|
||||||
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000
|
|
||||||
definitions=main-1908200181
|
|
||||||
Sender: linux-xfs-owner@vger.kernel.org
|
|
||||||
Precedence: bulk
|
|
||||||
List-ID: <linux-xfs.vger.kernel.org>
|
|
||||||
X-Mailing-List: linux-xfs@vger.kernel.org
|
|
||||||
Archived-At: <https://lore.kernel.org/linux-xfs/156633248463.1207676.7759376831498692189.stgit@magnolia/>
|
|
||||||
List-Archive: <https://lore.kernel.org/linux-xfs/>
|
|
||||||
List-Post: <mailto:linux-xfs@vger.kernel.org>
|
|
||||||
|
|
||||||
From: Darrick J. Wong <darrick.wong@oracle.com>
|
|
||||||
|
|
||||||
Convert old xfs_foo_t typedef usage to struct xfs_foo to prepare for the
|
|
||||||
removal of old ioctl typedefs.
|
|
||||||
|
|
||||||
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
||||||
---
|
|
||||||
common/content_inode.h | 4 +--
|
|
||||||
common/fs.c | 2 +
|
|
||||||
common/hsmapi.c | 18 ++++++-----
|
|
||||||
common/hsmapi.h | 6 ++--
|
|
||||||
common/util.c | 30 +++++++++----------
|
|
||||||
common/util.h | 12 ++++----
|
|
||||||
doc/xfsdump.html | 6 ++--
|
|
||||||
dump/content.c | 76 ++++++++++++++++++++++++------------------------
|
|
||||||
dump/inomap.c | 48 +++++++++++++++---------------
|
|
||||||
9 files changed, 101 insertions(+), 101 deletions(-)
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/common/content_inode.h b/common/content_inode.h
|
|
||||||
index e1885fd..2106c75 100644
|
|
||||||
--- a/common/content_inode.h
|
|
||||||
+++ b/common/content_inode.h
|
|
||||||
@@ -150,8 +150,8 @@ typedef struct timestruct timestruct_t;
|
|
||||||
|
|
||||||
/* bstat_t - bulk stat structure
|
|
||||||
*
|
|
||||||
- * used in filehdr_t below. derived from xfs_bstat_t, to achieve independence
|
|
||||||
- * from changes to xfs_bstat_t.
|
|
||||||
+ * used in filehdr_t below. derived from struct xfs_bstat, to achieve independence
|
|
||||||
+ * from changes to struct xfs_bstat.
|
|
||||||
*/
|
|
||||||
#define BSTAT_SZ 128
|
|
||||||
#define MODE_SZ 4
|
|
||||||
diff --git a/common/fs.c b/common/fs.c
|
|
||||||
index a4c175c..ff8c75a 100644
|
|
||||||
--- a/common/fs.c
|
|
||||||
+++ b/common/fs.c
|
|
||||||
@@ -204,7 +204,7 @@ fs_mounted(char *typs, char *chrs, char *mnts, uuid_t *idp)
|
|
||||||
int
|
|
||||||
fs_getid(char *mnts, uuid_t *idb)
|
|
||||||
{
|
|
||||||
- xfs_fsop_geom_v1_t geo;
|
|
||||||
+ struct xfs_fsop_geom_v1 geo;
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
fd = open(mnts, O_RDONLY);
|
|
||||||
diff --git a/common/hsmapi.c b/common/hsmapi.c
|
|
||||||
index e3e18a7..14e6c83 100644
|
|
||||||
--- a/common/hsmapi.c
|
|
||||||
+++ b/common/hsmapi.c
|
|
||||||
@@ -108,7 +108,7 @@ typedef struct {
|
|
||||||
#define DM_EVENT_TRUNCATE 18
|
|
||||||
#define DM_EVENT_DESTROY 20
|
|
||||||
|
|
||||||
- /* Interesting bit combinations within the bs_dmevmask field of xfs_bstat_t:
|
|
||||||
+ /* Interesting bit combinations within the bs_dmevmask field of struct xfs_bstat:
|
|
||||||
* OFL, UNM, and PAR files have exactly these bits set.
|
|
||||||
* DUL and MIG files have all but the DM_EVENT_READ bit set */
|
|
||||||
#define DMF_EV_BITS ((1<<DM_EVENT_DESTROY) | \
|
|
||||||
@@ -270,7 +270,7 @@ extern int
|
|
||||||
HsmEstimateFileSpace(
|
|
||||||
hsm_fs_ctxt_t *fscontextp,
|
|
||||||
hsm_f_ctxt_t *fcontextp,
|
|
||||||
-const xfs_bstat_t *statp,
|
|
||||||
+const struct xfs_bstat *statp,
|
|
||||||
off64_t *bytes,
|
|
||||||
int accurate)
|
|
||||||
{
|
|
||||||
@@ -353,7 +353,7 @@ const xfs_bstat_t *statp,
|
|
||||||
extern int
|
|
||||||
HsmEstimateFileOffset(
|
|
||||||
hsm_fs_ctxt_t *contextp,
|
|
||||||
-const xfs_bstat_t *statp,
|
|
||||||
+const struct xfs_bstat *statp,
|
|
||||||
off64_t bytecount,
|
|
||||||
off64_t *byteoffset)
|
|
||||||
{
|
|
||||||
@@ -458,7 +458,7 @@ HsmDeleteFileContext(
|
|
||||||
extern int
|
|
||||||
HsmInitFileContext(
|
|
||||||
hsm_f_ctxt_t *contextp,
|
|
||||||
-const xfs_bstat_t *statp)
|
|
||||||
+const struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
dmf_f_ctxt_t *dmf_f_ctxtp = (dmf_f_ctxt_t *)contextp;
|
|
||||||
XFSattrvalue0_t *dmfattrp;
|
|
||||||
@@ -492,7 +492,7 @@ const xfs_bstat_t *statp)
|
|
||||||
attr_op.am_flags = ATTR_ROOT;
|
|
||||||
|
|
||||||
error = jdm_attr_multi(dmf_f_ctxtp->fsys.fshanp,
|
|
||||||
- (xfs_bstat_t *)statp,
|
|
||||||
+ (struct xfs_bstat *)statp,
|
|
||||||
(char *)&attr_op,
|
|
||||||
1,
|
|
||||||
0);
|
|
||||||
@@ -538,22 +538,22 @@ const xfs_bstat_t *statp)
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* Name
|
|
||||||
-* HsmModifyInode - modify a xfs_bstat_t to make a file appear offline
|
|
||||||
+* HsmModifyInode - modify a struct xfs_bstat to make a file appear offline
|
|
||||||
*
|
|
||||||
* Description
|
|
||||||
* HsmModifyInode uses the context provided by a previous
|
|
||||||
-* HsmInitFileContext call to determine how to modify a xfs_bstat_t
|
|
||||||
+* HsmInitFileContext call to determine how to modify a struct xfs_bstat
|
|
||||||
* structure to make a dual-residency HSM file appear to be offline.
|
|
||||||
*
|
|
||||||
* Returns
|
|
||||||
-* != 0, xfs_bstat_t structure was modified.
|
|
||||||
+* != 0, struct xfs_bstat structure was modified.
|
|
||||||
* == 0, if something is wrong with the file and it should not be dumped.
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
extern int
|
|
||||||
HsmModifyInode(
|
|
||||||
hsm_f_ctxt_t *contextp,
|
|
||||||
- xfs_bstat_t *statp)
|
|
||||||
+ struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
dmf_f_ctxt_t *dmf_f_ctxtp = (dmf_f_ctxt_t *)contextp;
|
|
||||||
|
|
||||||
diff --git a/common/hsmapi.h b/common/hsmapi.h
|
|
||||||
index 63933af..4b88c16 100644
|
|
||||||
--- a/common/hsmapi.h
|
|
||||||
+++ b/common/hsmapi.h
|
|
||||||
@@ -186,15 +186,15 @@ const struct xfs_bstat *statp);
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* Name
|
|
||||||
-* HsmModifyInode - modify a xfs_bstat_t to make a file appear offline
|
|
||||||
+* HsmModifyInode - modify a struct xfs_bstat to make a file appear offline
|
|
||||||
*
|
|
||||||
* Description
|
|
||||||
* HsmModifyInode uses the context provided by a previous
|
|
||||||
-* HsmInitFileContext call to determine how to modify a xfs_bstat_t
|
|
||||||
+* HsmInitFileContext call to determine how to modify a struct xfs_bstat
|
|
||||||
* structure to make a dual-residency HSM file appear to be offline.
|
|
||||||
*
|
|
||||||
* Returns
|
|
||||||
-* != 0, xfs_bstat_t structure was modified.
|
|
||||||
+* != 0, struct xfs_bstat structure was modified.
|
|
||||||
* == 0, if something is wrong with the file and it should not be dumped.
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
diff --git a/common/util.c b/common/util.c
|
|
||||||
index 05a5cb8..bcd7db9 100644
|
|
||||||
--- a/common/util.c
|
|
||||||
+++ b/common/util.c
|
|
||||||
@@ -125,14 +125,14 @@ bigstat_iter(jdm_fshandle_t *fshandlep,
|
|
||||||
void * seek_arg1,
|
|
||||||
int *statp,
|
|
||||||
bool_t (pfp)(int),
|
|
||||||
- xfs_bstat_t *buf,
|
|
||||||
+ struct xfs_bstat *buf,
|
|
||||||
size_t buflenin)
|
|
||||||
{
|
|
||||||
__s32 buflenout;
|
|
||||||
xfs_ino_t lastino;
|
|
||||||
int saved_errno;
|
|
||||||
int bulkstatcnt;
|
|
||||||
- xfs_fsop_bulkreq_t bulkreq;
|
|
||||||
+ struct xfs_fsop_bulkreq bulkreq;
|
|
||||||
|
|
||||||
/* stat set with return from callback func
|
|
||||||
*/
|
|
||||||
@@ -162,8 +162,8 @@ bigstat_iter(jdm_fshandle_t *fshandlep,
|
|
||||||
bulkreq.ubuffer = buf;
|
|
||||||
bulkreq.ocount = &buflenout;
|
|
||||||
while (!ioctl(fsfd, XFS_IOC_FSBULKSTAT, &bulkreq)) {
|
|
||||||
- xfs_bstat_t *p;
|
|
||||||
- xfs_bstat_t *endp;
|
|
||||||
+ struct xfs_bstat *p;
|
|
||||||
+ struct xfs_bstat *endp;
|
|
||||||
|
|
||||||
if (buflenout == 0) {
|
|
||||||
mlog(MLOG_NITTY + 1,
|
|
||||||
@@ -254,9 +254,9 @@ bigstat_iter(jdm_fshandle_t *fshandlep,
|
|
||||||
int
|
|
||||||
bigstat_one(int fsfd,
|
|
||||||
xfs_ino_t ino,
|
|
||||||
- xfs_bstat_t *statp)
|
|
||||||
+ struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
- xfs_fsop_bulkreq_t bulkreq;
|
|
||||||
+ struct xfs_fsop_bulkreq bulkreq;
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
assert(ino > 0);
|
|
||||||
@@ -274,23 +274,23 @@ int
|
|
||||||
inogrp_iter(int fsfd,
|
|
||||||
int (*fp)(void *arg1,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_inogrp_t *inogrp),
|
|
||||||
+ struct xfs_inogrp *inogrp),
|
|
||||||
void * arg1,
|
|
||||||
int *statp)
|
|
||||||
{
|
|
||||||
xfs_ino_t lastino;
|
|
||||||
int inogrpcnt;
|
|
||||||
- xfs_inogrp_t *igrp;
|
|
||||||
- xfs_fsop_bulkreq_t bulkreq;
|
|
||||||
+ struct xfs_inogrp *igrp;
|
|
||||||
+ struct xfs_fsop_bulkreq bulkreq;
|
|
||||||
|
|
||||||
/* stat set with return from callback func */
|
|
||||||
*statp = 0;
|
|
||||||
|
|
||||||
- igrp = malloc(INOGRPLEN * sizeof(xfs_inogrp_t));
|
|
||||||
+ igrp = malloc(INOGRPLEN * sizeof(struct xfs_inogrp));
|
|
||||||
if (!igrp) {
|
|
||||||
mlog(MLOG_NORMAL | MLOG_ERROR,
|
|
||||||
_("malloc of stream context failed (%d bytes): %s\n"),
|
|
||||||
- INOGRPLEN * sizeof(xfs_inogrp_t),
|
|
||||||
+ INOGRPLEN * sizeof(struct xfs_inogrp),
|
|
||||||
strerror(errno));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
@@ -302,7 +302,7 @@ inogrp_iter(int fsfd,
|
|
||||||
bulkreq.ubuffer = igrp;
|
|
||||||
bulkreq.ocount = &inogrpcnt;
|
|
||||||
while (!ioctl(fsfd, XFS_IOC_FSINUMBERS, &bulkreq)) {
|
|
||||||
- xfs_inogrp_t *p, *endp;
|
|
||||||
+ struct xfs_inogrp *p, *endp;
|
|
||||||
|
|
||||||
if (inogrpcnt == 0) {
|
|
||||||
free(igrp);
|
|
||||||
@@ -339,11 +339,11 @@ inogrp_iter(int fsfd,
|
|
||||||
int
|
|
||||||
diriter(jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
int (*cbfp)(void *arg1,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
char *namep),
|
|
||||||
void *arg1,
|
|
||||||
int *cbrvalp,
|
|
||||||
@@ -428,7 +428,7 @@ diriter(jdm_fshandle_t *fshandlep,
|
|
||||||
assert(nread >= 0),
|
|
||||||
p = (struct dirent *)((char *)p + reclen),
|
|
||||||
reclen = (size_t)p->d_reclen) {
|
|
||||||
- xfs_bstat_t statbuf;
|
|
||||||
+ struct xfs_bstat statbuf;
|
|
||||||
assert(scrval == 0);
|
|
||||||
assert(cbrval == 0);
|
|
||||||
|
|
||||||
diff --git a/common/util.h b/common/util.h
|
|
||||||
index 9e8bb6f..a7692e0 100644
|
|
||||||
--- a/common/util.h
|
|
||||||
+++ b/common/util.h
|
|
||||||
@@ -87,7 +87,7 @@ extern char *strncpyterm(char *s1, char *s2, size_t n);
|
|
||||||
typedef int (*bstat_cbfp_t)(void *arg1,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp);
|
|
||||||
+ struct xfs_bstat *statp);
|
|
||||||
|
|
||||||
typedef xfs_ino_t (*bstat_seekfp_t)(void *arg1,
|
|
||||||
xfs_ino_t lastino);
|
|
||||||
@@ -102,17 +102,17 @@ extern int bigstat_iter(jdm_fshandle_t *fshandlep,
|
|
||||||
void * seek_arg1,
|
|
||||||
int *statp,
|
|
||||||
bool_t (pfp)(int), /* preemption chk func */
|
|
||||||
- xfs_bstat_t *buf,
|
|
||||||
+ struct xfs_bstat *buf,
|
|
||||||
size_t buflen);
|
|
||||||
|
|
||||||
extern int bigstat_one(int fsfd,
|
|
||||||
xfs_ino_t ino,
|
|
||||||
- xfs_bstat_t *statp);
|
|
||||||
+ struct xfs_bstat *statp);
|
|
||||||
|
|
||||||
extern int inogrp_iter(int fsfd,
|
|
||||||
int (*fp)(void *arg1,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_inogrp_t *inogrp),
|
|
||||||
+ struct xfs_inogrp *inogrp),
|
|
||||||
void * arg1,
|
|
||||||
int *statp);
|
|
||||||
|
|
||||||
@@ -131,11 +131,11 @@ extern int inogrp_iter(int fsfd,
|
|
||||||
*/
|
|
||||||
extern int diriter(jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
int (*cbfp)(void *arg1,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
char *namep),
|
|
||||||
void *arg1,
|
|
||||||
int *cbrvalp,
|
|
||||||
diff --git a/doc/xfsdump.html b/doc/xfsdump.html
|
|
||||||
index 8cc02d4..6aa09f0 100644
|
|
||||||
--- a/doc/xfsdump.html
|
|
||||||
+++ b/doc/xfsdump.html
|
|
||||||
@@ -513,9 +513,9 @@ create inode-ranges for multi-stream dumps if pertinent.
|
|
||||||
- bigstat_init on cb_add()
|
|
||||||
- loops doing bulkstats (using syssgi() or ioctl())
|
|
||||||
until system call returns non-zero value
|
|
||||||
- - each bulkstat returns a buffer of xfs_bstat_t records
|
|
||||||
+ - each bulkstat returns a buffer of struct xfs_bstat records
|
|
||||||
(buffer of size bulkreq.ocount)
|
|
||||||
- - loop thru each xfs_bstat_t record for an inode
|
|
||||||
+ - loop thru each struct xfs_bstat record for an inode
|
|
||||||
calling cb_add()
|
|
||||||
* cb_add
|
|
||||||
- looks at latest mtime|ctime and
|
|
||||||
@@ -629,7 +629,7 @@ create inode-ranges for multi-stream dumps if pertinent.
|
|
||||||
* dump_filehdr()
|
|
||||||
- write out 256 padded file header
|
|
||||||
- header = <offset, flags, checksum, 128-byte bulk stat structure >
|
|
||||||
- - bulkstat struct derived from xfs_bstat_t
|
|
||||||
+ - bulkstat struct derived from struct xfs_bstat
|
|
||||||
- stnd. stat stuff + extent size, #of extents, DMI stuff
|
|
||||||
- if HSM context then
|
|
||||||
- modify bstat struct to make it offline
|
|
||||||
diff --git a/dump/content.c b/dump/content.c
|
|
||||||
index d9a53d1..98aa226 100644
|
|
||||||
--- a/dump/content.c
|
|
||||||
+++ b/dump/content.c
|
|
||||||
@@ -262,30 +262,30 @@ extern size_t pgsz;
|
|
||||||
/* file dumpers
|
|
||||||
*/
|
|
||||||
static rv_t dump_dirs(ix_t strmix,
|
|
||||||
- xfs_bstat_t *bstatbufp,
|
|
||||||
+ struct xfs_bstat *bstatbufp,
|
|
||||||
size_t bstatbuflen,
|
|
||||||
void *inomap_contextp);
|
|
||||||
static rv_t dump_dir(ix_t strmix,
|
|
||||||
jdm_fshandle_t *,
|
|
||||||
int,
|
|
||||||
- xfs_bstat_t *);
|
|
||||||
+ struct xfs_bstat *);
|
|
||||||
static rv_t dump_file(void *,
|
|
||||||
jdm_fshandle_t *,
|
|
||||||
int,
|
|
||||||
- xfs_bstat_t *);
|
|
||||||
+ struct xfs_bstat *);
|
|
||||||
static rv_t dump_file_reg(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
content_inode_hdr_t *scwhdrp,
|
|
||||||
jdm_fshandle_t *,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
bool_t *);
|
|
||||||
static rv_t dump_file_spec(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
jdm_fshandle_t *,
|
|
||||||
- xfs_bstat_t *);
|
|
||||||
+ struct xfs_bstat *);
|
|
||||||
static rv_t dump_filehdr(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
off64_t,
|
|
||||||
int);
|
|
||||||
static rv_t dump_extenthdr(drive_t *drivep,
|
|
||||||
@@ -296,18 +296,18 @@ static rv_t dump_extenthdr(drive_t *drivep,
|
|
||||||
off64_t);
|
|
||||||
static rv_t dump_dirent(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
xfs_ino_t,
|
|
||||||
gen_t,
|
|
||||||
char *,
|
|
||||||
size_t);
|
|
||||||
static rv_t init_extent_group_context(jdm_fshandle_t *,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
extent_group_context_t *);
|
|
||||||
static void cleanup_extent_group_context(extent_group_context_t *);
|
|
||||||
static rv_t dump_extent_group(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
extent_group_context_t *,
|
|
||||||
off64_t,
|
|
||||||
off64_t,
|
|
||||||
@@ -352,15 +352,15 @@ static bool_t check_complete_flags(void);
|
|
||||||
static rv_t dump_extattrs(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
- xfs_bstat_t *statp);
|
|
||||||
+ struct xfs_bstat *statp);
|
|
||||||
static rv_t dump_extattr_list(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
attrlist_t *listp,
|
|
||||||
int flag,
|
|
||||||
bool_t *abortprp);
|
|
||||||
-static char *dump_extattr_buildrecord(xfs_bstat_t *statp,
|
|
||||||
+static char *dump_extattr_buildrecord(struct xfs_bstat *statp,
|
|
||||||
char *dumpbufp,
|
|
||||||
char *dumpbufendp,
|
|
||||||
char *namesrcp,
|
|
||||||
@@ -369,7 +369,7 @@ static char *dump_extattr_buildrecord(xfs_bstat_t *statp,
|
|
||||||
char **valuepp);
|
|
||||||
static rv_t dump_extattrhdr(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
size_t recsz,
|
|
||||||
size_t valoff,
|
|
||||||
ix_t flags,
|
|
||||||
@@ -432,7 +432,7 @@ static jdm_fshandle_t *sc_fshandlep = 0;
|
|
||||||
static int sc_fsfd = -1;
|
|
||||||
/* open file descriptor for root directory
|
|
||||||
*/
|
|
||||||
-static xfs_bstat_t *sc_rootxfsstatp = 0;
|
|
||||||
+static struct xfs_bstat *sc_rootxfsstatp = 0;
|
|
||||||
/* pointer to loaded bulkstat for root directory
|
|
||||||
*/
|
|
||||||
static startpt_t *sc_startptp = 0;
|
|
||||||
@@ -1382,7 +1382,7 @@ content_init(int argc,
|
|
||||||
}
|
|
||||||
|
|
||||||
/* figure out the ino for the root directory of the fs
|
|
||||||
- * and get its xfs_bstat_t for inomap_build(). This could
|
|
||||||
+ * and get its struct xfs_bstat for inomap_build(). This could
|
|
||||||
* be a bind mount; don't ask for the mount point inode,
|
|
||||||
* find the actual lowest inode number in the filesystem.
|
|
||||||
*/
|
|
||||||
@@ -1390,7 +1390,7 @@ content_init(int argc,
|
|
||||||
stat64_t rootstat;
|
|
||||||
xfs_ino_t lastino = 0;
|
|
||||||
int ocount = 0;
|
|
||||||
- xfs_fsop_bulkreq_t bulkreq;
|
|
||||||
+ struct xfs_fsop_bulkreq bulkreq;
|
|
||||||
|
|
||||||
/* Get the inode of the mount point */
|
|
||||||
rval = fstat64(sc_fsfd, &rootstat);
|
|
||||||
@@ -1401,7 +1401,7 @@ content_init(int argc,
|
|
||||||
return BOOL_FALSE;
|
|
||||||
}
|
|
||||||
sc_rootxfsstatp =
|
|
||||||
- (xfs_bstat_t *)calloc(1, sizeof(xfs_bstat_t));
|
|
||||||
+ (struct xfs_bstat *)calloc(1, sizeof(struct xfs_bstat));
|
|
||||||
assert(sc_rootxfsstatp);
|
|
||||||
|
|
||||||
/* Get the first valid (i.e. root) inode in this fs */
|
|
||||||
@@ -2119,7 +2119,7 @@ content_stream_dump(ix_t strmix)
|
|
||||||
bool_t empty_mediafile;
|
|
||||||
time_t elapsed;
|
|
||||||
inv_stmtoken_t inv_stmt;
|
|
||||||
- xfs_bstat_t *bstatbufp;
|
|
||||||
+ struct xfs_bstat *bstatbufp;
|
|
||||||
const size_t bstatbuflen = BSTATBUFLEN;
|
|
||||||
int rval;
|
|
||||||
rv_t rv;
|
|
||||||
@@ -2130,8 +2130,8 @@ content_stream_dump(ix_t strmix)
|
|
||||||
|
|
||||||
/* allocate a buffer for use by bstat_iter
|
|
||||||
*/
|
|
||||||
- bstatbufp = (xfs_bstat_t *)calloc(bstatbuflen,
|
|
||||||
- sizeof(xfs_bstat_t));
|
|
||||||
+ bstatbufp = (struct xfs_bstat *)calloc(bstatbuflen,
|
|
||||||
+ sizeof(struct xfs_bstat));
|
|
||||||
assert(bstatbufp);
|
|
||||||
|
|
||||||
/* allocate an inomap context */
|
|
||||||
@@ -2806,13 +2806,13 @@ update_cc_Media_useterminatorpr(drive_t *drivep, context_t *contextp)
|
|
||||||
|
|
||||||
static rv_t
|
|
||||||
dump_dirs(ix_t strmix,
|
|
||||||
- xfs_bstat_t *bstatbufp,
|
|
||||||
+ struct xfs_bstat *bstatbufp,
|
|
||||||
size_t bstatbuflen,
|
|
||||||
void *inomap_contextp)
|
|
||||||
{
|
|
||||||
xfs_ino_t lastino;
|
|
||||||
size_t bulkstatcallcnt;
|
|
||||||
- xfs_fsop_bulkreq_t bulkreq;
|
|
||||||
+ struct xfs_fsop_bulkreq bulkreq;
|
|
||||||
|
|
||||||
inomap_reset_context(inomap_contextp);
|
|
||||||
|
|
||||||
@@ -2820,8 +2820,8 @@ dump_dirs(ix_t strmix,
|
|
||||||
*/
|
|
||||||
lastino = 0;
|
|
||||||
for (bulkstatcallcnt = 0 ; ; bulkstatcallcnt++) {
|
|
||||||
- xfs_bstat_t *p;
|
|
||||||
- xfs_bstat_t *endp;
|
|
||||||
+ struct xfs_bstat *p;
|
|
||||||
+ struct xfs_bstat *endp;
|
|
||||||
__s32 buflenout;
|
|
||||||
int rval;
|
|
||||||
|
|
||||||
@@ -2928,7 +2928,7 @@ static rv_t
|
|
||||||
dump_dir(ix_t strmix,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp)
|
|
||||||
+ struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
context_t *contextp = &sc_contextp[strmix];
|
|
||||||
drive_t *drivep = drivepp[strmix];
|
|
||||||
@@ -3110,7 +3110,7 @@ dump_dir(ix_t strmix,
|
|
||||||
* if it's not there, we have to get it the slow way.
|
|
||||||
*/
|
|
||||||
if (inomap_get_gen(NULL, p->d_ino, &gen)) {
|
|
||||||
- xfs_bstat_t statbuf;
|
|
||||||
+ struct xfs_bstat statbuf;
|
|
||||||
int scrval;
|
|
||||||
|
|
||||||
scrval = bigstat_one(fsfd,
|
|
||||||
@@ -3169,7 +3169,7 @@ static rv_t
|
|
||||||
dump_extattrs(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
- xfs_bstat_t *statp)
|
|
||||||
+ struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
ix_t pass;
|
|
||||||
int flag;
|
|
||||||
@@ -3269,7 +3269,7 @@ static rv_t
|
|
||||||
dump_extattr_list(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
attrlist_t *listp,
|
|
||||||
int flag,
|
|
||||||
bool_t *abortprp)
|
|
||||||
@@ -3572,7 +3572,7 @@ dump_extattr_list(drive_t *drivep,
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *
|
|
||||||
-dump_extattr_buildrecord(xfs_bstat_t *statp,
|
|
||||||
+dump_extattr_buildrecord(struct xfs_bstat *statp,
|
|
||||||
char *dumpbufp,
|
|
||||||
char *dumpbufendp,
|
|
||||||
char *namesrcp,
|
|
||||||
@@ -3655,7 +3655,7 @@ dump_extattr_buildrecord(xfs_bstat_t *statp,
|
|
||||||
static rv_t
|
|
||||||
dump_extattrhdr(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
size_t recsz,
|
|
||||||
size_t valoff,
|
|
||||||
ix_t flags,
|
|
||||||
@@ -3712,7 +3712,7 @@ static rv_t
|
|
||||||
dump_file(void *arg1,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp)
|
|
||||||
+ struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
ix_t strmix = (ix_t)arg1;
|
|
||||||
context_t *contextp = &sc_contextp[strmix];
|
|
||||||
@@ -3942,7 +3942,7 @@ dump_file_reg(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
content_inode_hdr_t *scwhdrp,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
bool_t *file_skippedp)
|
|
||||||
{
|
|
||||||
startpt_t *startptp = &scwhdrp->cih_startpt;
|
|
||||||
@@ -4163,7 +4163,7 @@ static rv_t
|
|
||||||
dump_file_spec(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
- xfs_bstat_t *statp)
|
|
||||||
+ struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
int rval;
|
|
||||||
rv_t rv;
|
|
||||||
@@ -4277,7 +4277,7 @@ dump_file_spec(drive_t *drivep,
|
|
||||||
*/
|
|
||||||
static rv_t
|
|
||||||
init_extent_group_context(jdm_fshandle_t *fshandlep,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
extent_group_context_t *gcp)
|
|
||||||
{
|
|
||||||
bool_t isrealtime;
|
|
||||||
@@ -4340,7 +4340,7 @@ cleanup_extent_group_context(extent_group_context_t *gcp)
|
|
||||||
static rv_t
|
|
||||||
dump_extent_group(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
extent_group_context_t *gcp,
|
|
||||||
off64_t maxcnt,
|
|
||||||
off64_t stopoffset,
|
|
||||||
@@ -4932,7 +4932,7 @@ dump_extent_group(drive_t *drivep,
|
|
||||||
|
|
||||||
/* Note: assumes the pad fields in dst have been zeroed. */
|
|
||||||
static void
|
|
||||||
-copy_xfs_bstat(bstat_t *dst, xfs_bstat_t *src)
|
|
||||||
+copy_xfs_bstat(bstat_t *dst, struct xfs_bstat *src)
|
|
||||||
{
|
|
||||||
dst->bs_ino = src->bs_ino;
|
|
||||||
dst->bs_mode = src->bs_mode;
|
|
||||||
@@ -4963,7 +4963,7 @@ copy_xfs_bstat(bstat_t *dst, xfs_bstat_t *src)
|
|
||||||
static rv_t
|
|
||||||
dump_filehdr(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
off64_t offset,
|
|
||||||
int flags)
|
|
||||||
{
|
|
||||||
@@ -5086,7 +5086,7 @@ dump_extenthdr(drive_t *drivep,
|
|
||||||
static rv_t
|
|
||||||
dump_dirent(drive_t *drivep,
|
|
||||||
context_t *contextp,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
xfs_ino_t ino,
|
|
||||||
gen_t gen,
|
|
||||||
char *name,
|
|
||||||
diff --git a/dump/inomap.c b/dump/inomap.c
|
|
||||||
index 86d6072..85f76df 100644
|
|
||||||
--- a/dump/inomap.c
|
|
||||||
+++ b/dump/inomap.c
|
|
||||||
@@ -79,9 +79,9 @@ static int cb_context(bool_t last,
|
|
||||||
bool_t,
|
|
||||||
bool_t *);
|
|
||||||
static void cb_context_free(void);
|
|
||||||
-static int cb_count_inogrp(void *, int, xfs_inogrp_t *);
|
|
||||||
-static int cb_add_inogrp(void *, int, xfs_inogrp_t *);
|
|
||||||
-static int cb_add(void *, jdm_fshandle_t *, int, xfs_bstat_t *);
|
|
||||||
+static int cb_count_inogrp(void *, int, struct xfs_inogrp *);
|
|
||||||
+static int cb_add_inogrp(void *, int, struct xfs_inogrp *);
|
|
||||||
+static int cb_add(void *, jdm_fshandle_t *, int, struct xfs_bstat *);
|
|
||||||
static bool_t cb_inoinresumerange(xfs_ino_t);
|
|
||||||
static bool_t cb_inoresumed(xfs_ino_t);
|
|
||||||
static void cb_accuminit_sz(void);
|
|
||||||
@@ -89,14 +89,14 @@ static void cb_spinit(void);
|
|
||||||
static int cb_startpt(void *,
|
|
||||||
jdm_fshandle_t *,
|
|
||||||
int,
|
|
||||||
- xfs_bstat_t *);
|
|
||||||
+ struct xfs_bstat *);
|
|
||||||
static int supprt_prune(void *,
|
|
||||||
jdm_fshandle_t *,
|
|
||||||
int,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
char *);
|
|
||||||
-static off64_t quantity2offset(jdm_fshandle_t *, xfs_bstat_t *, off64_t);
|
|
||||||
-static off64_t estimate_dump_space(xfs_bstat_t *);
|
|
||||||
+static off64_t quantity2offset(jdm_fshandle_t *, struct xfs_bstat *, off64_t);
|
|
||||||
+static off64_t estimate_dump_space(struct xfs_bstat *);
|
|
||||||
|
|
||||||
/* inomap primitives
|
|
||||||
*/
|
|
||||||
@@ -110,16 +110,16 @@ static void inomap_set_gen(void *, xfs_ino_t, gen_t);
|
|
||||||
static int subtree_descend_cb(void *,
|
|
||||||
jdm_fshandle_t *,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
char *);
|
|
||||||
static int subtreelist_parse_cb(void *,
|
|
||||||
jdm_fshandle_t *,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
char *);
|
|
||||||
static int subtreelist_parse(jdm_fshandle_t *,
|
|
||||||
int,
|
|
||||||
- xfs_bstat_t *,
|
|
||||||
+ struct xfs_bstat *,
|
|
||||||
char *[],
|
|
||||||
ix_t);
|
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ static uint64_t inomap_exclude_skipattr = 0;
|
|
||||||
bool_t
|
|
||||||
inomap_build(jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *rootstatp,
|
|
||||||
+ struct xfs_bstat *rootstatp,
|
|
||||||
bool_t last,
|
|
||||||
time32_t lasttime,
|
|
||||||
bool_t resume,
|
|
||||||
@@ -161,7 +161,7 @@ inomap_build(jdm_fshandle_t *fshandlep,
|
|
||||||
size64_t statcnt,
|
|
||||||
size64_t *statdonep)
|
|
||||||
{
|
|
||||||
- xfs_bstat_t *bstatbufp;
|
|
||||||
+ struct xfs_bstat *bstatbufp;
|
|
||||||
size_t bstatbuflen;
|
|
||||||
bool_t pruneneeded = BOOL_FALSE;
|
|
||||||
int igrpcnt = 0;
|
|
||||||
@@ -185,10 +185,10 @@ inomap_build(jdm_fshandle_t *fshandlep,
|
|
||||||
/* allocate a bulkstat buf
|
|
||||||
*/
|
|
||||||
bstatbuflen = BSTATBUFLEN;
|
|
||||||
- bstatbufp = (xfs_bstat_t *)memalign(pgsz,
|
|
||||||
+ bstatbufp = (struct xfs_bstat *)memalign(pgsz,
|
|
||||||
bstatbuflen
|
|
||||||
*
|
|
||||||
- sizeof(xfs_bstat_t));
|
|
||||||
+ sizeof(struct xfs_bstat));
|
|
||||||
assert(bstatbufp);
|
|
||||||
|
|
||||||
/* count the number of inode groups, which will serve as a
|
|
||||||
@@ -488,7 +488,7 @@ cb_context_free(void)
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
-cb_count_inogrp(void *arg1, int fsfd, xfs_inogrp_t *inogrp)
|
|
||||||
+cb_count_inogrp(void *arg1, int fsfd, struct xfs_inogrp *inogrp)
|
|
||||||
{
|
|
||||||
int *count = (int *)arg1;
|
|
||||||
(*count)++;
|
|
||||||
@@ -505,7 +505,7 @@ static int
|
|
||||||
cb_add(void *arg1,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp)
|
|
||||||
+ struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
register time32_t mtime = statp->bs_mtime.tv_sec;
|
|
||||||
register time32_t ctime = statp->bs_ctime.tv_sec;
|
|
||||||
@@ -691,7 +691,7 @@ static bool_t /* false, used as diriter callback */
|
|
||||||
supprt_prune(void *arg1, /* ancestors marked as changed? */
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
char *name)
|
|
||||||
{
|
|
||||||
static bool_t cbrval = BOOL_FALSE;
|
|
||||||
@@ -812,7 +812,7 @@ static int
|
|
||||||
cb_startpt(void *arg1,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp)
|
|
||||||
+ struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
register int state;
|
|
||||||
|
|
||||||
@@ -1116,7 +1116,7 @@ inomap_lastseg(int hnkoff)
|
|
||||||
* order. adds a new segment to the inomap and ino-to-gen map.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
-cb_add_inogrp(void *arg1, int fsfd, xfs_inogrp_t *inogrp)
|
|
||||||
+cb_add_inogrp(void *arg1, int fsfd, struct xfs_inogrp *inogrp)
|
|
||||||
{
|
|
||||||
hnk_t *hunk;
|
|
||||||
seg_t *segp;
|
|
||||||
@@ -1472,7 +1472,7 @@ inomap_dump(drive_t *drivep)
|
|
||||||
static int
|
|
||||||
subtreelist_parse(jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *rootstatp,
|
|
||||||
+ struct xfs_bstat *rootstatp,
|
|
||||||
char *subtreebuf[],
|
|
||||||
ix_t subtreecnt)
|
|
||||||
{
|
|
||||||
@@ -1513,7 +1513,7 @@ static int
|
|
||||||
subtreelist_parse_cb(void *arg1,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
char *name)
|
|
||||||
{
|
|
||||||
int cbrval = 0;
|
|
||||||
@@ -1596,7 +1596,7 @@ static int
|
|
||||||
subtree_descend_cb(void *arg1,
|
|
||||||
jdm_fshandle_t *fshandlep,
|
|
||||||
int fsfd,
|
|
||||||
- xfs_bstat_t *statp,
|
|
||||||
+ struct xfs_bstat *statp,
|
|
||||||
char *name)
|
|
||||||
{
|
|
||||||
int cbrval = 0;
|
|
||||||
@@ -1624,7 +1624,7 @@ subtree_descend_cb(void *arg1,
|
|
||||||
#define BMAP_LEN 512
|
|
||||||
|
|
||||||
static off64_t
|
|
||||||
-quantity2offset(jdm_fshandle_t *fshandlep, xfs_bstat_t *statp, off64_t qty)
|
|
||||||
+quantity2offset(jdm_fshandle_t *fshandlep, struct xfs_bstat *statp, off64_t qty)
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
getbmapx_t bmap[BMAP_LEN];
|
|
||||||
@@ -1699,7 +1699,7 @@ quantity2offset(jdm_fshandle_t *fshandlep, xfs_bstat_t *statp, off64_t qty)
|
|
||||||
|
|
||||||
|
|
||||||
static off64_t
|
|
||||||
-estimate_dump_space(xfs_bstat_t *statp)
|
|
||||||
+estimate_dump_space(struct xfs_bstat *statp)
|
|
||||||
{
|
|
||||||
switch (statp->bs_mode & S_IFMT) {
|
|
||||||
case S_IFREG:
|
|
||||||
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
From 5b370c97462836b29facdfd8cd533d153c9f360e Mon Sep 17 00:00:00 2001
|
|
||||||
From: jiblime <47689567+jiblime@users.noreply.github.com>
|
|
||||||
Date: Tue, 5 Nov 2019 06:53:37 -0800
|
|
||||||
Subject: [PATCH] xfsdump-3.0.4-no-symlink refresh
|
|
||||||
http://web.archive.org/web/20160324213842/http://oss.sgi.com/bugzilla/show_bug.cgi?id=876
|
|
||||||
https://bugs.gentoo.org/311881
|
|
||||||
|
|
||||||
---
|
|
||||||
dump/Makefile | 4 +---
|
|
||||||
restore/Makefile | 4 +---
|
|
||||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dump/Makefile b/dump/Makefile
|
|
||||||
index 66f00d3..d8daa19 100644
|
|
||||||
--- a/dump/Makefile
|
|
||||||
+++ b/dump/Makefile
|
|
||||||
@@ -100,9 +100,7 @@ install: default
|
|
||||||
$(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
|
|
||||||
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
|
|
||||||
$(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
|
|
||||||
- # skip symlink when /sbin is alread symlinked to /usr/sbin, like on Fedora
|
|
||||||
- test $(PKG_ROOT_SBIN_DIR) -ef $(PKG_SBIN_DIR) || \
|
|
||||||
- $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
|
|
||||||
+
|
|
||||||
install-dev:
|
|
||||||
|
|
||||||
.dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
|
|
||||||
diff --git a/restore/Makefile b/restore/Makefile
|
|
||||||
index ac3f8c8..40da38a 100644
|
|
||||||
--- a/restore/Makefile
|
|
||||||
+++ b/restore/Makefile
|
|
||||||
@@ -114,9 +114,7 @@ install: default
|
|
||||||
$(INSTALL) -m 755 -d $(PKG_ROOT_SBIN_DIR)
|
|
||||||
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_ROOT_SBIN_DIR)
|
|
||||||
$(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
|
|
||||||
- # skip symlink when /sbin is alread symlinked to /usr/sbin, like on Fedora
|
|
||||||
- test $(PKG_ROOT_SBIN_DIR) -ef $(PKG_SBIN_DIR) || \
|
|
||||||
- $(INSTALL) -S $(PKG_ROOT_SBIN_DIR)/$(LTCOMMAND) $(PKG_SBIN_DIR)/$(LTCOMMAND)
|
|
||||||
+
|
|
||||||
install-dev:
|
|
||||||
|
|
||||||
.dep: $(COMMINCL) $(COMMON) $(INVINCL) $(INVCOMMON)
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From 9c07f7f654a16c96f49716b9073432826729f59a Mon Sep 17 00:00:00 2001
|
|
||||||
From: jiblime <47689567+jiblime@users.noreply.github.com>
|
|
||||||
Date: Tue, 5 Nov 2019 06:56:57 -0800
|
|
||||||
Subject: [PATCH] xfsdump-3.0.5-prompt-overflow refresh
|
|
||||||
http://web.archive.org/web/20160324213842/http://oss.sgi.com/bugzilla/show_bug.cgi?id=876
|
|
||||||
https://bugs.gentoo.org/335115
|
|
||||||
|
|
||||||
---
|
|
||||||
dump/content.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/dump/content.c b/dump/content.c
|
|
||||||
index f710fe4..2cfcd5f 100644
|
|
||||||
--- a/dump/content.c
|
|
||||||
+++ b/dump/content.c
|
|
||||||
@@ -6338,7 +6338,7 @@ static bool_t
|
|
||||||
Media_prompt_erase(drive_t *drivep)
|
|
||||||
{
|
|
||||||
fold_t fold;
|
|
||||||
- char question[100];
|
|
||||||
+ char question[200];
|
|
||||||
char *preamblestr[PREAMBLEMAX];
|
|
||||||
size_t preamblecnt;
|
|
||||||
char *querystr[QUERYMAX];
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From e12813b9d0883e02cc121ea503f4bff5fb67e9ef Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mike Frysinger <vapier@gentoo.org>
|
|
||||||
Date: Fri, 8 Apr 2016 16:41:31 -0400
|
|
||||||
Subject: [PATCH xfsdump] po: respect LINGUAS build setting
|
|
||||||
|
|
||||||
It is common gettext practice to limit the translations a particular
|
|
||||||
package will include by setting the LINGUAS environment variable.
|
|
||||||
|
|
||||||
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
||||||
---
|
|
||||||
po/Makefile | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/po/Makefile b/po/Makefile
|
|
||||||
index 6d40324..48a19c1 100644
|
|
||||||
--- a/po/Makefile
|
|
||||||
+++ b/po/Makefile
|
|
||||||
@@ -6,7 +6,10 @@ TOPDIR = ..
|
|
||||||
include $(TOPDIR)/include/builddefs
|
|
||||||
|
|
||||||
POTHEAD = $(PKG_NAME).pot
|
|
||||||
-LINGUAS = de pl
|
|
||||||
+# If the user has requested a specific set of translations, only build those.
|
|
||||||
+SUPPORTED_LINGUAS = $(patsubst %.po,%,$(wildcard *.po))
|
|
||||||
+LINGUAS ?= $(SUPPORTED_LINGUAS)
|
|
||||||
+LINGUAS := $(filter $(SUPPORTED_LINGUAS),$(LINGUAS))
|
|
||||||
LSRCFILES = $(LINGUAS:%=%.po)
|
|
||||||
LDIRT = $(POTHEAD)
|
|
||||||
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
|||||||
# Copyright 1999-2019 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
inherit multilib flag-o-matic toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="xfs dump/restore utilities"
|
|
||||||
HOMEPAGE="https://xfs.wiki.kernel.org/"
|
|
||||||
SRC_URI="https://git.kernel.org/pub/scm/fs/xfs/xfsdump-dev.git/snapshot/xfsdump-dev-1b1ecdaa215bbd44b21947ad4f12a2f4d3e0c975.tar.gz
|
|
||||||
-> xfsdump-dev-2019.5.20.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2.1"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 x86"
|
|
||||||
IUSE="ncurses nls"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
>=sys-apps/attr-2.4.19
|
|
||||||
sys-apps/dmapi
|
|
||||||
sys-apps/util-linux
|
|
||||||
sys-fs/e2fsprogs
|
|
||||||
>=sys-fs/xfsprogs-5.3.0
|
|
||||||
ncurses? ( sys-libs/ncurses:0= )
|
|
||||||
"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
nls? (
|
|
||||||
sys-devel/gettext
|
|
||||||
elibc_uclibc? ( dev-libs/libintl )
|
|
||||||
)"
|
|
||||||
|
|
||||||
S="${WORKDIR}/xfsdump-dev-1b1ecdaa215bbd44b21947ad4f12a2f4d3e0c975"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-2019.5.20-prompt-overflow.patch #335115
|
|
||||||
"${FILESDIR}"/${PN}-2019.5.20-no-symlink.patch #311881
|
|
||||||
"${FILESDIR}"/${PN}-3.1.6-linguas.patch #561664
|
|
||||||
"${FILESDIR}"/${PN}-2019.5.20-compat-with-xfsprogs-5.3.0-and-up.patch # 693296
|
|
||||||
)
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
make configure
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
|
|
||||||
include/builddefs.in \
|
|
||||||
|| die
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "s:enable_curses=[a-z]*:enable_curses=$(usex ncurses):" \
|
|
||||||
-e "s:libcurses=\"[^\"]*\":libcurses='$(use ncurses && $(tc-getPKG_CONFIG) --libs ncurses)':" \
|
|
||||||
configure || die #605852
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
unset PLATFORM #184564
|
|
||||||
export OPTIMIZER=${CFLAGS}
|
|
||||||
export DEBUG=-DNDEBUG
|
|
||||||
|
|
||||||
local myeconfargs=(
|
|
||||||
$(use_enable nls gettext)
|
|
||||||
--libdir="${EPREFIX}/$(get_libdir)"
|
|
||||||
--libexecdir="${EPREFIX}/usr/$(get_libdir)"
|
|
||||||
--sbindir="${EPREFIX}/sbin"
|
|
||||||
)
|
|
||||||
econf "${myeconfargs[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# enable verbose build
|
|
||||||
emake V=1
|
|
||||||
}
|
|
Loading…
Reference in new issue