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> ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html