示例#1
0
        internal NVMeSmart(StorageInfo storageInfo)
        {
            _driveNumber = storageInfo.Index;
            NVMeDrive    = null;

            // Test samsung protocol.

            // Exclude Samsung 980 Pro, this SSD uses the NVMeWindows generic protocol.
            // Samsung 980 Pro can accessed via IdentifyDevice and IdentifyController but not by HealthInfoLog.
            if (NVMeDrive == null && storageInfo.Name.IndexOf("Samsung", StringComparison.OrdinalIgnoreCase) > -1 && storageInfo.Name.IndexOf("980 Pro", StringComparison.OrdinalIgnoreCase) == -1)
            {
                _handle = NVMeSamsung.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeSamsung();
                }
            }

            // Test Intel protocol.
            if (NVMeDrive == null && storageInfo.Name.IndexOf("Intel", StringComparison.OrdinalIgnoreCase) > -1)
            {
                _handle = NVMeIntel.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeIntel();
                }
            }

            // Test Intel raid protocol.
            if (NVMeDrive == null && storageInfo.Name.IndexOf("Intel", StringComparison.OrdinalIgnoreCase) > -1)
            {
                _handle = NVMeIntelRst.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeIntelRst();
                }
            }

            // Test Windows generic driver protocol.
            if (NVMeDrive == null)
            {
                _handle = NVMeWindows.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeWindows();
                }
            }
        }
        internal NVMeSmart(StorageInfo storageInfo)
        {
            _driveNumber = storageInfo.Index;
            NVMeDrive    = null;
            string name = storageInfo.Name;

            // Test Samsung protocol.
            if (NVMeDrive == null && name.IndexOf("Samsung", StringComparison.OrdinalIgnoreCase) > -1)
            {
                _handle = NVMeSamsung.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeSamsung();
                }
            }

            // Test Intel protocol.
            if (NVMeDrive == null && name.IndexOf("Intel", StringComparison.OrdinalIgnoreCase) > -1)
            {
                _handle = NVMeIntel.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeIntel();
                }
            }

            // Test Intel raid protocol.
            if (NVMeDrive == null && name.IndexOf("Intel", StringComparison.OrdinalIgnoreCase) > -1)
            {
                _handle = NVMeIntelRst.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeIntelRst();
                }
            }

            // Test Windows generic driver protocol.
            if (NVMeDrive == null)
            {
                _handle = NVMeWindows.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeWindows();
                }
            }
        }
示例#3
0
        internal NVMeSmart(StorageInfo storageInfo)
        {
            _driveNumber = storageInfo.Index;
            NVMeDrive    = null;

            //test samsung protocol
            if (NVMeDrive == null && storageInfo.Name.ToLower().Contains("samsung"))
            {
                _handle = NVMeSamsung.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeSamsung();
                }
            }

            //test intel protocol
            if (NVMeDrive == null && storageInfo.Name.ToLower().Contains("intel"))
            {
                _handle = NVMeIntel.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeIntel();
                }
            }

            //test intel raid protocol
            if (NVMeDrive == null && storageInfo.Name.ToLower().Contains("intel"))
            {
                _handle = NVMeIntelRst.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeIntelRst();
                }
            }

            //test windows generic driver protocol
            if (NVMeDrive == null)
            {
                _handle = NVMeWindows.IdentifyDevice(storageInfo);
                if (_handle != null)
                {
                    NVMeDrive = new NVMeWindows();
                }
            }
        }
示例#4
0
        //intel nvme access

        public SafeHandle Identify(StorageInfo storageInfo)
        {
            return(NVMeWindows.IdentifyDevice(storageInfo));
        }