Lines Matching refs:fd

59   int fd;  in _dbus_file_get_contents()  local
70 fd = open (filename_c, O_RDONLY | O_BINARY); in _dbus_file_get_contents()
71 if (fd < 0) in _dbus_file_get_contents()
80 _dbus_verbose ("file fd %d opened\n", fd); in _dbus_file_get_contents()
82 if (fstat (fd, &sb) < 0) in _dbus_file_get_contents()
92 _dbus_close (fd, NULL); in _dbus_file_get_contents()
102 _dbus_close (fd, NULL); in _dbus_file_get_contents()
114 bytes_read = _dbus_read (fd, str, in _dbus_file_get_contents()
126 _dbus_close (fd, NULL); in _dbus_file_get_contents()
134 _dbus_close (fd, NULL); in _dbus_file_get_contents()
143 _dbus_close (fd, NULL); in _dbus_file_get_contents()
148 _dbus_close (fd, NULL); in _dbus_file_get_contents()
169 int fd; in _dbus_string_save_to_file() local
180 fd = -1; in _dbus_string_save_to_file()
215 fd = open (tmp_filename_c, O_WRONLY | O_BINARY | O_EXCL | O_CREAT, in _dbus_string_save_to_file()
217 if (fd < 0) in _dbus_string_save_to_file()
230 if (fchmod (fd, 0644) < 0) in _dbus_string_save_to_file()
239 _dbus_verbose ("tmp file fd %d opened\n", fd); in _dbus_string_save_to_file()
250 bytes_written = _dbus_write (fd, str, total, in _dbus_string_save_to_file()
265 if (fsync(fd)) in _dbus_string_save_to_file()
274 if (!_dbus_close (fd, NULL)) in _dbus_string_save_to_file()
283 fd = -1; in _dbus_string_save_to_file()
304 if (fd >= 0) in _dbus_string_save_to_file()
305 _dbus_close (fd, NULL); in _dbus_string_save_to_file()
356 int fd; in _dbus_create_file_exclusively() local
363 fd = open (filename_c, O_WRONLY | O_BINARY | O_EXCL | O_CREAT, in _dbus_create_file_exclusively()
365 if (fd < 0) in _dbus_create_file_exclusively()
375 _dbus_verbose ("exclusive file fd %d opened\n", fd); in _dbus_create_file_exclusively()
377 if (!_dbus_close (fd, NULL)) in _dbus_create_file_exclusively()