osl.git
5 years agoosl-0.1.2. maint v0.1.2
Andre Noll [Tue, 14 Jan 2014 14:31:02 +0000 (15:31 +0100)]
osl-0.1.2.

This commit also adds a NEWS file which contains the release notes
of all previous releases.

5 years agoFix adu link.
Andre Noll [Tue, 14 Jan 2014 14:11:12 +0000 (15:11 +0100)]
Fix adu link.

After the upgrade of the servers at systemlinux.org last week, the web
service is no longer available through http://systemlinux.org. Adjust
the link to the adu page accordingly.

7 years agoAdd shared target.
Andre Noll [Wed, 23 May 2012 17:21:17 +0000 (19:21 +0200)]
Add shared target.

This allows to build and install the shared library and the oslfsck
executable on systems without help2man via

        make shared oslfsck
        sudo make install-lib install-bin

7 years agoAllow to build a static version of libosl.
Andre Noll [Tue, 22 May 2012 15:55:10 +0000 (17:55 +0200)]
Allow to build a static version of libosl.

This adds the new target libosl.a which creates an archive that can
be statically linked into applications. Currently this works only on
ELF-based systems including Linux, FreeBSD and NetBSD, but fails on
MacOS. So it is not built automatically.

Unfortunately, creating libosl.a turned out to be trickier than
expected, because -fvisibility=hidden works only for dynamic libraries.
So we need a different method to hide non-static internal symbols
like make_message() which must not be global (external) because they
might clash with symbols used in the application.

objcopy(1) does the trick but we must provide a list of exceptional
symbols that should not be made local. This list is generated from
the osl.h header file.

8 years agoinit_rbtrees(): Fix initialization of volatile objects.
Andre Noll [Sat, 22 Jan 2011 13:23:14 +0000 (14:23 +0100)]
init_rbtrees(): Fix initialization of volatile objects.

In case a table contains both volatile and non-volatile rbtree columns
we must inititalize the arrray of pointers to the volatile objects.

Without this patch, re-opening a non-empty table leads to a segfault.

8 years agoSimplify __log().
Andre Noll [Sat, 22 Jan 2011 13:18:09 +0000 (14:18 +0100)]
Simplify __log().

No need for outfd as it is always stderr.

8 years agoClarify documentation of osl_table_description->dir.
Andre Noll [Sat, 22 Jan 2011 13:16:41 +0000 (14:16 +0100)]
Clarify documentation of osl_table_description->dir.

8 years agoMakefile: Remove unused uname_rs.
Andre Noll [Sat, 22 Jan 2011 13:15:49 +0000 (14:15 +0100)]
Makefile: Remove unused uname_rs.

9 years agohlt: Fix typo in comment.
Andre Noll [Sun, 21 Nov 2010 10:58:45 +0000 (11:58 +0100)]
hlt: Fix typo in comment.

9 years agoFix creation of zero-sized disk storage objects.
Andre Noll [Fri, 15 Jan 2010 19:11:50 +0000 (20:11 +0100)]
Fix creation of zero-sized disk storage objects.

We must not call write_all() with a zero length parameter.

10 years agoosl-0.1.1 v0.1.1
Andre Noll [Thu, 26 Nov 2009 13:14:42 +0000 (14:14 +0100)]
osl-0.1.1

10 years agoSplit install target.
Andre Noll [Wed, 25 Nov 2009 09:40:08 +0000 (10:40 +0100)]
Split install target.

As proposed by Sebastian Stark, this introduces the install-lib,
install-bin and install-man targets. The simple "make install" still
installs everything, but splitting the target allows people to install
for example only the library if they do not have all tools available
which are necessary to build the oslfsck binary or its man page.

10 years agoINSTALL update.
Andre Noll [Mon, 23 Nov 2009 17:06:39 +0000 (18:06 +0100)]
INSTALL update.

Remove dependency on openssl and describe more clearly what is needed
to compile and install the package.

Also mention that one can set PREFIX to change the installation prefix
at make install time.

10 years agoDrop dependency on openssl.
Andre Noll [Fri, 20 Nov 2009 08:38:56 +0000 (09:38 +0100)]
Drop dependency on openssl.

This patch adds git's implementation of the sha1 hash algorithm. This
makes osl more self-contained as it allows to build osl without
openssl being installed.

