]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - fsck.c
Make the loglevels start at zero.
[paraslash.git] / fsck.c
diff --git a/fsck.c b/fsck.c
index 60bd27026cd3c962327d6074ec51b202fb7daea0..04db5de34b11d524dc29a7ae7610225b853308e7 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -474,7 +474,7 @@ static int dummy_compare(const struct osl_object *obj1, const struct osl_object
 
 static unsigned files_pruned;
 
-int prune_disk_storage_file(const char *path, const void *private_data)
+int prune_disk_storage_file(const char *path, void *private_data)
 {
        HASH_TYPE hash[HASH_SIZE];
        unsigned flags = *(unsigned *)private_data;
@@ -534,7 +534,8 @@ static int prune_disk_storage_files(struct osl_table *t)
        PARA_INFO_LOG("looking for unreferenced disk storage files\n");
        FOR_EACH_DISK_STORAGE_COLUMN(i, t, cd) {
                char *dirname = column_filename(t, i);
-               ret = for_each_file_in_dir(dirname, prune_disk_storage_file, &t->desc->flags);
+               ret = for_each_file_in_dir(dirname, prune_disk_storage_file,
+                       (unsigned *)&t->desc->flags);
                free(dirname);
        }
        if (files_pruned)
@@ -935,6 +936,14 @@ static int check_all_tables(char *base_dir)
        return ret;
 }
 
+/**
+ * The praslash database check program.
+ *
+ * \param argc Usual arg count.
+ * \param argv Usual arg vector.
+ *
+ * \return \p EXIT_SUCCESS or \p EXIT_FAILURE.
+ */
 int main(int argc, char **argv)
 {
        int i, ret;