Displaying 5 results from an estimated 5 matches for "lsc_insert".
2012 Mar 28
2
[PATCH v2] New APIs: mount-local and umount-local using FUSE
This version doesn't crash or cause hung processes or stuck
mountpoints, so that's an improvement.
Rich.
2012 Mar 27
3
[PATCH 0/3] Enable FUSE support in the API via 'mount-local' call.
This patch is just for review.
It enables FUSE support in the API via two new calls,
'guestfs_mount_local' and 'guestfs_umount_local'.
FUSE turns out to be very easy to deadlock (necessitating that the
machine be rebooted). Running the test from the third patch is
usually an effective way to demonstrate this. However I have not yet
managed to produce a simple reproducer that
2012 Mar 29
3
[PATCH v3] New APIs: mount-local, mount-local-run and umount-local using FUSE
This changes the proposed API slightly.
Previously 'mount-local' generating a 'mounted' event when the
filesystem was ready, and from the 'mounted' event you had to
effectively do a fork.
Now, 'mount-local' just initializes the mountpoint and you have to
call 'mount-local-run' to enter the FUSE main loop. Between these
calls you can do a fork or whatever
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+ statbuf.st_mtim.tv_nsec = ss->val[i].st_mtime_nsec;
+#endif
+ statbuf.st_ctime = ss->val[i].st_ctime_sec;
+#ifdef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC
+ statbuf.st_ctim.tv_nsec = ss->val[i].st_ctime_nsec;
+#endif
lsc_insert (g, path, names[i], now, &statbuf);
}
@@ -246,7 +255,7 @@ static int
mount_local_getattr (const char *path, struct stat *statbuf)
{
const struct stat *buf;
- CLEANUP_FREE_STAT struct guestfs_stat *r = NULL;
+ CLEANUP_FREE_STAT struct guestfs_statns *r = NULL;
DECL_G ();
DE...
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...+++ b/fuse/dircache.c
@@ -100,7 +100,7 @@ gen_compare (void const *x, void const *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
@@ -250,7 +250,7 @@ lsc_insert (const char *path, const char *name, time_t now,
free (entry);
return -1;
}
- if (strcmp (path, "/") == 0)
+ if (STREQ (path, "/"))
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", p...