It should also reduce the startup time of applications that link
against libosl.

10 years agoDon't use ?:= for setting PREFIX.
Andre Noll [Thu, 5 Nov 2009 10:27:05 +0000 (11:27 +0100)]
Don't use ?:= for setting PREFIX.

This does not work with all versions of (gnu) make.

10 years agoSet CC to gcc by default.
Andre Noll [Mon, 2 Nov 2009 13:39:16 +0000 (14:39 +0100)]
Set CC to gcc by default.

On systems where cc != gcc, compilation likely fails because we are
using quite some gccisms in osl. So default to gcc but let the user
override the default by setting CC manually.

The straight-forward CC ?= gcc does not work with gnu make as make
assigns CC the default value "cc".

Thanks to Steffen Schmidt for pointing out this shortcoming.

10 years agoCapitalize prefix variable.
Andre Noll [Mon, 2 Nov 2009 13:34:15 +0000 (14:34 +0100)]
Capitalize prefix variable.

As noted by Steffen Schmidt, in most projects the installation prefix is
spelled in caps, so follow this rule in osl.

Also use ?:= as the assignement operator as it creates a simply expanded
variable which is more suitable for the PREFIX variable.

10 years agoMacOs Fixes.
Andre Noll [Fri, 21 Aug 2009 11:17:31 +0000 (13:17 +0200)]
MacOs Fixes.

- Fix name of symbolic link used during installation.
- Do not strip the installed library.

10 years ago[Makefile]: Also create bindir and mandir on install. v0.1.0
Andre Noll [Tue, 4 Aug 2009 08:50:05 +0000 (10:50 +0200)]
[Makefile]: Also create bindir and mandir on install.

10 years agoREADME: Clarify red-black tree statements.
Andre Noll [Mon, 3 Aug 2009 09:31:49 +0000 (11:31 +0200)]
README: Clarify red-black tree statements.

As noted by Sebastian Stark, the old text was a bit misleading. So
make it clear that no special linux files are necessary to compile
the library.

Also, the sentence on table locking was not quite true: There's the
dirty bit in each osl table which is some kind of locking. Correct that
statement as well.

10 years agoThe fsck program is called oslfsck rather than osl_fsck.
Andre Noll [Sun, 2 Aug 2009 10:54:46 +0000 (12:54 +0200)]
The fsck program is called oslfsck rather than osl_fsck.

Remove the underscore and kill an outdated comment.

10 years agoImprove table versioning.
Andre Noll [Sun, 2 Aug 2009 10:31:07 +0000 (12:31 +0200)]
Improve table versioning.

This patch changes the way table version numbers are stored on disk.
Two version numbers instead of only one are stored in the table header:
The version of the lib that created the table, and the lowest version
number of the lib that can read the table.

As the latter is currently 0, it has no effect so far, i.e. tables
created with previous versions of the library still work fine. However,
with this change future versions of the library can detect from the
on-disk versions and the library version numbers if table and library
are compatible.

10 years agoRemove unnecessary $O from gengetopt target.
Andre Noll [Sat, 1 Aug 2009 19:51:45 +0000 (21:51 +0200)]
Remove unnecessary $O from gengetopt target.

Another relict from the paraslash code.

10 years agoMerge commit 'fml/master'
Andre Noll [Sat, 1 Aug 2009 19:49:49 +0000 (21:49 +0200)]
Merge commit 'fml/master'

10 years agoInstall executables using mode 755.
Andre Noll [Sat, 1 Aug 2009 19:41:04 +0000 (21:41 +0200)]
Install executables using mode 755.

10 years agoAdd subject=[osl] to the mailto link.
Andre Noll [Mon, 27 Jul 2009 17:12:25 +0000 (19:12 +0200)]
Add subject=[osl] to the mailto link.

Suggested by Sebastian Schultheiss. Let's see how much spam comes
through this link..

10 years agoAdd the osl logo.
Andre Noll [Mon, 27 Jul 2009 17:02:01 +0000 (19:02 +0200)]
Add the osl logo.

Many thanks to Sebastian Schultheiss who created the logo.

10 years agoREADME: Trivial typo fix.
Andre Noll [Mon, 27 Jul 2009 15:01:38 +0000 (17:01 +0200)]
README: Trivial typo fix.

