/external/crosvm/crosvm_control/src/ |
D | lib.rs | 20 fn validate_socket_path(socket_path: *const c_char) -> Option<PathBuf> { in validate_socket_path() 21 if !socket_path.is_null() { in validate_socket_path() 22 let socket_path = unsafe { CStr::from_ptr(socket_path) }; in validate_socket_path() localVariable 23 Some(PathBuf::from(socket_path.to_str().ok()?)) in validate_socket_path() 33 pub extern "C" fn crosvm_client_stop_vm(socket_path: *const c_char) -> bool { in crosvm_client_stop_vm() 35 if let Some(socket_path) = validate_socket_path(socket_path) { in crosvm_client_stop_vm() 36 vms_request(&VmRequest::Exit, &socket_path).is_ok() in crosvm_client_stop_vm() 48 pub extern "C" fn crosvm_client_suspend_vm(socket_path: *const c_char) -> bool { in crosvm_client_suspend_vm() 50 if let Some(socket_path) = validate_socket_path(socket_path) { in crosvm_client_suspend_vm() 51 vms_request(&VmRequest::Suspend, &socket_path).is_ok() in crosvm_client_suspend_vm() [all …]
|
/external/crosvm/vm_control/src/ |
D | client.rs | 68 pub fn vms_request(request: &VmRequest, socket_path: &Path) -> VmsRequestResult { in vms_request() 69 let response = handle_request(request, socket_path)?; in vms_request() 75 socket_path: &Path, in do_usb_attach() 102 handle_request(&request, socket_path).map_err(|_| ModifyUsbError::SocketFailed)?; in do_usb_attach() 109 pub fn do_usb_detach(socket_path: &Path, port: u8) -> ModifyUsbResult<UsbControlResult> { in do_usb_detach() 112 handle_request(&request, socket_path).map_err(|_| ModifyUsbError::SocketFailed)?; in do_usb_detach() 119 pub fn do_usb_list(socket_path: &Path) -> ModifyUsbResult<UsbControlResult> { in do_usb_list() 126 handle_request(&request, socket_path).map_err(|_| ModifyUsbError::SocketFailed)?; in do_usb_list() 136 socket_path: &Path, in do_modify_battery() 145 Ok(handle_request(&request, socket_path)?) in do_modify_battery() [all …]
|
/external/e2fsprogs/misc/ |
D | uuidd.c | 143 static int call_daemon(const char *socket_path, int op, char *buf, in call_daemon() argument 167 strncpy(srv_addr.sun_path, socket_path, sizeof(srv_addr.sun_path)); in call_daemon() 230 static void server_loop(const char *socket_path, const char *pidfile_path, in server_loop() argument 268 ret = call_daemon(socket_path, 0, reply_buf, sizeof(reply_buf), 0, 0); in server_loop() 300 strncpy(my_addr.sun_path, socket_path, sizeof(my_addr.sun_path)); in server_loop() 302 (void) unlink(socket_path); in server_loop() 309 socket_path, strerror(errno)); in server_loop() 317 "socket %s: %s\n"), socket_path, in server_loop() 322 cleanup_socket = socket_path; in server_loop() 445 const char *socket_path = UUIDD_SOCKET_PATH; in main() local [all …]
|
/external/crosvm/base/src/unix/ |
D | net.rs | 899 let mut socket_path = tmpdir(); in unix_seqpacket_listener_path() localVariable 900 socket_path.push("unix_seqpacket_listener_path"); in unix_seqpacket_listener_path() 902 UnixSeqpacketListener::bind(&socket_path) in unix_seqpacket_listener_path() 906 assert_eq!(socket_path, listener_path); in unix_seqpacket_listener_path() 911 let mut socket_path = tmpdir(); in unix_seqpacket_path_exists_pass() localVariable 912 socket_path.push("path_to_socket"); in unix_seqpacket_path_exists_pass() 914 UnixSeqpacketListener::bind(&socket_path) in unix_seqpacket_path_exists_pass() 918 UnixSeqpacket::connect(socket_path.as_path()).expect("UnixSeqpacket::connect failed"); in unix_seqpacket_path_exists_pass() 923 let mut socket_path = tmpdir(); in unix_seqpacket_path_listener_accept_with_timeout() localVariable 924 socket_path.push("path_listerner_accept_with_timeout"); in unix_seqpacket_path_listener_accept_with_timeout() [all …]
|
/external/crosvm/common/sys_util/src/ |
D | net.rs | 898 let mut socket_path = tmpdir(); in unix_seqpacket_listener_path() localVariable 899 socket_path.push("unix_seqpacket_listener_path"); in unix_seqpacket_listener_path() 901 UnixSeqpacketListener::bind(&socket_path) in unix_seqpacket_listener_path() 905 assert_eq!(socket_path, listener_path); in unix_seqpacket_listener_path() 910 let mut socket_path = tmpdir(); in unix_seqpacket_path_exists_pass() localVariable 911 socket_path.push("path_to_socket"); in unix_seqpacket_path_exists_pass() 913 UnixSeqpacketListener::bind(&socket_path) in unix_seqpacket_path_exists_pass() 917 UnixSeqpacket::connect(socket_path.as_path()).expect("UnixSeqpacket::connect failed"); in unix_seqpacket_path_exists_pass() 922 let mut socket_path = tmpdir(); in unix_seqpacket_path_listener_accept_with_timeout() localVariable 923 socket_path.push("path_listerner_accept_with_timeout"); in unix_seqpacket_path_listener_accept_with_timeout() [all …]
|
/external/crosvm/src/ |
D | main.rs | 1557 if cfg.socket_path.is_some() { in set_argument() 1562 let mut socket_path = PathBuf::from(value.unwrap()); in set_argument() localVariable 1563 if socket_path.is_dir() { in set_argument() 1564 socket_path.push(format!("crosvm-{}.sock", getpid())); in set_argument() 1566 if socket_path.exists() { in set_argument() 1568 value: socket_path.to_string_lossy().into_owned(), in set_argument() 1572 cfg.socket_path = Some(socket_path); in set_argument() 2905 let socket_path = &args.next().unwrap(); in stop_vms() localVariable 2906 let socket_path = Path::new(&socket_path); in stop_vms() localVariable 2907 vms_request(&VmRequest::Exit, socket_path) in stop_vms() [all …]
|
D | crosvm.rs | 381 pub socket_path: Option<PathBuf>, field 508 socket_path: None, in default()
|
/external/autotest/client/cros/crash/crasher/ |
D | crasher.cc | 27 bool SendPid(const char *socket_path); 47 bool SendPid(const char *socket_path) { in SendPid() argument 60 strncpy(address.sun_path, socket_path, sizeof(address.sun_path) - 1); in SendPid()
|
/external/crosvm/common/cros_asyncv2/src/unix/ |
D | seqpacket.rs | 702 let mut socket_path = env::temp_dir(); in unix_seqpacket_listener_path() localVariable 703 socket_path.push("unix_seqpacket_listener_path"); in unix_seqpacket_listener_path() 705 SeqPacketListener::bind(&socket_path).expect("failed to create SeqPacketListener"), in unix_seqpacket_listener_path() 708 assert_eq!(socket_path, listener_path); in unix_seqpacket_listener_path() 715 let mut socket_path = env::temp_dir(); in unix_seqpacket_path_exists_pass() localVariable 716 socket_path.push("path_to_socket"); in unix_seqpacket_path_exists_pass() 718 SeqPacketListener::bind(&socket_path) in unix_seqpacket_path_exists_pass() 721 let _res = SeqPacket::connect(socket_path.as_path()) in unix_seqpacket_path_exists_pass() 732 let mut socket_path = env::temp_dir(); in unix_seqpacket_path_listener_accept() localVariable 733 socket_path.push("path_listerner_accept"); in unix_seqpacket_path_listener_accept() [all …]
|
/external/ltp/testcases/kernel/security/tomoyo/ |
D | tomoyo_file_test.c | 72 static const char *socket_path = "/tmp/socket_test"; variable 185 strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path) - 1); in stage_file_test() 226 unlink(socket_path); in creanup_files()
|
/external/wpa_supplicant_8/hostapd/ |
D | hlr_auc_gw.c | 62 static const char *socket_path; variable 953 if (socket_path) in cleanup() 954 unlink(socket_path); in cleanup() 1014 socket_path = default_socket_path; in main() 1046 socket_path = optarg; in main() 1074 serv_sock = open_socket(socket_path); in main() 1078 printf("Listening for requests on %s\n", socket_path); in main() 1088 socket_path = NULL; in main()
|
/external/crosvm/devices/src/virtio/vhost/user/vmm/ |
D | wl.rs | 27 pub fn new<P: AsRef<Path>>(base_features: u64, socket_path: P) -> Result<Wl> { in new() 40 socket_path, in new()
|
D | snd.rs | 34 pub fn new<P: AsRef<Path>>(base_features: u64, socket_path: P) -> Result<Snd> { in new() 35 let socket = UnixStream::connect(&socket_path).map_err(Error::SocketConnect)?; in new()
|
D | console.rs | 26 pub fn new<P: AsRef<Path>>(base_features: u64, socket_path: P) -> Result<Console> { in new() 27 let socket = UnixStream::connect(&socket_path).map_err(Error::SocketConnect)?; in new()
|
D | vsock.rs | 28 pub fn new<P: AsRef<Path>>(base_features: u64, socket_path: P) -> Result<Vsock> { in new() 29 let socket = UnixStream::connect(socket_path).map_err(Error::SocketConnect)?; in new()
|
D | mac80211_hwsim.rs | 44 pub fn new<P: AsRef<Path>>(base_features: u64, socket_path: P) -> Result<Mac80211Hwsim, Error> { in new() 45 let socket = UnixStream::connect(&socket_path).map_err(Error::SocketConnect)?; in new()
|
D | block.rs | 36 pub fn new<P: AsRef<Path>>(base_features: u64, socket_path: P) -> Result<Block> { in new() 37 let socket = UnixStream::connect(&socket_path).map_err(Error::SocketConnect)?; in new()
|
D | net.rs | 32 pub fn new<P: AsRef<Path>>(base_features: u64, socket_path: P) -> Result<Net> { in new() 33 let socket = UnixStream::connect(&socket_path).map_err(Error::SocketConnect)?; in new()
|
D | fs.rs | 29 pub fn new<P: AsRef<Path>>(base_features: u64, socket_path: P, tag: &str) -> Result<Fs> { in new() 49 let socket = UnixStream::connect(&socket_path).map_err(Error::SocketConnect)?; in new()
|
D | gpu.rs | 57 socket_path: P, in new() 77 socket_path, in new()
|
/external/crosvm/src/linux/ |
D | gpu.rs | 177 if let Some(socket_path) = wayland_socket_path { in create_gpu_device() 180 virtio::DisplayBackend::Wayland(Some(socket_path.to_owned())), in create_gpu_device()
|
D | mod.rs | 1056 let control_server_socket = match &cfg.socket_path { in run_vm()
|
/external/crosvm/gpu_display/src/ |
D | dwl.rs | 102 socket_path: *const ::std::os::raw::c_char, in dwl_context_setup()
|
D | display_wl.c | 736 bool dwl_context_setup(struct dwl_context *self, const char *socket_path) in dwl_context_setup() argument 738 struct wl_display *display = wl_display_connect(socket_path); in dwl_context_setup()
|