Author: adrian.chadd
Date: Tue Apr 28 01:03:27 2009
New Revision: 14002

Modified:
    branches/LUSCA_HEAD/libsqstore/store_file_ufs.c
    branches/LUSCA_HEAD/libsqstore/store_file_ufs.h

Log:
Flesh out some UFS storedir state stuff.



Modified: branches/LUSCA_HEAD/libsqstore/store_file_ufs.c
==============================================================================
--- branches/LUSCA_HEAD/libsqstore/store_file_ufs.c     (original)
+++ branches/LUSCA_HEAD/libsqstore/store_file_ufs.c     Tue Apr 28 01:03:27 2009
@@ -5,6 +5,7 @@

  #include "../include/config.h"
  #include "../include/squid_md5.h"
+#include "../include/util.h"

  #include "../libcore/varargs.h"
  #include "../libcore/kb.h"
@@ -15,6 +16,20 @@

  #include "store_file_ufs.h"

+void
+store_ufs_init(store_ufs_dir_t *sd, const char *path, int l1, int l2)
+{
+       sd->path = xstrdup(path);
+       sd->l1 = l1;
+       sd->l2 = l2;
+}
+
+void
+store_ufs_done(store_ufs_dir_t *sd)
+{
+       safe_free(sd->path);
+}
+
  /*
   * Create a UFS path given the component bits.
   *
@@ -64,4 +79,3 @@
          return 0;
      return 1;
  }
-

Modified: branches/LUSCA_HEAD/libsqstore/store_file_ufs.h
==============================================================================
--- branches/LUSCA_HEAD/libsqstore/store_file_ufs.h     (original)
+++ branches/LUSCA_HEAD/libsqstore/store_file_ufs.h     Tue Apr 28 01:03:27 2009
@@ -1,6 +1,16 @@
  #ifndef       __LIBSQSTORE_STORE_FILE_UFS_H__
  #define       __LIBSQSTORE_STORE_FILE_UFS_H__

+struct _store_ufs_dir {
+       char *path;
+       int l1;
+       int l2;
+};
+typedef struct _store_ufs_dir store_ufs_dir_t;
+
+extern void store_ufs_init(store_ufs_dir_t *sd, const char *path, int l1,  
int l2);
+extern void store_ufs_done(store_ufs_dir_t *sd);
+
  extern int store_ufs_createPath(const char *prefix, int swap_filen, int  
L1, int L2, char *buf);
  extern int store_ufs_createDir(const char *prefix, int L1, int L2, char  
*buf);
  extern int store_ufs_filenum_correct_dir(int fn, int F1, int F2, int L1,  
int L2);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to