From 54ccf7266a5a7a176ee37cdc1b9e57cccd2a4028 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Wed, 11 May 2016 14:54:50 +0200 Subject: [PATCH] smbfs can be identified by checking the volume node disk type field The signature "SMB\0" is now stored in DosList->dol_misc.dol_volume.dol_DiskType, which can be obtained through Info() or by walking through the data structures associated with a FileLock. This was suggested by Chris Handley and Chris Young. Thank you very much! --- source_code/main.c | 8 +++++++- source_code/smbfs.h | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/source_code/main.c b/source_code/main.c index 778430f..252fae2 100644 --- a/source_code/main.c +++ b/source_code/main.c @@ -2774,7 +2774,13 @@ Setup( VolumeNode->dol_Task = FileSystemPort; DateStamp(&VolumeNode->dol_misc.dol_volume.dol_VolumeDate); - VolumeNode->dol_misc.dol_volume.dol_DiskType = ID_DOS_DISK; + + /* Allow the file system to be identified by looking at the + * contents of the volume node. We put "SMB\0" into the + * dol_DiskType field. This was suggested by Chris Handley + * and Chris Young. Thank you very much! + */ + VolumeNode->dol_misc.dol_volume.dol_DiskType = ID_SMB_DISK; if(DeviceNode != NULL) { diff --git a/source_code/smbfs.h b/source_code/smbfs.h index de9279d..e534cc9 100644 --- a/source_code/smbfs.h +++ b/source_code/smbfs.h @@ -79,6 +79,13 @@ /*****************************************************************************/ +/* smbfs file system signature (SMB\0), as suggested by Chris Handley + * and Chris Young. + */ +#define ID_SMB_DISK 0x534D4200 + +/*****************************************************************************/ + #ifndef min #define min(a,b) ((a) < (b) ? (a) : (b)) #endif /* min */