File tree 2 files changed +45
-1
lines changed
2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change
1
+ From aa03d274ab27214a3c42ed7c2306744a65c5154c Mon Sep 17 00:00:00 2001
2
+ From: Sparks Song <
[email protected] >
3
+ Date: Mon, 3 Feb 2025 22:40:33 +0000
4
+ Subject: [PATCH] mkfs: source defaults from config file to make nrext64
5
+ default off on multiple kernel versions
6
+
7
+ ---
8
+ mkfs/xfs_mkfs.c | 11 +++++++++++
9
+ 1 file changed, 11 insertions(+)
10
+
11
+ diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
12
+ index 6d2469c..b360efc 100644
13
+ --- a/mkfs/xfs_mkfs.c
14
+ +++ b/mkfs/xfs_mkfs.c
15
+ @@ -39,6 +39,9 @@
16
+ */
17
+ #define WHACK_SIZE (128 * 1024)
18
+
19
+ + /* Default path for the mkfs.xfs configuration file */
20
+ + #define DEFAULT_CONFIG_PATH "/usr/share/xfs/mkfs.xfs.conf"
21
+ +
22
+ /*
23
+ * XXX: The configured block and sector sizes are defined as global variables so
24
+ * that they don't need to be passed to getnum/cvtnum().
25
+ @@ -4428,6 +4431,14 @@ main(
26
+ * the options from this file parsed, we can then proceed with parameter
27
+ * and bounds checking and making the filesystem.
28
+ */
29
+ +
30
+ + if (cli.cfgfile == NULL) {
31
+ + struct stat defcfg_statbuf;
32
+ + if (stat(DEFAULT_CONFIG_PATH, &defcfg_statbuf) == 0) {
33
+ + cli.cfgfile = DEFAULT_CONFIG_PATH;
34
+ + }
35
+ + }
36
+ +
37
+ cfgfile_parse(&cli);
38
+
39
+ protostring = setup_proto(cli.protofile);
40
+ - -
41
+ 2.47.0
42
+
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Source0: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-%{version}.t
8
8
Source1: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-%{version }.tar.sign
9
9
Source2: gpgkey-0C1D891C50A732E0680F7B644675A111E50B5FA6.asc
10
10
11
+ Patch1000: 0001-mkfs-source-defaults-from-config-file.patch
12
+
11
13
BuildRequires: %{_cross_os }glibc-devel
12
14
BuildRequires: %{_cross_os }libuuid-devel
13
15
BuildRequires: %{_cross_os }libinih-devel
@@ -29,7 +31,7 @@ Requires: %{name}
29
31
30
32
%prep
31
33
%{gpgverify } --data=<( xzcat %{S:0}) --signature=%{S:1 } --keyring=%{S:2 }
32
- %autosetup -n xfsprogs-%{version }
34
+ %autosetup -n xfsprogs-%{version } -p1
33
35
34
36
%build
35
37
%cross_configure \
You can’t perform that action at this time.
0 commit comments