git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
daemon/gnulib: Include glob module.
[libguestfs.git]
/
fuse
/
dircache.c
diff --git
a/fuse/dircache.c
b/fuse/dircache.c
index
545b9f3
..
86760f0
100644
(file)
--- a/
fuse/dircache.c
+++ b/
fuse/dircache.c
@@
-37,17
+37,9
@@
#include "hash.h"
#include "hash-pjw.h"
#include "hash.h"
#include "hash-pjw.h"
+#include "guestmount.h"
#include "dircache.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
/* 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
@@
-100,7
+92,7
@@
gen_compare (void const *x, void const *y)
{
struct lsc_entry const *a = x;
struct lsc_entry const *b = y;
{
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
}
static void
@@
-250,7
+242,7
@@
lsc_insert (const char *path, const char *name, time_t now,
free (entry);
return -1;
}
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);
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
@@
-285,7
+277,7
@@
xac_insert (const char *path, const char *name, time_t now,
free (entry);
return -1;
}
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);
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
@@
-320,7
+312,7
@@
rlc_insert (const char *path, const char *name, time_t now,
free (entry);
return -1;
}
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);
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);