Displaying 9 results from an estimated 9 matches for "nfs_super_magic".
2017 Oct 11
1
[PATCH] common/mlutils: fix f_type comparisons
...fdc9e5f 100644
--- a/common/mlutils/unix_utils-c.c
+++ b/common/mlutils/unix_utils-c.c
@@ -357,9 +357,9 @@ guestfs_int_mllib_statvfs_is_network_filesystem (value pathv)
#define SMB_SUPER_MAGIC 0x517b
#endif
- return Val_bool (buf.f_type == CIFS_MAGIC_NUMBER ||
- buf.f_type == NFS_SUPER_MAGIC ||
- buf.f_type == SMB_SUPER_MAGIC);
+ return Val_bool ((unsigned int) buf.f_type == CIFS_MAGIC_NUMBER ||
+ (unsigned int) buf.f_type == NFS_SUPER_MAGIC ||
+ (unsigned int) buf.f_type == SMB_SUPER_MAGIC);
#else
return Val_bool (0);
#endif...
2017 Oct 04
2
Re: [PATCH v2 2/2] builder: Choose better weights in the planner.
...E_STATFS
> + struct statfs buf;
> +
> + if (statfs (String_val (pathv), &buf) == -1)
> + unix_error (errno, (char *) "statvfs", pathv);
> +
> + return Val_bool (buf.f_type == 0xff534d42 /* CIFS_MAGIC_NUMBER */ ||
> + buf.f_type == 0x6969 /* NFS_SUPER_MAGIC */ ||
> + buf.f_type == 0x517b /* SMB_SUPER_MAGIC */);
Using linux/magic.h + the constants from it should avoid the hardcoded
numbers, and possibly allow more remote filesystems. Not a big issue
otherwise, anyway.
--
Pino Toscano
2009 Oct 25
2
linux/magic.h
...file.c:141: error: for each function it appears in.)
../../../modules/access/file.c:142: error: ?CODA_SUPER_MAGIC?
undeclared (first use in this function)
../../../modules/access/file.c:143: error: ?NCP_SUPER_MAGIC?
undeclared (first use in this function)
../../../modules/access/file.c:144: error: ?NFS_SUPER_MAGIC?
undeclared (first use in this function)
../../../modules/access/file.c:145: error: ?SMB_SUPER_MAGIC?
undeclared (first use in this function)
make[5]: *** [libaccess_file_plugin_la-file.lo] Error 1
What package is the magic.h belong to? Is the version too old, need be updated?
There is only a mag...
2017 Oct 04
0
Re: [PATCH v2 2/2] builder: Choose better weights in the planner.
On Wed, Oct 04, 2017 at 03:20:53PM +0200, Pino Toscano wrote:
> > + return Val_bool (buf.f_type == 0xff534d42 /* CIFS_MAGIC_NUMBER */ ||
> > + buf.f_type == 0x6969 /* NFS_SUPER_MAGIC */ ||
> > + buf.f_type == 0x517b /* SMB_SUPER_MAGIC */);
>
> Using linux/magic.h + the constants from it should avoid the hardcoded
> numbers, and possibly allow more remote filesystems. Not a big issue
> otherwise, anyway.
I didn't see this email until af...
2017 Oct 02
3
[PATCH 0/2] builder: Choose better weights in the planner.
It started out as "this'll be just a simple fix ..."
and turned into something a bit over-engineered in the end.
Here it is anyway.
Rich.
2017 Oct 03
0
[PATCH v2 2/2] builder: Choose better weights in the planner.
...remote (value pathv)
+{
+#ifdef HAVE_STATFS
+ struct statfs buf;
+
+ if (statfs (String_val (pathv), &buf) == -1)
+ unix_error (errno, (char *) "statvfs", pathv);
+
+ return Val_bool (buf.f_type == 0xff534d42 /* CIFS_MAGIC_NUMBER */ ||
+ buf.f_type == 0x6969 /* NFS_SUPER_MAGIC */ ||
+ buf.f_type == 0x517b /* SMB_SUPER_MAGIC */);
+#else
+ return Val_bool (0);
+#endif
+}
diff --git a/common/mlutils/unix_utils.ml b/common/mlutils/unix_utils.ml
index 085eff65b..e516ba8bb 100644
--- a/common/mlutils/unix_utils.ml
+++ b/common/mlutils/unix_utils.ml
@@ -80,4...
2017 Oct 03
4
[PATCH v2 0/2] builder: Choose better weights in the planner.
v1 -> v2:
- Removed the f_type field from StatVFS.statvfs structure.
- New function StatVFS.filesystem_is_remote, written in C.
[Thinking about it, this should probably be called
?is_network_filesystem?, but I can change that before
pushing].
- Use statvfs instead of fstatvfs, and statfs instead of fstatfs.
- Rejigged the comments in builder/builder.ml to make them simpler
2017 Oct 04
2
[PATCH v3 0/2] builder: Choose better weights in the planner.
v2 -> v3:
- Drop gnulib fallback.
2013 Jul 15
21
[PATCH 00 of 21 RESEND] blktap3/drivers: Introduce tapdisk server.
This patch series copies the core of the tapdisk process from blktap2, with
updates coming from blktap2.5.
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>