]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
move write_string_to_file outside so that it can be use outside bind
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Thu, 9 Apr 2009 11:56:51 +0000 (12:56 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Thu, 9 Apr 2009 11:56:51 +0000 (12:56 +0100)
xenops/device.ml

index 329aae46f9db8f49d2d5c210b68d10573141ef1f..7f080e5972e7d7a64c15f06f3e8520cb5ebb5851 100644 (file)
@@ -917,11 +917,11 @@ let release ~xc ~xs ~hvm pcidevs domid devid =
        ) pcidevs;
        ()
 
+let write_string_to_file file s =
+       let fn_write_string fd = Unixext.really_write fd s 0 (String.length s) in
+       Unixext.with_file file [ Unix.O_WRONLY ] 0o640 fn_write_string
+
 let bind pcidevs =
-       let write_string_to_file file s =
-               let fn_write_string fd = Unixext.really_write fd s 0 (String.length s) in
-               Unixext.with_file file [ Unix.O_WRONLY ] 0o640 fn_write_string
-               in
        let bind_to_pciback device =
                let newslot = "/sys/bus/pci/drivers/pciback/new_slot" in
                let bind =  "/sys/bus/pci/drivers/pciback/bind" in