Noted by Sebastian Stark.

10 years agoChange the osl slogan.
Andre Noll [Mon, 27 Jul 2009 15:01:08 +0000 (17:01 +0200)]
Change the osl slogan.

As the text "object storage layer" is already contained in the logo,
we need something different.

10 years agoINSTALL: Add links to man2html and ImageMagick Homepages.
Andre Noll [Mon, 27 Jul 2009 09:33:57 +0000 (11:33 +0200)]
INSTALL: Add links to man2html and ImageMagick Homepages.

10 years agoDowngrade Doxyfile to version 1.5.4.
Andre Noll [Mon, 27 Jul 2009 09:33:09 +0000 (11:33 +0200)]
Downgrade Doxyfile to version 1.5.4.

It must work for Ubuntu Hardy.

10 years agoAdd README/INSTALL and webpage generation stuff.
Andre Noll [Sun, 26 Jul 2009 21:40:54 +0000 (23:40 +0200)]
Add README/INSTALL and webpage generation stuff.

10 years ago.gitignore: Don't ignore foo*
Andre Noll [Sun, 26 Jul 2009 21:39:36 +0000 (23:39 +0200)]
.gitignore: Don't ignore foo*

It matches the new footer.html file :-/

10 years agoosltar: Hide the comment for the __static__ #define.
Andre Noll [Sun, 26 Jul 2009 21:36:58 +0000 (23:36 +0200)]
osltar: Hide the comment for the __static__ #define.

10 years agoosltar.c: Make write_all() static.
Andre Noll [Sun, 26 Jul 2009 21:36:23 +0000 (23:36 +0200)]
osltar.c: Make write_all() static.

10 years agogitignore updates.
Andre Noll [Sun, 26 Jul 2009 21:34:30 +0000 (23:34 +0200)]
gitignore updates.

10 years agoosl.h.in: Minor documentation improvements.
Andre Noll [Sun, 26 Jul 2009 16:26:57 +0000 (18:26 +0200)]
osl.h.in: Minor documentation improvements.

10 years agoosltar: Minor cleanups.
Andre Noll [Sun, 26 Jul 2009 16:26:06 +0000 (18:26 +0200)]
osltar: Minor cleanups.

10 years agoMakefile: Add doxygen comment to the osl_errors enum.
Andre Noll [Sun, 26 Jul 2009 16:24:40 +0000 (18:24 +0200)]
Makefile: Add doxygen comment to the osl_errors enum.

10 years agofsck.c: Make a couple of functions static.
Andre Noll [Tue, 21 Jul 2009 22:34:27 +0000 (00:34 +0200)]
fsck.c: Make a couple of functions static.

10 years agoAdd two examples to illiustrate programming with libosl.
Andre Noll [Mon, 13 Jul 2009 19:08:28 +0000 (21:08 +0200)]
Add two examples to illiustrate programming with libosl.

10 years agoAdd COPYING file.
Andre Noll [Mon, 13 Jul 2009 18:01:29 +0000 (20:01 +0200)]
Add COPYING file.

10 years agoImplement --dry-run option for fsck.
Andre Noll [Mon, 13 Jul 2009 13:24:55 +0000 (15:24 +0200)]
Implement --dry-run option for fsck.

We had this option for quite some time, but it was silently ignored because
the option was never implemented..

10 years agoFix a gcc warning on x86_64.
Andre Noll [Mon, 13 Jul 2009 08:56:37 +0000 (10:56 +0200)]
Fix a gcc warning on x86_64.

fsck.c: In function 'check_for_invalid_objects':
fsck.c:513: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'

10 years agoAdd target for man page, install oslfsck and its man page on make install.
Andre Noll [Sun, 12 Jul 2009 22:12:36 +0000 (00:12 +0200)]
Add target for man page, install oslfsck and its man page on make install.

10 years agoChange copyright year to 2009.
Andre Noll [Sun, 12 Jul 2009 22:11:48 +0000 (00:11 +0200)]
Change copyright year to 2009.

10 years agoReplace underscores with dashes in fsck command line options.
Andre Noll [Sun, 12 Jul 2009 21:42:55 +0000 (23:42 +0200)]
Replace underscores with dashes in fsck command line options.

The auto-generated --detailed-help uses a dash, so use dashes everywhere.

