#include "hash.h"
#include "hash-pjw.h"
+#include "guestmount.h"
#include "dircache.h"
-extern int verbose;
-extern int dir_cache_timeout;
-
-static inline char *
-bad_cast (char const *s)
-{
- return (char *) s;
-}
-
/* Note on attribute caching: FUSE can cache filesystem attributes for
* short periods of time (configurable via -o attr_timeout). It
* doesn't cache xattrs, and in any case FUSE caching doesn't solve
{
struct lsc_entry const *a = x;
struct lsc_entry const *b = y;
- return strcmp (a->pathname, b->pathname) == 0;
+ return STREQ (a->pathname, b->pathname);
}
static void
rlc_ht = hash_initialize (1024, NULL, gen_hash, gen_compare, rlc_free);
if (!lsc_ht || !xac_ht || !rlc_ht) {
fprintf (stderr, "guestmount: could not initialize dir cache hashtables\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
}
free (entry);
return -1;
}
- if (strcmp (path, "/") == 0)
+ if (STREQ (path, "/"))
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
free (entry);
return -1;
}
- if (strcmp (path, "/") == 0)
+ if (STREQ (path, "/"))
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
free (entry);
return -1;
}
- if (strcmp (path, "/") == 0)
+ if (STREQ (path, "/"))
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);