Sync from SUSE:ALP:Source:Standard:1.0 jfsutils revision 1e19ca2a780264db25df45861aa2a798

This commit is contained in:
Adrian Schröter 2023-11-27 11:57:29 +01:00
commit cd2a553c7b
13 changed files with 1326 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

12
jfs-headers.patch Normal file
View File

@ -0,0 +1,12 @@
Index: jfsutils-1.1.15/libfs/devices.h
===================================================================
--- jfsutils-1.1.15.orig/libfs/devices.h
+++ jfsutils-1.1.15/libfs/devices.h
@@ -42,6 +42,7 @@
struct stat;
+#include <stdint.h>
int ujfs_get_dev_size(FILE *, int64_t * size);
int ujfs_rw_diskblocks(FILE *, int64_t, int32_t, void *, int32_t);
int ujfs_flush_dev(FILE *);

BIN
jfs.pdf (Stored with Git LFS) Normal file

Binary file not shown.

42
jfs.txt Normal file
View File

@ -0,0 +1,42 @@
IBM's Journaled File System (JFS) for Linux
JFS Homepage: http://oss.software.ibm.com/jfs/
Team members
------------
Steve Best sbest@us.ibm.com
Dave Kleikamp shaggy@austin.ibm.com
Barry Arndt barndt@us.ibm.com
Christoph Hellwig hch@infradead.org
The following mount options are supported:
iocharset=name Character set to use for converting from Unicode to
ASCII. The default is compiled into the kernel as
CONFIG_NLS_DEFAULT. Use iocharset=utf8 for UTF8
translations. This requires CONFIG_NLS_UTF8 to be set
in the kernel .config file.
resize=value Resize the volume to <value> blocks. JFS only supports
growing a volume, not shrinking it. This option is only
valid during a remount, when the volume is mounted
read-write. The resize keyword with no value will grow
the volume to the full size of the partition.
JFS TODO list:
Plans for our near term development items
- get access control list functionality operational
- get extended attributes functionality operational
Longer term work items
- implement defrag utility, for online defragmenting
- add quota support
- add support for block sizes (512,1024,2048)
Please send bugs, comments, cards and letters to linuxjfs@us.ibm.com.
The JFS mailing list can be subscribed to by using the link labeled
"Mail list Subscribe" at our web page http://oss.software.ibm.com/jfs/.

BIN
jfslayout.pdf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
jfslog.pdf (Stored with Git LFS) Normal file

Binary file not shown.

211
jfsroot.html Normal file
View File