10 years agoSimplify check_index_ranges().
Andre Noll [Sun, 12 Jul 2009 21:40:23 +0000 (23:40 +0200)]
Simplify check_index_ranges().

Use FOR_EACH_MAPPED_COLUMN rather than open-code it.

10 years agofsck: Add some more log messages.
Andre Noll [Sat, 11 Jul 2009 21:25:29 +0000 (23:25 +0200)]
fsck: Add some more log messages.

These were helpful to find the bug which was fixed by the previous patch.

10 years agofsck: Fix a serious bug in prune_mapped_column().
Andre Noll [Sat, 11 Jul 2009 21:24:02 +0000 (23:24 +0200)]
fsck: Fix a serious bug in prune_mapped_column().

This function still contained a relict from the old database format that was changed in commit
6d7dce7f277fc8606fb8d5ed6360660c13a218af.  This caused prune_mapped_column()
to write one byte too much to the data file of a mapped column for each removed row.

Running the buggy oslfsck on a table with mapped columns where rows have been deleted
likely results in data corruption to objects adjacent to the deleted objects.

Worst of all, since only the data files but not the index is affected,  the corruption will not
immediately be noticed, which is probably why it took one year to find this bug. Kill it with
pleasure.

10 years agofsck: Overwrite the backup index file if it exists.
Andre Noll [Sat, 11 Jul 2009 19:39:27 +0000 (21:39 +0200)]
fsck: Overwrite the backup index file if it exists.

A bit dangerous, but without this change, osfsck always fails if this file exists.

Also, print a bit more information about what is going on.

10 years agoFix stale comment.
Andre Noll [Fri, 10 Jul 2009 20:05:55 +0000 (22:05 +0200)]
Fix stale comment.

10 years agoRemove remaining references to paraslash.
Andre Noll [Mon, 6 Jul 2009 21:27:01 +0000 (23:27 +0200)]
Remove remaining references to paraslash.

Mostly trivial stuff. We can't change the magic string though, so this will have to
stay "PARASLASH" for the rest of eternity.

10 years agoAdd #ifdef wrapper for osl.h.
Andre Noll [Fri, 12 Jun 2009 19:55:08 +0000 (21:55 +0200)]
Add #ifdef wrapper for osl.h.

This allows to include osl.h more than once.

10 years agoReturn -E_OSL_NOENT if stat/open fails with errno == ENOENT.
Andre Noll [Fri, 12 Jun 2009 19:54:19 +0000 (21:54 +0200)]
Return -E_OSL_NOENT if stat/open fails with errno == ENOENT.

This often indicates a non-fatal error, so callers might want to
know.

10 years agoKill error.h.
Andre Noll [Thu, 11 Jun 2009 21:52:20 +0000 (23:52 +0200)]
Kill error.h.

This completes the cleanup of the error handling.

10 years agoKill all users of is_errno().
Andre Noll [Thu, 11 Jun 2009 21:47:53 +0000 (23:47 +0200)]
Kill all users of is_errno().

10 years agoKill all remaining users of ERRNO_TO_ERROR().
Andre Noll [Thu, 11 Jun 2009 21:19:45 +0000 (23:19 +0200)]
Kill all remaining users of ERRNO_TO_ERROR().

10 years agoKill all users of ERRNO_TO_ERROR() in util.c and util.h.
Andre Noll [Thu, 11 Jun 2009 21:06:04 +0000 (23:06 +0200)]
Kill all users of ERRNO_TO_ERROR() in util.c and util.h.

10 years agoGet rid of all remaining users of ERRNO_TO_ERROR() in osl.c.
Andre Noll [Thu, 11 Jun 2009 20:49:03 +0000 (22:49 +0200)]
Get rid of all remaining users of ERRNO_TO_ERROR() in osl.c.

10 years agoReplace ERRNO_TO_ERROR(ENOMEM) by E_OSL_NOMEM.
Andre Noll [Thu, 11 Jun 2009 20:35:54 +0000 (22:35 +0200)]
Replace ERRNO_TO_ERROR(ENOMEM) by E_OSL_NOMEM.

osl calls should only return osl error codes. Therefore, ERRNO_TO_ERROR()
must die. This is a first step to get rid of this macro.

