public RPCResult <tysos.Interfaces.IFileSystem> CreateFSHandler(tysos.lib.File src) { // Get the properties of the source file tysos.lib.File.Property[] props = src.GetAllProperties(); if (props == null) { props = new tysos.lib.File.Property[] { } } ; // Ensure the device is a pciide device tysos.lib.File.Property driver = src.GetPropertyByName("driver"); if (driver == null || driver.Value == null || !(driver.Value is string) || ((string)driver.Value).Equals("ata") == false) { System.Diagnostics.Debugger.Log(0, "ata", "driver property is invalid"); return(null); } // Get the subdriver string subdriver_str = ""; tysos.lib.File.Property subdriver = src.GetPropertyByName("subdriver"); if (subdriver != null && subdriver.Value != null && (subdriver.Value is string)) { subdriver_str = subdriver.Value as string; } System.Diagnostics.Debugger.Log(0, "ata", "subdriver " + subdriver_str + " not found"); ata fs = new ata(props); tysos.Process p = tysos.Process.CreateProcess("ata: " + src.Name, new System.Threading.ThreadStart(fs.MessageLoop), new object[] { fs }); p.Start(); return(fs); } }
internal Drive(ata.DeviceInfo devinfo, ata atadev) { d = devinfo; a = atadev; }