search for: smb_super_mag

Displaying 8 results from an estimated 8 matches for "smb_super_mag".

Did you mean: smb_super_magic
2017 Oct 11
1
[PATCH] common/mlutils: fix f_type comparisons
...ertions(+), 3 deletions(-) diff --git a/common/mlutils/unix_utils-c.c b/common/mlutils/unix_utils-c.c index f8c4f8abe..2afdc9e5f 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 == N...
2017 Oct 04
2
Re: [PATCH v2 2/2] builder: Choose better weights in the planner.
...al (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
..._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 magic.h in /usr/include directory, but not in /usr/include/linux directory. There is no AFS_SUPER_MAGI...
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 after I'd sent v3, but I can add this. Just a note that CIFS_MAGIC_NUMBE...
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.
...+ + 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 +80,7 @@ module StatVFS = struct "guestfs_int_mllib_st...
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.