10 years agorbtree: Add const qualifier to some functions.
Andre Noll [Sun, 10 May 2009 19:36:18 +0000 (21:36 +0200)]
rbtree: Add const qualifier to some functions.

The 'rb_first()', 'rb_last()', 'rb_next()' and 'rb_prev()' calls take a pointer
to an RB node or RB root. They do not change the pointed objects, so add a
'const' qualifier.

See commit f4b477c47332367d35686bd2b808c2156b96d7c7 in the linux source tree.

10 years agoMerge commit 'athcx/master'
Andre Noll [Sun, 19 Apr 2009 21:20:51 +0000 (23:20 +0200)]
Merge commit 'athcx/master'

10 years agoFix a dead initialization.
Andre Noll [Sun, 19 Apr 2009 21:20:31 +0000 (23:20 +0200)]
Fix a dead initialization.

10 years agoMerge commit 'fml/master'
Andre Noll [Thu, 16 Apr 2009 14:58:43 +0000 (16:58 +0200)]
Merge commit 'fml/master'

10 years agoMerge commit 'stark/master'
Andre Noll [Mon, 2 Feb 2009 18:27:20 +0000 (19:27 +0100)]
Merge commit 'stark/master'

10 years agoFix compilation on FreeBSD.
Andre Noll [Mon, 2 Feb 2009 18:27:13 +0000 (19:27 +0100)]
Fix compilation on FreeBSD.

10 years agoremove oslfsck on 'make clean' as well
Sebastian Stark [Sat, 31 Jan 2009 09:12:34 +0000 (10:12 +0100)]
remove oslfsck on 'make clean' as well

10 years agoMerge commit 'meins/master'
Andre Noll [Sat, 10 Jan 2009 22:10:52 +0000 (23:10 +0100)]
Merge commit 'meins/master'

10 years agoRemove osl_hash_compare().
Andre Noll [Tue, 6 Jan 2009 20:54:41 +0000 (21:54 +0100)]
Remove osl_hash_compare().

API change, but as the code is not yet publically available..

10 years agoFix two doxygen warnings.
Andre Noll [Tue, 6 Jan 2009 20:51:37 +0000 (21:51 +0100)]
Fix two doxygen warnings.

11 years agoAdd a comment to search_rbtree().
Andre Noll [Sat, 9 Aug 2008 15:06:02 +0000 (17:06 +0200)]
Add a comment to search_rbtree().

11 years agoosl.h.in: Always include inttypes.h
Andre Noll [Sat, 9 Aug 2008 15:04:43 +0000 (17:04 +0200)]
osl.h.in: Always include inttypes.h

11 years agoGet rid of E_INVALID_OBJECT.
Andre Noll [Fri, 20 Jun 2008 08:22:33 +0000 (10:22 +0200)]
Get rid of E_INVALID_OBJECT.

It's introduction of the one-byte header for mapped objects
was a bad move because it changes the alignment of mapped objects.

This also simplifies the code a bit. The downside is of course
that this changes the on-disk data format. But hey, this stuff
is still pre-beta, so..

11 years agoAdd missing dependency.
Andre Noll [Wed, 18 Jun 2008 13:35:36 +0000 (15:35 +0200)]
Add missing dependency.

11 years agoChange type of struct osl_column_description->storage_{type,flags}.
Andre Noll [Fri, 6 Jun 2008 16:13:38 +0000 (18:13 +0200)]
Change type of struct osl_column_description->storage_{type,flags}.

These values get stored in the table index header as 16 bit
quantities, so it does not make sense to use a different size
for the structure.

11 years agoChange type of struct osl_table_description->flags to uint8_t.
Andre Noll [Fri, 6 Jun 2008 15:45:39 +0000 (17:45 +0200)]
Change type of struct osl_table_description->flags to uint8_t.

We reserve only one byte in the index header of the table, so it
does not make sense to have this field of type enum.

Fixes:

fsck.c:815: warning: dereferencing type-punned pointer will break strict-aliasing rules

11 years agoRename the _S macro to OSL_ERROR.
Andre Noll [Fri, 6 Jun 2008 15:24:57 +0000 (17:24 +0200)]
Rename the _S macro to OSL_ERROR.

On NetBSD, _S is already defined.

11 years agoLet all source files depend on errtab.h
Andre Noll [Fri, 6 Jun 2008 15:24:16 +0000 (17:24 +0200)]
Let all source files depend on errtab.h

