X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libatalk%2Fcnid%2Flast%2Fcnid_last.c;h=5903d03fe449da281238818e9501c57e812cf9f1;hb=be96d276348da0a7e66eeec844b306e8a5fa8fac;hp=98fb0cfc28ba4e52c42734948e19dce0f8efb524;hpb=ecfc96169ab669b578e53fa8e13592934fe37788;p=netatalk.git diff --git a/libatalk/cnid/last/cnid_last.c b/libatalk/cnid/last/cnid_last.c index 98fb0cfc..5903d03f 100644 --- a/libatalk/cnid/last/cnid_last.c +++ b/libatalk/cnid/last/cnid_last.c @@ -1,6 +1,6 @@ /* - * $Id: cnid_last.c,v 1.2 2005-04-28 20:50:01 bfernhomberg Exp $ + * $Id: cnid_last.c,v 1.5 2010-03-31 09:47:32 franklahm Exp $ * * Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu) * All Rights Reserved. See COPYRIGHT. @@ -20,10 +20,11 @@ #include #include #include +#include /* ------------------------ */ cnid_t cnid_last_add(struct _cnid_db *cdb, const struct stat *st, - const cnid_t did, char *name, const int len, cnid_t hint) + cnid_t did _U_, const char *name _U_, size_t len _U_, cnid_t hint _U_) { /* FIXME: it relies on fact, that this is never called twice for the same file/dir. */ @@ -80,15 +81,14 @@ void cnid_last_close(struct _cnid_db *cdb) -int cnid_last_delete(struct _cnid_db *cdb, const cnid_t id) +int cnid_last_delete(struct _cnid_db *cdb _U_, const cnid_t id _U_) { return CNID_INVALID; } - /* Return CNID for a given did/name. */ -cnid_t cnid_last_get(struct _cnid_db *cdb, const cnid_t did, char *name, const int len) +cnid_t cnid_last_get(struct _cnid_db *cdb _U_, cnid_t did _U_, const char *name _U_, size_t len _U_) { /* FIXME: it relies on fact, that this is never called twice for the same file/dir. */ /* Propably we should look through DID tree. */ @@ -96,9 +96,9 @@ cnid_t cnid_last_get(struct _cnid_db *cdb, const cnid_t did, char *name, const i } - /* */ -cnid_t cnid_last_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const int len) +cnid_t cnid_last_lookup(struct _cnid_db *cdb _U_, const struct stat *st _U_, cnid_t did _U_, + const char *name _U_, size_t len _U_) { /* FIXME: this function doesn't work in [last] scheme ! */ /* Should be never called or CNID should be somewhat refactored again. */ @@ -143,15 +143,15 @@ static struct _cnid_db *cnid_last_new(const char *volpath) return cdb; } -struct _cnid_db *cnid_last_open(const char *dir, mode_t mask) +struct _cnid_db *cnid_last_open(struct cnid_open_args *args) { struct _cnid_db *cdb; - if (!dir) { + if (!args->dir) { return NULL; } - if ((cdb = cnid_last_new(dir)) == NULL) { + if ((cdb = cnid_last_new(args->dir)) == NULL) { LOG(log_error, logtype_default, "cnid_open: Unable to allocate memory for database"); return NULL; } @@ -167,16 +167,15 @@ struct _cnid_module cnid_last_module = { }; /* Return the did/name pair corresponding to a CNID. */ -char *cnid_last_resolve(struct _cnid_db *cdb, cnid_t * id, void *buffer, u_int32_t len) +char *cnid_last_resolve(struct _cnid_db *cdb _U_, cnid_t * id _U_, void *buffer _U_, size_t len _U_) { /* FIXME: frankly, it does not work. As get, add and other functions. */ return NULL; } -int cnid_last_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st, - const cnid_t did, char *name, const int len - /*, const char *info, const int infolen */ ) +int cnid_last_update(struct _cnid_db *cdb _U_, cnid_t id _U_, const struct stat *st _U_, + cnid_t did _U_, const char *name _U_, size_t len _U_) { return 0; }