Commit Graph
31 Commits
Author SHA1 Message Date
Jeff Mahoney 19566d0878 build: introduce shared libreiserfscore.so and export it
In order to use reiserfs functionality in external programs, we need to
make a shared library and includes available.

This converts both libmisc and libreiserfscore into shared libraries, and
links libmisc into libreiserfscore. We also export the includes and
a pkg-config file.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 19:02:20 -04:00
Jeff Mahoney 97fa944851 reiserfsprogs: convert reiserfs_filsys_t from structure to pointer-to-structure
This makes it more consistent with e2fsprogs.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 19:02:20 -04:00
Jeff Mahoney 81aeadf510 reiserfsprogs: annotate for endian safeness
By annotating structure members and other on-disk structures as little
endian, we can catch bugs more easily.

The code was already endian safe except for three minor spots:
1) The badblock list code was initializing its key in an endian-unsafe way.
2) Indirect block pointer sequence printing was treating cpu-order values
   as little endian.
3) reiserfsck was trying to do endian switching on the lost+found key,
   but it was before it was even initialized to anything, so we can
   just remove that completely.

These issues were fixed as part of this commit.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 19:02:20 -04:00
Jeff Mahoney 767f7b85df reiserfsprogs: fix remaining sparse warnings
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 19:02:19 -04:00
Jeff Mahoney 20357cf349 reiserfsprogs: Fix sparse "warning: Using plain integer as NULL pointer"
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 19:02:18 -04:00
Jeff Mahoney a1623ca6b3 reiserfscore: rename usearch_by_position to reiserfs_search_by_position
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 19:00:03 -04:00
Jeff Mahoney c1ff1d5d2d cleanup: rename key and item_head accessors to more friendly names
This patch does a quick search and replace:
B_N_PITEM_HEAD() -> item_head()
B_N_PDELIM_KEY() -> internal_key()
B_N_PKEY() -> leaf_key()
B_N_PITEM() -> item_body()

And the item_head version:
B_I_PITEM() -> ih_item_body()
I_ENTRY_COUNT() -> ih_entry_count()

And the treepath variants:
get_ih() -> tp_item_head()
PATH_PITEM_HEAD() -> tp_item_head()
get_item() -> tp_item_body()

... which makes the code much easier on the eyes.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 17:15:33 -04:00
Jeff Mahoney 290bb8c378 cleanup: remove trailing whitespace
This patch just removes trailing whitespace.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 17:15:32 -04:00
Jeff Mahoney 47cff72748 cleanup: run indent with the Linux Kernel style across all code
Over the years, the reiserfs kernel code has been gradually cleaned up
to be more readable. This patch does the same to the progs code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 17:14:42 -04:00
Jeff Mahoney b23d40f723 cleanup: rename common structure names
In order to convert reiserfscore into a externally-usable library,
we need to rename structures so they won't collide with other
namespaces.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 17:12:09 -04:00
Jeff Mahoney 98b84706a3 reiserfsprogs: autogenerate the version number in the man pages
The version string in the man pages was manually updated. Now it updates
when configure runs.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-26 16:35:40 -04:00
Jeff Mahoney e30941ed6f CREDITS/CONTACT: remove references to namesys.com
While Namesys drove almost all reiserfs development and was instrumental
in supporting it for many years, it has been offline for the past
6 years. All of its founders and employees have moved on to other
endeavors or are otherwise unavailable. This can be confusing to users
since the documentation points there either for background information
or to have bugs fixed.

This patch removes most of the non-historical references to
namesys.com and directs users to the reiserfs-devel list on vger.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-08-12 22:38:41 -04:00
Jeff Mahoney b4582fed40 Release 3.6.23. 2013-07-01 15:05:13 -04:00
Jeff Mahoney 1f028bced7 man: create links to common-prefix command names
We create links like fsck.reiserfs to reiserfsck but don't provide
the corresponding links to the man pages.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2013-07-01 14:50:36 -04:00
Mike Frysinger 90d328136c fix out of tree builds
This allows you to build out of tree like:
	mkdir build
	../configure
	make

This also fixes `make distcheck` since that uses the above mechanism.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2012-10-30 17:51:42 -04:00
Roy Marples d3e67ae2f4 reiserfsck: support fsck -f -n
Every other fsck util out there supports non-interactive forcing and this
change brings reiserfsck into line.

Signed-off-by: Roy Marples <roy@marples.name>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2012-10-11 15:57:27 -04:00
Jeff Mahoney 0edf890eec reiserfsprogs: fix printf formatting warnings
This patch fixes:
main.c:968:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘time_t’ [-Wformat]
prints.c:152:7: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘__u32’ [-Wformat]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2012-10-11 15:57:24 -04:00
Jeff Mahoney eba9abb84d reiserfsprogs: fix set-but-not-used gcc warnings
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2012-10-11 15:57:23 -04:00
Jeff Mahoney 8f95bdb15d reiserfsprogs: remove autoconf-generated files
These files change every time configure.in or Makefile.am is changed,
we can autogenerate them when exporting a tarball.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2012-10-11 15:57:23 -04:00
Jeff Mahoney 0265fd70c1 reiserfs: Fix signedness issues for large file systems
Now that we handle file systems > 8 TB, we end up printing large negative
numbers instead of actual block numbers. This patch fixes those places
to use unsigned ints for block numbers.

Signed-by: Jeff Mahoney <jeffm@suse.com>
2012-10-11 11:56:48 -04:00
Jeff Mahoney 5d4f1fa494 reiserfsprogs: fix use after free with fsck_progress
fsck_progress uses fs to get the log file handle but fs is freed before
 fsck_progress is caleld when it's about to print the "finished" message.

 When glibc is run with:
 MALLOC_CHECK_=3
 MALLOC_PERTURB_=69

 as is the default on newer versions of openSUSE, it poisons freed memory
 to detect conditions like this. As a result, reiserfsck segfaults on these
 systems.

 This patch fixes fsck to close the file system after printing the completion
 message.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2012-10-11 11:56:14 -04:00
Mike Frysinger 47d95ed055 install standard {fsck,mkfs}.reiserfs symlinks
Since utilities expect to be able to run `mkfs.$FS` and `fsck.$FS`,
reiserfs should install symlinks for these to the right place.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2012-10-11 11:52:23 -04:00
Jeff Mahoney 149a82e2e9 Imported reiserfsprogs-3.6.21 2012-10-11 11:32:39 -04:00
Jeff Mahoney dac518d099 Imported reiserfsprogs-3.6.20 2012-10-11 11:32:09 -04:00
Jeff Mahoney 0ed773997f Imported reiserfsprogs-3.6.19 2012-10-11 11:31:31 -04:00
Jeff Mahoney 3078c83c48 Imported reiserfsprogs-3.6.18 2012-10-11 11:30:57 -04:00
Jeff Mahoney 18057cdad6 Imported reiserfsprogs-3.6.13 2012-10-11 11:30:27 -04:00
Jeff Mahoney cccefa4d84 Imported reiserfsprogs-3.6.9 2012-10-11 11:29:29 -04:00
Jeff Mahoney 99c89460c3 Imported reiserfsprogs-3.6.4 2012-10-11 11:28:37 -04:00
Jeff Mahoney b69459eb80 Imported reiserfsprogs-3.6.2 2012-10-11 11:27:42 -04:00
Jeff Mahoney e7102bdb66 Initial commit -- seeded with reiserfsprogs 3.x.0j 2012-10-11 11:26:22 -04:00