On Wednesday, 4 October 2017 15:59:07 CEST Richard W.M. Jones wrote:
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_NUMBER is not present in <linux/magic.h> ...
Ah OK, so I guess it is fine to use the local value for CIFS_MAGIC_NUMBER (maybe as local constant/define). Thanks, -- Pino Toscano