Esempio n. 1
0
        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("pciide") == false)
            {
                System.Diagnostics.Debugger.Log(0, "pciide", "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, "pciide", "subdriver " + subdriver_str + " not found");

            pciide.DriverType dt = pciide.DriverType.Unknown;
            if (subdriver_str == "legacy")
            {
                dt = pciide.DriverType.Legacy;
            }
            else if (subdriver_str == "pcinative")
            {
                dt = pciide.DriverType.PCINative;
            }

            pciide fs = new pciide(props, dt);

            tysos.Process p = tysos.Process.CreateProcess("pciide: " + src.Name,
                                                          new System.Threading.ThreadStart(fs.MessageLoop), new object[] { fs });
            p.Start();

            return(fs);
        }
    }
Esempio n. 2
0
        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 PCI device
            tysos.lib.File.Property driver = src.GetPropertyByName("driver");
            if (driver == null || driver.Value == null || !(driver.Value is string) || ((string)driver.Value).Equals("pci") == false)
            {
                System.Diagnostics.Debugger.Log(0, "pci", "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;
            }

            if (subdriver_str == "hostbridge")
            {
                // Create and execute a handler in a separate address space
                hostbridge    fs = new hostbridge(props);
                tysos.Process p  = tysos.Process.CreateProcess("pci: " + src.Name,
                                                               new System.Threading.ThreadStart(fs.MessageLoop), new object[] { fs });
                p.Start();

                System.Diagnostics.Debugger.Log(0, "pci", "Created FS handler\n");
                return(fs);
            }

            System.Diagnostics.Debugger.Log(0, "pci", "subdriver " + subdriver_str + " not found");
            return(null);
        }
    }
Esempio n. 3
0
        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[] { }
            }
            ;

            // Create and execute a handler in a separate address space
            acpipc fs = new acpipc(props);

            tysos.Process p = tysos.Process.CreateProcess("acpipc: " + src.Name,
                                                          new System.Threading.ThreadStart(fs.MessageLoop), new object[] { fs });
            p.Start();

            System.Diagnostics.Debugger.Log(0, "acpipc", "Created FS handler\n");
            return(fs);
        }
    }