@ -0,0 +1,211 @@
<html>
<head>
<title>JFS Root Boot HOWTO</title>
</head>
<body bgcolor="#FFFFFF">
<center><h1>JFS Root Boot HOWTO</h1></center>
Paul Larson <A HREF="mailto:plars@austin.ibm.com">plars@austin.ibm.com</A><br>
v1.0, May 22, 2001 - Copyright &copy; International Business Machines Corp., 2001
<hr>
1. <A HREF="jfsroot.html#1">Introduction</A><br>
2. <A HREF="jfsroot.html#2">Assumptions/Prerequisites</A><br>
3. <A HREF="jfsroot.html#3">Converting an ext2 based system to JFS</A>
<li>3.1 <A HREF="jfsroot.html#3.1">Build the kernel with JFS support</A>
<li>3.2 <A HREF="jfsroot.html#3.2">Create the JFS filesystem</A>
<li>3.3 <A HREF="jfsroot.html#3.3">Copy the root filesystem</A>
<li>3.4 <A HREF="jfsroot.html#3.4">Final setup</A>
<li>3.5 <A HREF="jfsroot.html#3.5">Reboot</A>
<A NAME="1">
<h3>1. Introduction:</h3>
This HOWTO describes a method for converting an ext2 filesystem based
Linux system to one running entirely on IBM's Journaled File System (JFS).
For further information about JFS and to download the latest version of
JFS, please visit the JFS for Linux web site at
<A HREF="http://oss.software.ibm.com/developerworks/opensource/jfs/">http://oss.software.ibm.com/developerworks/opensource/jfs/</A>.
<A NAME="2">
<h3>2. Assumptions/Prerequisites:</h3>
Before we get started, there are two assumptions that will be made in
this document:
<li>You must already have Linux installed and running
<li>You must have an empty partition, partitioned as type 83 (Linux).
It doesn't matter if this partition is formatted or not, but we'll be
reformatting it as JFS so be prepared to lose anything you might already
have on it.
<p>
The examples in this document assume that you just have one big partition
for your root filesystem and don't have separate mounts for /home, /usr,
etc. It's ok if you do have separate partitions for those, but you'll
need to have enough free space to copy those to the new jfs partition,
and modify the /etc/fstab file to remove them or change the mount points as
necessary. Finally, my root filesystem is on /dev/hda5 and the new
partition that I'm going to format as JFS is /dev/hda6. This is system
specific though, so you'll need to substitute the right partitions from
your system.
<p>Something else to consider is that we will need to patch and recompile
the kernel to add support for JFS. This isn't hard to do, but if you've
never recompiled a kernel before, this probably shouldn't be your first
experience with it.
<A NAME="3">
<h3>3. Converting an ext2 based system to JFS</h3>
No commercial Linux distributions have picked up JFS yet, as it is still
in beta. Hopefully soon, building a pure JFS system will be as easy as
selecting to format your partitions as JFS when you install your
favorite Linux distribution, but for now this procedure is the easiest
way to create a system running on JFS.
<p>
The following sections describe the steps necessary to build a JFS root
filesystem and boot from it.
<A NAME="3.1">
<h3>3.1 Build the kernel with JFS support</h3>
Download the latest 2.4.x kernel from <A HREF="ftp://ftp.kernel.org">ftp.kernel.org</A>,
and the latest jfs-x.y.z-patch.tar.gz from the
<A HREF="http://oss.software.ibm.com/developerworks/opensource/jfs">JFS for Linux</A>
web site to /tmp. Extract them into separate subdirectories. Change
directory into the base directory of the kernel source and patch the kernel.
<pre>
#cd /usr/src
#rm linux
#tar -xvzf /tmp/linux-2.4.3.tar.gz
#mv linux linux-2.4.3
#ln -s linux-2.4.3 linux
#mkdir jfs
#cd jfs
#tar -xvzf /tmp/jfs-0.3.1-patch.tar.gz
#cd /usr/src/linux
#patch -p1 < ../jfs/jfs-2.4.0-v0.3.1-patch
#patch -p1 < ../jfs/jfs-common-v0.3.1-patch
</pre>
Configure the kernel using make config, make menuconfig, or make xconfig
(whichever you prefer). In the section labeled "Code maturity level
options", turn on the item that says "Prompt for development and/or
incomplete code/drivers." In the section labeled "File systems" turn on
the option for "JFS filesystem support." Make sure to turn on JFS support
so that it is compiled into the kernel, NOT as a module. Configure the
rest of the kernel as needed for your system. Build the kernel with a
<tt>make dep; make clean; make bzImage</tt> and if necessary,
<tt>make modules; make modules_install</tt>. Then, copy the new kernel into /boot.
<pre>
#make dep
#make clean
#make bzImage
#cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.0-jfs
</pre>
Now we need to build the JFS utilities. These are the tools for formatting
a JFS filesystem, checking it for errors, extending the size, and more.
<pre>
#cd fs/jfs/utils
#make
#make install
</pre>
Next, we need to add an entry for LILO so that we can boot with our new
kernel that can use a JFS filesystem.
Edit /etc/lilo.conf and add an entry for the new kernel similar to this:
<pre>
image=/boot/vmlinuz-2.4.0-jfs
label=jfsboot
read-only
root=/dev/hda5
</pre>
Run <tt>/sbin/lilo</tt> to to activate the new configuration and reboot
into the new kernel.
<A NAME="3.2">
<h3>3.2 Create the JFS filesystem</h3>
Now that we have JFS support in the kernel, it's time to format our
empty partition as JFS.
<pre>
#mkfs -t jfs /dev/hda6
mkfs.jfs development version: $Name: v0_3_1 $
Warning! All data on device /dev/hda6 will be lost!
Continue? (Y/N) y
\
Format completed successfully.
5120608 kilobytes total disk space.
</pre>
<A NAME="3.3">
<h3>3.3 Copy the root filesystem</h3>
This is an easy step and requires very little work on your part, but it
will take the most time to complete. First, unmount any NFS, SMB, or
cdroms that are mounted. Create a mount point for the new
JFS partition and mount it. There are a few things to remember before we
start copying files. Don't copy /proc over, but do create a mount point
for it after you are done. If you didn't or couldn't unmount some of your
NFS mounts or cdroms, remember to skip them when you do the copy. Copy
everything else using <tt>cp -a</tt>.
<pre>
#mkdir /jfsvol
#mount -t jfs /dev/hda6 /jfsvol
#cd /
#cp -a bin etc lib boot dev home usr var [...] /jfsvol
#mkdir /jfsvol/proc
</pre>
<A NAME="3.4">
<h3>3.4 Final setup</h3>
Before we reboot into our new root partition, there are a just a couple of
final things that need to be done. First, we need to change the /etc/fstab
entry for the root partition, but you need to be certain to change the
right one. Remember that the fstab file we want to work with is the one
under /jfsvol/etc. So edit this file, and look for the line describing
the root partition. Mine looks like this:
<pre>
LABEL=/ / ext2 defaults 1 1
</pre>
We want to change that to say:
<pre>
/dev/hda6 / jfs defaults 1 1
</pre>
You can now unmount /jfsvol.
Edit /etc/lilo.conf to point to the new root partition. I'm
paranoid, so I like to just copy and paste the one I already have for the
jfs kernel and modify the root= line to point to the new partition.
You'll also need to give it a new label. The new section on my system
looks like this:
<pre>
default=jfsboot2
...
image=/boot/vmlinuz-2.4.0-jfs
label=jfsboot2
read-only
root=/dev/hda6
</pre>
Make sure that you run 'lilo' again before you reboot.
<A NAME="3.5">
<h3>3.5 Reboot</h3>
Congratulations! If you followed these steps, your system is now
running completely on JFS. To verify this, type <tt>mount</tt> and you
should see output similar to this:
<pre>
/dev/hda6 on / type jfs (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
</pre>
Assuming everything works well, and you don't want or need to go back to
your old system, the old root partition can now be reformatted as JFS and
turned into a /home mount, or anything else you want.
</body>
</html>

BIN
jfsutils-1.1.15.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

473
jfsutils.changes Normal file
View File

@ -0,0 +1,473 @@
-------------------------------------------------------------------
Tue May 17 16:37:58 UTC 2022 - Dirk Müller <dmueller@suse.com>
- add jfsutils_format-security_ftbs.patch
-------------------------------------------------------------------
Mon Oct 11 11:59:23 UTC 2021 - David Disseldorp <ddiss@suse.com>
- UsrMerge: don't override _sbindir (bsc#1191065)
-------------------------------------------------------------------
Wed Apr 29 13:46:30 UTC 2020 - Martin Liška <mliska@suse.cz>
- Added patch: libfs-Fixing-issue-with-variable-name-collision.patch
- Remove not needed -fcommon.
-------------------------------------------------------------------
Mon Apr 27 19:21:25 UTC 2020 - Martin Liška <mliska@suse.cz>
- Enable -fcommon in order to fix boo#1160272.
-------------------------------------------------------------------
Wed Aug 1 13:25:53 UTC 2018 - schwab@suse.de
- sysmacros.patch: include <sys/sysmacros.h> for major
-------------------------------------------------------------------
Wed Mar 18 12:18:59 UTC 2015 - mpluskal@suse.com
- Cleanup spec file with spec-cleaner
- Use url for source
-------------------------------------------------------------------
Fri Nov 16 19:22:02 UTC 2012 - aj@suse.de
- Fix missing include (patch jfs-headers.patch).
-------------------------------------------------------------------
Sat May 26 12:41:22 UTC 2012 - jengelh@inai.de
- Remove redundant tags/sections from specfile
- Parallel build with %_smp_mflags
-------------------------------------------------------------------
Sun Jun 19 10:34:30 UTC 2011 - per@opensuse.org
- update to version 1.1.15
* Several fixes for large filesystems where 64-bit variables are needed
* Fix incorrect size check on directories
* Make the timestamp format consistent
- spec: add sed-script to fix warnings wrt formatting of man-pages
-------------------------------------------------------------------
Thu Nov 12 18:55:10 CST 2009 - jnelson-suse@jamponi.net
- update to version 1.1.14
* Fix journal replay to handle records that span 3 pages
* Increase the maximum inline journal size from 32 MB to 128 MB
* Don't call ioctl(BLKFLSBUF) on a ramdisk. It wipes out everything.
* Fix fsck abort
- changes in 1.1.13
* Rewrite a confusing error messages
* Improve sanity checking when replaying the journal
* Work around _LARGEFILE_SOURCE not getting defined by autoconf
* Remove unhelpful allocation debug messages
-------------------------------------------------------------------
Mon Jun 30 11:17:13 CEST 2008 - mkoenig@suse.de
- update to version 1.1.12
* Allow -n flag to be passed to jfs_fsck in conjuction with
-f, -a, or -p
* Look for external journal in /proc/mdstat in case of raid
- remove patches
jfsutils-1.1.8-missingdecl.diff
jfsutils-1.1.11-open_fix.patch
-------------------------------------------------------------------
Mon Nov 26 15:21:08 CET 2007 - mkoenig@suse.de
- fix build: missing third argument for open
-------------------------------------------------------------------
Wed Apr 4 12:47:42 CEST 2007 - mkoenig@suse.de
- add Supplements line [FATE#301966]
-------------------------------------------------------------------
Mon Jul 10 17:53:46 CEST 2006 - mskibbe@suse.de
- update to version 1.1.11 which
o includes patches
jfsutils-1.1.10-missingreturn.diff
jfsutils-1.1.10-use_gnu_basename.patch
o Add compiler flags to generate useful warnings
o Eliminate compiler warnings
o Fix segfault in markImap
o Fix buffer overflow
o clean up
-------------------------------------------------------------------
Mon May 22 16:41:56 CEST 2006 - hvogel@suse.de
- define fsck_message.c to be _GNU_SOURCE so we get the declaration
for basename from string.h. Fixes a segfault on s390x [#177131]
-------------------------------------------------------------------
Wed Jan 25 21:37:02 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Wed Jan 11 16:38:51 CET 2006 - mmj@suse.de
- dirty_index_page is void not int [#141064]
-------------------------------------------------------------------
Wed Oct 19 23:43:58 CEST 2005 - mmj@suse.de
- Update to 1.1.10:
o More stdio cleanup
o fsck was not recognizing the root filesystem as jfs
-------------------------------------------------------------------
Wed Oct 5 12:36:43 CEST 2005 - mmj@suse.de
- Update to 1.1.9:
o Add support for Dragonfly BSD. Change to use stream I/O.
o Reduce memory usage in fsck by removing structure members and
code relating to OS/2 DASD limits.
o Fix stack buffer overflow in Is_Device_Mounted
-------------------------------------------------------------------
Wed Jul 6 12:32:18 CEST 2005 - mmj@suse.de
- Fix missing decls
-------------------------------------------------------------------
Wed May 4 10:15:53 CEST 2005 - mmj@suse.de
- Update to 1.1.8:
o fsck should not bail out if reserved (but unused) inode 1 is bad
o code cleanup - remove unused variables, eliminate compiler warnings
o Added blocks parameter to jfs_mkfs to specify file system size
o Ensure that data gets flushed to disk
o Fix bug in replaying journal that corrupted inodes
o Update directory index table when moving directory entries
o Use O_DIRECT when checking for bad blocks (jfs_mkfs -c)
-------------------------------------------------------------------
Wed Aug 11 14:37:04 CEST 2004 - mmj@suse.de
- Update to 1.1.7:
o --replay_journal_only shouldn't clear FM_DIRTY
o Ensure changes to disk occur in proper order
o Message corrections
o Directory Index Table corrections for big-endian systems
-------------------------------------------------------------------
Thu Apr 29 08:43:48 CEST 2004 - mmj@suse.de
- Update to 1.1.6 which contains the function for fsck to verify
and fix the directory inode tables [#39627]
-------------------------------------------------------------------
Fri Apr 16 09:50:25 CEST 2004 - mmj@suse.de
- Compile with -fno-strict-aliasing
-------------------------------------------------------------------
Mon Mar 8 10:40:40 CET 2004 - mmj@suse.de
- Update to 1.1.5:
o Fix problem creating entries in lost+found
o Fix buffer overflow
o Fix replaying of symlink journal records
o Improve performance of duplicate block checking
o Fix segfault when printing an errant message
o Don't open volume with O_EXCL unless it's necessary
o Support sharing of journal between multiple volumes
-------------------------------------------------------------------
Fri Oct 31 14:17:33 CET 2003 - mmj@suse.de
- Update to 1.1.4:
o Work around gcc 2.95 bug
o Handle log full without crashing
o Message format fix
-------------------------------------------------------------------
Thu Oct 16 13:09:47 CEST 2003 - mmj@suse.de
- Don't build as root.
- Update to 1.1.3 including:
o jfs_fsck can now find external journal on evms release 2 volumes
o code cleanup: fsck messaging is much cleaner
o Don't right-justify when printing volume label
o jfs_fsck should return zero when replaying the journal is successful
o jfs_fsck should not require that the device is opened with O_EXCL
- A recent change to the 2.6.0 kernel makes O_EXCL fail when the
volume is mounted, even if read-only
-------------------------------------------------------------------
Wed Mar 26 10:47:34 CET 2003 - mmj@suse.de
- Update to 1.1.2:
o fix undefined reference to errno
o allow jfs_mkfs to run on regular file
o fix for-loop going past last element of vopen array
o sanity checking on variable this_ag
o s_label displayed incorrectly when 16 chars long
-------------------------------------------------------------------
Fri Jan 10 10:44:16 CET 2003 - mmj@suse.de
- Update to 1.1.1:
o fix segmentation fault in mkfs.jfs when given bad block device
o fix jfs_debugfs to display directory index with directory entries
-------------------------------------------------------------------
Fri Nov 29 13:29:02 CET 2002 - mmj@suse.de
- Add missing #include <errno.h>
-------------------------------------------------------------------
Wed Nov 20 21:58:06 CET 2002 - mmj@suse.de
- Update to 1.1.0, which renames all tools to be prepended with
jfs_, except mkfs and fsck
-------------------------------------------------------------------
Sun Oct 20 10:17:55 CEST 2002 - mmj@suse.de
- Update to 1.0.24
o byte-swapping fixes for big-endian hardware [#21085] [#19487]
-------------------------------------------------------------------
Fri Sep 27 21:37:56 CEST 2002 - mmj@suse.de
- update to 1.0.23
o print fsck.jfs start timestamp correctly in fsck.jfs log
o allow xchklog to run on a JFS file system with an external journal
o initialize program name in logdump properly
o code cleanup
-------------------------------------------------------------------
Thu Sep 19 11:37:45 CEST 2002 - mmj@suse.de
- update to 1.0.22
o correctly store a volume label in superblock s_label
o pass external journal volume label
o better portability
o external journal fixes
-------------------------------------------------------------------
Mon Aug 12 21:02:56 MEST 2002 - bk@suse.de
- update to 1.0.21
o add external log support to xpeek
o fix fsck.jfs to update log device number in superblock after
logredo with external log.
o do not build currently unused defrag, extendfs utilities
o add logsuper functions to libfs
o fix printf format specifiers. (Christoph Hellwig)
o update JFS FSIM for EVMS
-------------------------------------------------------------------
Mon Jul 8 17:50:18 CEST 2002 - bk@suse.de
- update to 1.0.20
o don't display heartbeat during log format if output is redirected
o enhance jfsutils to support enormous disks like 8TB+ (Peter C.)
o set version in JFS superblock properly if external log is used
-------------------------------------------------------------------
Wed Jun 5 14:47:36 CEST 2002 - ro@suse.de
- added e2fsprogs-devel to neededforbuild
(needed for uuid.h)
-------------------------------------------------------------------
Wed Jun 5 12:32:33 CEST 2002 - bk@suse.de
- update to 1.0.18
o add support for external log
o endian code cleanup
o fix typo in fsck.jfs help
o fix fsck.jfs bug on big endian machines
-------------------------------------------------------------------
Tue Apr 9 12:41:59 CEST 2002 - bk@suse.de
- update to 1.0.17
o more rigorous dtree validation in fsck.jfs
o fix fsck.jfs to write to the fsck.jfs log properly on big endian machines
o fix xchklog to read the fsck.jfs log properly on big endian machines
o fix xpeek to display/modify PXD information properly on big endian machines
o replace fsck.jfs heartbeat with alarm() based heartbeat (Christoph Hellwig)
o improve mkfs.jfs and fsck.jfs parameter parsing and usage alerts
o messaging code cleanup, logredo code cleanup, general code cleanup (all)
-------------------------------------------------------------------
Wed Mar 20 22:51:01 CET 2002 - bk@suse.de
- update to 1.0.16
o make fsck.jfs exit codes conform to fsck (see updated fsck.jfs man page)
o display/log fsck.jfs exit code in debug exit msg
o fix xchkdmp to print logredo messages
o make xchkdmp print message text instead of message number
o use PBSIZE for physical block size instead of BLKSSZGET ioctl
(eliminates MD error msg "used obsolete MD ioctl", fixes S/390 mkfs.jfs)
o remove libfs open/close wrappers (Christoph Hellwig)
o messaging code cleanup, general code cleanup (all)
-------------------------------------------------------------------
Mon Feb 18 10:55:55 CET 2002 - grimmer@suse.de
- update to 1.0.15:
o eliminate invalid fsck.jfs internal error 10
o update xpeek and fsck.jfs man pages
o better error message if device to be fsck.jfs'ed is not jfs
o add support for 4.4 BSD-style getmntinfo
o include sys/types.h for BSD
o use defacto standard autoconf macro for large file support
o general jfsutils code cleanup
-------------------------------------------------------------------
Wed Jan 30 10:59:27 CET 2002 - grimmer@suse.de
- renamed package from jfsprogs to jfsutils to be compliant with
upstream source and added Provides: and Obsoletes: tags
- update to 1.0.14:
o fix typecast problem causing fsck.jfs 'corrupt superblock'
error message
o remove old types PVOID, UCHAR, USHORT, ULONG (code cleanup)
- bzipped sources
-------------------------------------------------------------------
Tue Jan 22 09:21:37 CET 2002 - grimmer@suse.de
- update to 1.0.12:
o autoheader must precede automake
o use current date as release date in jfs utils
o fix fsck to update maps at auto check time
o fix file system utilities to be more portable
-------------------------------------------------------------------
Wed Dec 19 14:26:22 CET 2001 - grimmer@suse.de
- update to 1.0.11 which fixes the following bugs:
o Convert JFS utilities to use autoconf/automake
o Display correct error messages for disk not accessible
o Have all utilities print version number
o Convert JFS utilities to use autoconf/automake
- fixed file list and spec file to build with automake
- man_html has been removed
-------------------------------------------------------------------
Sat Dec 1 18:42:07 CET 2001 - grimmer@suse.de
- update to 1.0.10 which fixes the following bug:
o fsck shouldn't endian swap dtree struct twice
-------------------------------------------------------------------
Sat Nov 10 00:22:10 CET 2001 - bk@suse.de
- update to 1.0.9 which fixes the following bugs:
o don't print heartbeat if fsck.jfs output is redirected
o make mkfs.jfs options conform to mkfs, clean up parse code
o fix typo in mkfs.jfs man_html page
o allow xpeek to show us directory xtrees
o fix fsck.jfs infinite loop on big endian hardware
(jitterbug 182)
-------------------------------------------------------------------
Wed Oct 17 19:04:41 CEST 2001 - mantel@suse.de
- updated to 1.0.8 which fixes the following bugs:
o cleanup option handling (make -y behave, -f override -p)
o Add more informative error message when running fsck.jfs RO
o clean up remove carriage return after new line in messaging
o print mkfs.jfs version correctly
o Synclist was being built backwards causing logredo to quit
too early
-------------------------------------------------------------------
Thu Oct 11 09:34:50 CEST 2001 - grimmer@suse.de
- Update to 1.0.7 which fixes the following bugs:
o improve fsck's 'mounted' detection (this will remove the fsck
message 'Cannot access file system description file to determine
mount status and file system type of /dev/device name') [#11309]
o improve utils' checking for fs type jfs
o replace __uX with uintX_t - (Thanks Fred Oberhauser)
o change fsck.jfs options to be similar to e2fsck
o set fsck.jfs default to automatically fix the file system
- removed uintX_t_for__uX.patch since it has been integrated into
the official sources now
-------------------------------------------------------------------
Tue Oct 2 10:20:36 CEST 2001 - grimmer@suse.de
- Update to 1.0.6 (bugfixes - see changelog.jfs for details)
- added README and changelog.jfs to the file list
-------------------------------------------------------------------
Tue Sep 18 15:21:50 CEST 2001 - froh@suse.de
- uintX_t_for__uX.patch: jfsutils/libfs/unicode_to_utf8.{c,h} is
borrowed from the kernel source tree and uses __uX datatypes from
<linux/types.h>. this patch replaces these uses by uintX_t from
<stdint.h>
-------------------------------------------------------------------
Sun Sep 16 19:31:41 CEST 2001 - grimmer@suse.de
- Update to 1.0.5 - bugfixes:
* Fixed jfsprogs.spec to handle utilities not being in file
system source tree
* Cleaned up include files
* Fixed inconsistencies in mkfs man, html pages
-------------------------------------------------------------------
Wed Sep 5 13:36:38 CEST 2001 - grimmer@suse.de
- Update to 1.0.4
-------------------------------------------------------------------
Thu Aug 23 12:45:53 CEST 2001 - grimmer@suse.de
- Update to 1.0.3
- now uses the separated jfsutils tarball (utils have been split
from the kernel sources)
- reworked spec file to fit the new tarball file locations
-------------------------------------------------------------------
Tue Aug 7 10:18:16 CEST 2001 - grimmer@suse.de
- Update to 1.0.2 (bugfix release, see the changelog for details)
- removed bus_error.patch (now included in upstream sources)
-------------------------------------------------------------------
Thu Aug 2 12:36:22 CEST 2001 - grimmer@suse.de
- added bus_error.patch (posted by Barry Arndt <barndt@us.ibm.com> on
jfs-discussion@dwoss.lotus.com) to fix a bus error on SPARC
when runnning mkfs.jfs (wrong typecast in indodes.c causes a
value of 1 being added to the address of buffer, resulting in
an odd numbered address in buf_ai)
-------------------------------------------------------------------
Wed Jul 11 12:49:36 CEST 2001 - grimmer@suse.de
- update to 1.0.1
- removed now obsolete patch for mkfs.jfs
-------------------------------------------------------------------
Thu Jul 5 13:48:13 CEST 2001 - grimmer@suse.de
- added patch from <kkaempf@suse.de> to add a "-f" option
to mkfs.jfs (this disables the "Are you sure?" confirmation)
- updated mkfs.jfs manual page to reflect the change
-------------------------------------------------------------------
Fri Jun 29 17:48:08 CEST 2001 - grimmer@suse.de
- initial package (version 1.0.0)
- added various documentation from the web site
(JFS Overview Paper, JFS Layout Paper, JFS Log
Paper, JFS Root Boot HOWTO)

86
jfsutils.spec Normal file
View File

@ -0,0 +1,86 @@
#
# spec file for package jfsutils
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: jfsutils
Version: 1.1.15
Release: 0
Summary: IBM JFS Utility Programs
License: GPL-2.0-or-later
Group: System/Filesystems
URL: http://jfs.sourceforge.net/
Source0: http://jfs.sourceforge.net/project/pub/%{name}-%{version}.tar.gz
Source1: jfs.pdf
Source2: jfslayout.pdf
Source3: jfslog.pdf
Source4: jfsroot.html
Source5: jfs.txt
Patch1: jfs-headers.patch
Patch2: sysmacros.patch
Patch3: libfs-Fixing-issue-with-variable-name-collision.patch
Patch4: jfsutils_format-security_ftbs.patch
BuildRequires: e2fsprogs-devel
Provides: jfsprogs = %{version}
Obsoletes: jfsprogs < %{version}
Supplements: filesystem(jfs)
%description
This package contains utilities for managing IBM's Journaled File
System (JFS) under Linux. The following utilities are available:
o fsck.jfs--initiate replay of the JFS transaction log and check and
repair a JFS formatted device o logdump--dump a JFS formatted device's
journal log o logredo--replay a JFS formatted device's journal log o
mkfs.jfs--create a JFS formatted partition o xchkdmp--dump the contents
of a JFS fsck log file created with xchklog o xchklog--extract a log
from the JFS fsck workspace into a file o xpeek--shell-type JFS file
system editor
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
sed -i -e 's@^\./"@\." @' fsck/jfs_fsck.8 \
fscklog/jfs_fscklog.8 \
logdump/jfs_logdump.8 \
mkfs/jfs_mkfs.8 \
tune/jfs_tune.8 \
xpeek/jfs_debugfs.8
tail +35 mkfs/jfs_mkfs.8 | head -10
%configure
make %{?_smp_mflags}
%install
mkdir ./jfsdocs
install -m 644 %{SOURCE1} ./jfsdocs
install -m 644 %{SOURCE2} ./jfsdocs
install -m 644 %{SOURCE3} ./jfsdocs
install -m 644 %{SOURCE4} ./jfsdocs
install -m 644 %{SOURCE5} ./jfsdocs
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%files
%license COPYING
%doc AUTHORS NEWS ChangeLog jfsdocs/*
%{_mandir}/man8/*
%{_sbindir}/*
%changelog

View File

@ -0,0 +1,44 @@
diff -rU4 jfsutils-1.1.15/fscklog/display.c jfsutils-1.1.15-mine/fscklog/display.c
--- jfsutils-1.1.15/fscklog/display.c 2005-11-22 21:43:54.000000000 +0100
+++ jfsutils-1.1.15-mine/fscklog/display.c 2013-12-04 21:42:37.451313506 +0100
@@ -181,9 +181,9 @@
-1;
} else {
/* the record looks ok */
msg_txt = &log_entry[log_entry_pos];
- printf(msg_txt);
+ printf("%s", msg_txt);
/*
* set up for the next record
*/
local_recptr->infile_buf_data_len +=
diff -rU4 jfsutils-1.1.15/fscklog/fscklog.c jfsutils-1.1.15-mine/fscklog/fscklog.c
--- jfsutils-1.1.15/fscklog/fscklog.c 2006-06-05 21:31:40.000000000 +0200
+++ jfsutils-1.1.15-mine/fscklog/fscklog.c 2013-12-04 21:43:57.649593842 +0100
@@ -251,9 +251,9 @@
va_end(args);
sprintf(debug_detail, " [%s:%d]\n", basename(file_name), line_number);
- printf(msg_string);
- printf(debug_detail);
+ printf("%s", msg_string);
+ printf("%s", debug_detail);
return 0;
}
diff -rU4 jfsutils-1.1.15/logdump/helpers.c jfsutils-1.1.15-mine/logdump/helpers.c
--- jfsutils-1.1.15/logdump/helpers.c 2005-11-22 21:43:55.000000000 +0100
+++ jfsutils-1.1.15-mine/logdump/helpers.c 2013-12-04 21:44:33.407704099 +0100
@@ -94,9 +94,9 @@
va_end(args);
sprintf(debug_detail, " [%s:%d]\n", file_name, line_number);
- printf(msg_string);
- printf(debug_detail);
+ printf("%s", msg_string);
+ printf("%s", debug_detail);
return 0;
}

View File

@ -0,0 +1,411 @@
From 1c7c01420d592e0e87e532ac688e61d5a2fafab2 Mon Sep 17 00:00:00 2001
From: Larry Dewey <ldewey@suse.com>
Date: Thu, 9 Jan 2020 14:36:45 -0700
Subject: [PATCH] libfs: Fixing issue with variable name collision
Due to the structure of the old code, variable name collisions were
occuring when building with the `-fno-common` flag. These changes fix
the problem.
[LD: BSC#1160272]
Signed-off-by: Larry Dewey <ldewey@suse.com>
---
fscklog/display.c | 4 +-
libfs/logredo.c | 127 +++++++++++++++++++++++-----------------------
2 files changed, 66 insertions(+), 65 deletions(-)
diff --git a/fscklog/display.c b/fscklog/display.c
index a33d44f..ecb48ca 100644
--- a/fscklog/display.c
+++ b/fscklog/display.c
@@ -54,7 +54,7 @@ FILE *infp;
* output: fsck extracted service log I/O buffer
*
*/
-char xchklog_buffer[XCHKLOG_BUFSIZE];
+char display_xchklog_buffer[XCHKLOG_BUFSIZE];
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
*
@@ -98,7 +98,7 @@ int xchkdmp(struct fscklog_record *local_recptr)
* Initialize the fscklog control block
*/
local_recptr->infile_buf_length = XCHKLOG_BUFSIZE;
- local_recptr->infile_buf_ptr = xchklog_buffer;
+ local_recptr->infile_buf_ptr = display_xchklog_buffer;
local_recptr->highest_msg_num =
fsck_highest_msgid_defined + JFSCHKLOG_FIRSTMSGNUM;
diff --git a/libfs/logredo.c b/libfs/logredo.c
index eb897e8..c9934db 100644
--- a/libfs/logredo.c
+++ b/libfs/logredo.c
@@ -87,9 +87,9 @@ int32_t bmap_stg_bytes = 0;
* S T U F F F O R T H E L O G
*
*/
-struct logsuper logsup; /* log super block */
-int32_t numdoblk; /* number of do blocks used */
-int32_t numnodofile; /* number of nodo file blocks used */
+struct logsuper global_logsup; /* log super block */
+int32_t logredo_numdoblk; /* number of do blocks used */
+int32_t logredo_numnodofile; /* number of nodo file blocks used */
int32_t numExtDtPg = 0; /* number of extended dtpage blocks used */
/*
@@ -129,7 +129,7 @@ int32_t use_2ndary_agg_superblock;
*/
/* buffer header table */
-struct bufhdr {
+struct logredo_bufhdr {
int16_t next; /* 2: next on free/lru list */
int16_t prev; /* 2: previous on free/lru list */
int16_t hnext; /* 2: next on hash chain */
@@ -139,27 +139,28 @@ struct bufhdr {
int16_t reserve; /* 2 */
int32_t vol; /* 4: minor of agrregate/lv number */
pxd_t pxd; /* 8: on-disk page pxd */
-} bufhdr[NBUFPOOL]; /* (24) */
+} logredo_bufhdr[NBUFPOOL]; /* (24) */
/* buffer table */
struct bufpool {
char bytes[PSIZE];
-} buffer[NBUFPOOL - 1];
+} logredo_buffer[NBUFPOOL - 1];
/*
* log page buffer cache
*
* log has its own 4 page buffer pool.
*/
-uint8_t afterdata[LOGPSIZE * 2]; /* buffer to read in redopage data */
+uint8_t logredo_afterdata[LOGPSIZE * 2]; /* buffer to read in redopage data */
/*
* Miscellaneous
*/
-caddr_t prog; /* Program name */
-int32_t mntcnt, bufsize;
-char *mntinfo;
-int32_t retcode; /* return code from logredo */
+caddr_t logredo_prog; /* Program name */
+extern int32_t mntcnt;
+int32_t logredo_bufsize;
+char *logredo_mntinfo;
+int32_t logredo_retcode; /* return code from logredo */
int end_of_transaction = 0;
/*
@@ -489,8 +490,8 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
/*
* loop until we get enough memory to read vmount struct
*/
- mntinfo = (char *) &bufsize;
- bufsize = sizeof (int);
+ logredo_mntinfo = (char *) &logredo_bufsize;
+ logredo_bufsize = sizeof (int);
/*
* validate that the log is not currently in use;
@@ -517,21 +518,21 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
rc = ujfs_rw_diskblocks(Log.fp,
(uint64_t) (Log.xaddr +
LOGPNTOB(LOGSUPER_B)),
- (unsigned) sizeof (struct logsuper), (char *) &logsup, GET);
+ (unsigned) sizeof (struct logsuper), (char *) &global_logsup, GET);
if (rc != 0) {
fsck_send_msg(lrdo_CANTREADLOGSUP);
rc = LOGSUPER_READ_ERROR;
goto error_out;
}
- ujfs_swap_logsuper(&logsup);
+ ujfs_swap_logsuper(&global_logsup);
- if (logsup.magic != LOGMAGIC) {
+ if (global_logsup.magic != LOGMAGIC) {
fsck_send_msg(lrdo_LOGSUPBADMGC);
rc = NOT_LOG_FILE_ERROR;
goto error_out;
}
- if (logsup.version > LOGVERSION) {
+ if (global_logsup.version > LOGVERSION) {
fsck_send_msg(lrdo_LOGSUPBADVER);
rc = JFS_VERSION_ERROR;
goto error_out;
@@ -551,7 +552,7 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
}
}
- if (logsup.state == LOGREDONE) {
+ if (global_logsup.state == LOGREDONE) {
fsck_send_msg(lrdo_ALREADYREDONE);
if (Log.location & INLINELOG)
if ((rc = updateSuper(0)) != 0) {
@@ -561,8 +562,8 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
return (0);
}
- Log.size = logsup.size;
- Log.serial = logsup.serial;
+ Log.size = global_logsup.size;
+ Log.serial = global_logsup.serial;
/*
* find the end of log
@@ -574,10 +575,10 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
fsck_send_msg(lrdo_LOGENDBAD1);
logError(LOGEND, 0);
- ujfs_swap_logsuper(&logsup);
+ ujfs_swap_logsuper(&global_logsup);
rc = ujfs_rw_diskblocks(Log.fp,
(Log.xaddr + LOGPNTOB(LOGSUPER_B)),
- (unsigned long) LOGPSIZE, (char *) &logsup, PUT);
+ (unsigned long) LOGPSIZE, (char *) &global_logsup, PUT);
rc = logend;
goto error_out;
}
@@ -592,7 +593,7 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
goto error_out;
}
- highest_lr_byte = logsup.size * LOGPSIZE - LOGRDSIZE;
+ highest_lr_byte = global_logsup.size * LOGPSIZE - LOGRDSIZE;
if ((logend < lowest_lr_byte) || (logend > highest_lr_byte)) {
fsck_send_msg(lrdo_LOGEND, logend);
@@ -614,7 +615,7 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
do {
logaddr = nextaddr;
- nextaddr = logRead(logaddr, &ld, afterdata);
+ nextaddr = logRead(logaddr, &ld, logredo_afterdata);
DBG_TRACE(("Logaddr=%x\nNextaddr=%x\n", logaddr, nextaddr))
nlogrecords += 1;
/*
@@ -745,7 +746,7 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
*/
if (end_of_transaction != 0) {
for (k = 1; k < NBUFPOOL; k++) {
- if ((rc = bflush(k, &buffer[k - 1])) != 0)
+ if ((rc = bflush(k, &logredo_buffer[k - 1])) != 0)
goto error_out;
}
end_of_transaction = 0;
@@ -768,7 +769,7 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
* flush data page buffer cache
*/
for (k = 1; k < NBUFPOOL; k++) {
- if ((rc = bflush(k, &buffer[k - 1])) != 0)
+ if ((rc = bflush(k, &logredo_buffer[k - 1])) != 0)
break;
}
@@ -810,17 +811,17 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
* versions of the operating system. Therefore switch the magic
* number to the earliest level.
*/
- if (logsup.state != LOGREADERR) {
+ if (global_logsup.state != LOGREADERR) {
for (k = 0; k < MAX_ACTIVE; k++)
- uuid_clear(logsup.active[k]);
+ uuid_clear(global_logsup.active[k]);
- logsup.end = logend;
- logsup.state = LOGREDONE;
- logsup.magic = LOGMAGIC;
+ global_logsup.end = logend;
+ global_logsup.state = LOGREDONE;
+ global_logsup.magic = LOGMAGIC;
}
- ujfs_swap_logsuper(&logsup);
+ ujfs_swap_logsuper(&global_logsup);
rc = ujfs_rw_diskblocks(Log.fp, (Log.xaddr + LOGPNTOB(LOGSUPER_B)),
- LOGPSIZE, (char *) &logsup, PUT);
+ LOGPSIZE, (char *) &global_logsup, PUT);
/*
* now log some info for the curious
@@ -833,9 +834,9 @@ int jfs_logredo(caddr_t pathname, FILE *fp, int32_t use_2nd_aggSuper)
fsck_send_msg(lrdo_RPTNUMLOGREC, nlogrecords);
- fsck_send_msg(lrdo_RPTNUMDOBLK, numdoblk);
+ fsck_send_msg(lrdo_RPTNUMDOBLK, logredo_numdoblk);
- fsck_send_msg(lrdo_RPTNUMNODOBLK, numnodofile);
+ fsck_send_msg(lrdo_RPTNUMNODOBLK, logredo_numnodofile);
error_out:
@@ -954,18 +955,18 @@ int openVol(int vol)
* Now that the aggregate superblock has been read, do some
* more validation of the log superblock
*/
- if (logsup.bsize != vopen[vol].lblksize) {
+ if (global_logsup.bsize != vopen[vol].lblksize) {
fsck_send_msg(lrdo_LOGSUPBADBLKSZ);
return JFS_BLKSIZE_ERROR;
}
- if (logsup.l2bsize != vopen[vol].l2bsize) {
+ if (global_logsup.l2bsize != vopen[vol].l2bsize) {
fsck_send_msg(lrdo_LOGSUPBADL2BLKSZ);
return JFS_L2BLKSIZE_ERROR;
}
- aggsb_numpages = lengthPXD(&sb.s_logpxd) * logsup.bsize / LOGPSIZE;
- if (logsup.size != aggsb_numpages) {
+ aggsb_numpages = lengthPXD(&sb.s_logpxd) * global_logsup.bsize / LOGPSIZE;
+ if (global_logsup.size != aggsb_numpages) {
fsck_send_msg(lrdo_LOGSUPBADLOGSZ);
return JFS_LOGSIZE_ERROR;
}
@@ -1139,14 +1140,14 @@ int bflush(int32_t k, /* The index in bufhdr that describes buf */
int64_t blkno;
/* nothing to do ? */
- if (bufhdr[k].modify == 0)
+ if (logredo_bufhdr[k].modify == 0)
return (0);
/* write it out */
- vol = bufhdr[k].vol;
+ vol = logredo_bufhdr[k].vol;
fp = vopen[vol].fp;
- blkno = addressPXD(&bufhdr[k].pxd);
- nbytes = lengthPXD(&bufhdr[k].pxd) << vopen[vol].l2bsize;
+ blkno = addressPXD(&logredo_bufhdr[k].pxd);
+ nbytes = lengthPXD(&logredo_bufhdr[k].pxd) << vopen[vol].l2bsize;
rc = ujfs_rw_diskblocks(fp,
(uint64_t) (blkno << vopen[vol].l2bsize),
(unsigned) nbytes, (char *) buf, PUT);
@@ -1155,7 +1156,7 @@ int bflush(int32_t k, /* The index in bufhdr that describes buf */
return (BFLUSH_WRITEERROR);
}
- bufhdr[k].modify = 0;
+ logredo_bufhdr[k].modify = 0;
return (0);
}
@@ -1171,7 +1172,7 @@ int bflush(int32_t k, /* The index in bufhdr that describes buf */
*/
int findLog(FILE *fp, int *in_use)
{
- struct logsuper logsup;
+ struct logsuper findLog_logsup;
struct superblock sb;
*in_use = 0;
@@ -1230,9 +1231,9 @@ int findLog(FILE *fp, int *in_use)
}
}
ujfs_rw_diskblocks(Log.fp, LOGPNTOB(LOGSUPER_B),
- sizeof (struct logsuper), &logsup, GET);
- ujfs_swap_logsuper(&logsup);
- if ((logsup.magic != LOGMAGIC) || (uuid_compare(logsup.uuid, sb.s_loguuid))) {
+ sizeof (struct logsuper), &findLog_logsup, GET);
+ ujfs_swap_logsuper(&findLog_logsup);
+ if ((findLog_logsup.magic != LOGMAGIC) || (uuid_compare(findLog_logsup.uuid, sb.s_loguuid))) {
fclose(Log.fp);
*in_use = 0;
goto by_uuid;
@@ -1253,9 +1254,9 @@ int findLog(FILE *fp, int *in_use)
/*
* is this an external log?
*/
- ujfs_rw_diskblocks(fp, LOGPNTOB(LOGSUPER_B), sizeof (struct logsuper), &logsup, GET);
- ujfs_swap_logsuper(&logsup);
- if (logsup.magic != LOGMAGIC) {
+ ujfs_rw_diskblocks(fp, LOGPNTOB(LOGSUPER_B), sizeof (struct logsuper), &findLog_logsup, GET);
+ ujfs_swap_logsuper(&findLog_logsup);
+ if (global_logsup.magic != LOGMAGIC) {
fsck_send_msg(lrdo_NOTAFSDEV);
return NOT_FSDEV_ERROR;
}
@@ -1280,7 +1281,7 @@ int fsError(int type, /* error types */
fsck_send_msg(lrdo_ERRORONVOL, vol);
- retcode = -1;
+ logredo_retcode = -1;
vopen[vol].status = FM_LOGREDO;
switch (type) {
@@ -1320,8 +1321,8 @@ int fsError(int type, /* error types */
int logError(int type, int logaddr)
{
int k;
- retcode = -1;
- logsup.state = LOGREADERR;
+ logredo_retcode = -1;
+ global_logsup.state = LOGREADERR;
switch (type) {
case LOGEND:
fsck_send_msg(lrdo_FINDLOGENDFAIL);
@@ -1376,12 +1377,12 @@ static int recoverExtendFS(FILE *fp)
* read bmap global control page
*/
/* read superblock yet again */
- sbp = (struct superblock *) &buffer[0];
+ sbp = (struct superblock *) &logredo_buffer[0];
if (rdwrSuper(fp, sbp, PB_READ))
goto errout;
/* read primary block allocation map inode */
- dip = (char *) &buffer[1];
+ dip = (char *) &logredo_buffer[1];
if (ujfs_rw_diskblocks(fp, AITBL_OFF, PSIZE, dip, GET)) {
fsck_send_msg(lrdo_EXTFSREADFSSUPERFAIL);
goto errout;
@@ -1391,7 +1392,7 @@ static int recoverExtendFS(FILE *fp)
dip1 = (struct dinode *) dip;
dip1 += BMAP_I;
- bp = (char *) &buffer[2]; /* utility buffer */
+ bp = (char *) &logredo_buffer[2]; /* utility buffer */
/* start from root in dinode */
p = (xtpage_t *) & dip1->di_btroot;
@@ -1660,15 +1661,15 @@ static int recoverExtendFS(FILE *fp)
*/
/* read log superblock */
t64 = (addressPXD(&sbp->s_logpxd) << sbp->s_l2bsize) + LOGPSIZE;
- if (ujfs_rw_diskblocks(fp, t64, LOGPSIZE, &logsup, GET)) {
+ if (ujfs_rw_diskblocks(fp, t64, LOGPSIZE, &global_logsup, GET)) {
fsck_send_msg(lrdo_EXTFSREADLOGSUPFAIL);
goto errout;
}
- logsup.end = findEndOfLog();
- logsup.state = LOGREDONE;
+ global_logsup.end = findEndOfLog();
+ global_logsup.state = LOGREDONE;
- if (ujfs_rw_diskblocks(fp, t64, LOGPSIZE, &logsup, PUT)) {
+ if (ujfs_rw_diskblocks(fp, t64, LOGPSIZE, &global_logsup, PUT)) {
fsck_send_msg(lrdo_EXTFSWRITELOGSUPFAIL);
goto errout;
}
@@ -1791,11 +1792,11 @@ static int nfsisloaded()
if (entry = load("/usr/sbin/probe", 0, 0))
return (1);
if (errno == ENOEXEC) {
- DBG_TRACE(("%s: nfs is not loaded\n", prog))
+ DBG_TRACE(("%s: nfs is not loaded\n", logredo_prog))
return (0);
}
sav_errno = errno;
- DBG_TRACE(("%s: ", prog))
+ DBG_TRACE(("%s: ", logredo_prog))
errno = sav_errno;
perror("load");
return (0);
--
2.24.1

12
sysmacros.patch Normal file
View File

@ -0,0 +1,12 @@
Index: jfsutils-1.1.15/libfs/devices.c
===================================================================
--- jfsutils-1.1.15.orig/libfs/devices.c
+++ jfsutils-1.1.15/libfs/devices.c
@@ -40,6 +40,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <sys/sysmacros.h>
#if defined(__DragonFly__)
#include <machine/param.h>
#include <sys/diskslice.h>