11 years agoAdd Makefile magic for NetBSD.
Andre Noll [Fri, 6 Jun 2008 15:01:10 +0000 (17:01 +0200)]
Add Makefile magic for NetBSD.

11 years agoMerge commit 'fml/master'
Andre Noll [Fri, 6 Jun 2008 14:46:50 +0000 (16:46 +0200)]
Merge commit 'fml/master'

11 years agofsck objects depend on osl.h.
Andre Noll [Fri, 6 Jun 2008 14:45:41 +0000 (16:45 +0200)]
fsck objects depend on osl.h.

11 years agoSimplify Makefile.
Andre Noll [Fri, 6 Jun 2008 14:21:29 +0000 (16:21 +0200)]
Simplify Makefile.

Only MacOS needs the braindead .dylib Filenames.

11 years agoSolaris fixes.
Andre Noll [Fri, 6 Jun 2008 13:49:56 +0000 (15:49 +0200)]
Solaris fixes.

11 years agoRename fd.[ch] to util.[ch].
Andre Noll [Fri, 6 Jun 2008 12:54:37 +0000 (14:54 +0200)]
Rename fd.[ch] to util.[ch].

It contains not only fd-related stuff.

11 years agoCosmetics.
Andre Noll [Fri, 6 Jun 2008 12:51:01 +0000 (14:51 +0200)]
Cosmetics.

11 years agoRemove list.h.
Andre Noll [Fri, 6 Jun 2008 12:47:12 +0000 (14:47 +0200)]
Remove list.h.

osl does not use lists.

11 years agoMove and rename para_opendir().
Andre Noll [Fri, 6 Jun 2008 12:43:19 +0000 (14:43 +0200)]
Move and rename para_opendir().

11 years agoInline para_fchdir(), move it to fsck.c and rename it.
Andre Noll [Fri, 6 Jun 2008 12:36:42 +0000 (14:36 +0200)]
Inline para_fchdir(), move it to fsck.c and rename it.

11 years agoRename para_chdir() and make it an inline function.
Andre Noll [Fri, 6 Jun 2008 12:31:40 +0000 (14:31 +0200)]
Rename para_chdir() and make it an inline function.

11 years agofsck.c depends on errtab.h.
Andre Noll [Fri, 6 Jun 2008 12:23:00 +0000 (14:23 +0200)]
fsck.c depends on errtab.h.

11 years agoKill E_OSL_TRUNC.
Andre Noll [Fri, 6 Jun 2008 12:22:42 +0000 (14:22 +0200)]
Kill E_OSL_TRUNC.

11 years agoGet rid of E_OSL_STAT.
Andre Noll [Fri, 6 Jun 2008 09:43:43 +0000 (11:43 +0200)]
Get rid of E_OSL_STAT.

Use system error code instead.

11 years agoRename para_truncate() to truncate_file().
Andre Noll [Fri, 6 Jun 2008 09:36:17 +0000 (11:36 +0200)]
Rename para_truncate() to truncate_file().

11 years agoMove para_truncate from osl.c to fd.c.
Andre Noll [Fri, 6 Jun 2008 09:34:50 +0000 (11:34 +0200)]
Move para_truncate from osl.c to fd.c.

11 years agofsck: Rename para_malloc() and friends.
Andre Noll [Fri, 6 Jun 2008 09:33:22 +0000 (11:33 +0200)]
fsck: Rename para_malloc() and friends.

11 years agofsck: --database-dir is required, no need to set defaults.
Andre Noll [Fri, 6 Jun 2008 09:23:14 +0000 (11:23 +0200)]
fsck: --database-dir is required, no need to set defaults.

11 years agoDo not use gengetopt's --version output.
Andre Noll [Fri, 6 Jun 2008 09:20:35 +0000 (11:20 +0200)]
Do not use gengetopt's --version output.

11 years agoReformat fsck.ggo and add more help text.
Andre Noll [Fri, 6 Jun 2008 09:18:14 +0000 (11:18 +0200)]
Reformat fsck.ggo and add more help text.

11 years agoAdd .gitignore.
Andre Noll [Fri, 6 Jun 2008 09:04:43 +0000 (11:04 +0200)]
Add .gitignore.