Searched refs:write (Results 101 - 125 of 230) sorted by relevance

12345678910

/fuchsia/zircon/system/ulib/fs/
H A Dwatcher.cpp68 // Only write if we have something to write
69 zx_status_t status = c.write(0, watch_buf_, static_cast<uint32_t>(watch_buf_size_),
159 zx_status_t status = it->h.write(0, msg, static_cast<uint32_t>(sizeof(msg)), nullptr, 0);
/fuchsia/zircon/system/ulib/memfs/
H A Dfile.cpp73 if ((status = vmo_.write(data, offset, writelen)) != ZX_OK) {
82 // short write because we're beyond the end of the permissible length
178 ZX_ASSERT(vmo_.write(buf, start, ppage_size) == ZX_OK);
/fuchsia/zircon/system/ulib/syslog/
H A Dfx_logger.cpp116 auto status = socket_.write(0, &packet, size, nullptr);
185 ssize_t status = write(fd, buf.data(), buf.size());
81 ZX_DEBUG_ASSERT(write_len < 128); packet.data[pos++] = static_cast<char>(write_len); memcpy(packet.data + pos, tag, write_len); pos += write_len; } } packet.data[pos++] = 0; ZX_DEBUG_ASSERT(pos < kDataSize); int n = static_cast<int>(kDataSize - pos); int count = 0; size_t msg_pos = pos; if (!perform_format) { size_t write_len = fbl::min(strlen(msg), static_cast<size_t>(n - 1)); memcpy(packet.data + pos, msg, write_len); pos += write_len; packet.data[pos] = 0; count = static_cast<int>(write_len + 1); } else { count = vsnprintf(packet.data + pos, n, msg, args); if (count < 0) { return ZX_ERR_INVALID_ARGS; } } if (count >= n) { constexpr char kEllipsis[] = �; constexpr size_t kEllipsisSize = sizeof(kEllipsis) - 1; memcpy(packet.data + kDataSize - 1 - kEllipsisSize, kEllipsis, kEllipsisSize); count = n - 1; } auto size = sizeof(packet.metadata) + msg_pos + count + 1; ZX_DEBUG_ASSERT(size <= sizeof(packet)); auto status = socket_.write(0, &packet, size, nullptr); if (status == ZX_ERR_BAD_STATE || status == ZX_ERR_PEER_CLOSED) { ActivateFallback(-1); return VLogWriteToFd(logger_fd_.load(fbl::memory_order_relaxed), severity, tag, packet.data + msg_pos, args, false); } if (status != ZX_OK) { dropped_logs_.fetch_add(1); } return status; } zx_status_t fx_logger::VLogWriteToFd(int fd, fx_log_severity_t severity, const char* tag, const char* msg, va_list args, bool perform_format) { zx_time_t time = zx_clock_get_monotonic(); constexpr char kEllipsis[] = �; constexpr size_t kEllipsisSize = sizeof(kEllipsis) - 1; constexpr size_t kMaxMessageSize = 2043; fbl::StringBuffer<kMaxMessageSize + kEllipsisSize + 1 > buf; buf.AppendPrintf(�, time / 1000000000UL, (time / 1000UL) % 1000000UL); buf.AppendPrintf(�, pid_); buf.AppendPrintf(�, GetCurrentThreadKoid()); buf.Append(�); if (!tagstr_.empty()) { buf.Append(tagstr_); } if (tag != NULL) { size_t len = strlen(tag); if (len > 0) { if (!tagstr_.empty()) { buf.Append(�); } buf.Append(tag, fbl::min(len, static_cast<size_t>(FX_LOG_MAX_TAG_LEN - 1))); } } buf.Append(�); switch (severity) { case FX_LOG_INFO: buf.Append(�); break; case FX_LOG_WARNING: buf.Append(�); break; case FX_LOG_ERROR: buf.Append(�); break; case FX_LOG_FATAL: buf.Append(�); break; default: buf.AppendPrintf(�, -severity); } buf.Append(�); if (!perform_format) { buf.Append(msg); } else { buf.AppendVPrintf(msg, args); } if (buf.size() > kMaxMessageSize) { buf.Resize(kMaxMessageSize); buf.Append(kEllipsis); } buf.Append(�); ssize_t status = write(fd, buf.data(), buf.size()); if (status < 0) { return ZX_ERR_IO; } return ZX_OK; } zx_status_t fx_logger::VLogWrite(fx_log_severity_t severity, const char* tag, const char* msg, va_list args, bool perform_format) { if (msg == NULL || severity > FX_LOG_FATAL) { return ZX_ERR_INVALID_ARGS; } if (GetSeverity() > severity) argument
/fuchsia/zircon/system/ulib/trace-provider/
H A Dhandler_impl.cpp218 auto status = fifo_.write(sizeof(packet), &packet, 1, nullptr);
236 auto status = fifo_.write(sizeof(packet), &packet, 1, nullptr);
/fuchsia/zircon/system/utest/fbl/
H A Dunique_fd_tests.cpp66 EXPECT_EQ(write(in, &w, 1), 1);
76 EXPECT_EQ(write(in, &c, 1), -1);
/fuchsia/zircon/system/utest/fs/
H A Dtest-maxfile.cpp75 if ((r = write(fd, data, sizeof(data_a))) < 0) {
94 ASSERT_EQ(r, 0, "Saw an unexpected error from write");
169 if ((r = write(fd, data, sizeof(data_a))) <= 0) {
H A Dtest-random-op.c194 ssize_t len = write(fd, buf, sizeof(buf));
196 task_error(w, "t: create_a", "write");
218 ssize_t len = write(fd, buf, sizeof(buf));
220 task_error(w, "t: create_a", "write");
381 ssize_t len = write(fd, buf, sizeof(buf));
383 task_error(w, "t: write_private_b", "write");
467 // write(fd, big buffer, ...)
472 ssize_t len = write(w->fd, buf, sizeof(buf));
475 task_error(w, "t: write_fd_small", "write");
491 // write(f
[all...]
/fuchsia/zircon/system/utest/memfs/
H A Dfidl-tests.cpp46 ASSERT_EQ(write(fd.get(), data, datalen), datalen);
137 ASSERT_EQ(write(fd.get(), data, datalen), datalen);
/fuchsia/zircon/third_party/ulib/linenoise/
H A Dlinenoise.c294 if (write(ofd, "\x1b[6n", 4) != 4) return -1;
340 if (write(ofd,"\x1b[999C",6) != 6) goto failed;
348 if (write(ofd,seq,strlen(seq)) == -1) {
367 if (write(STDOUT_FILENO,"\x1b[H\x1b[2J",7) <= 0) {
495 * write all the escape sequences in a buffer and flush them to the standard
592 if (write(fd,ab.b,ab.len) == -1) {} /* Can't recover from write error. */
679 if (write(fd,ab.b,ab.len) == -1) {} /* Can't recover from write error. */
705 if (write(
[all...]
/fuchsia/zircon/third_party/uapp/dash/src/bltin/
H A Dzircon.c200 if ((wr = write(fdo, data, r)) != r) {
475 write(fd, command, length);
514 ssize_t count = write(1, buf + written, actual - written);
/fuchsia/zircon/kernel/platform/pc/
H A Dkeyboard.cpp436 dprintf(SPEW, "Failed to write CTR while initializing i8042\n");
/fuchsia/zircon/system/core/crashsvc/
H A Dcrashsvc.cpp104 channel.write(0, &packet.type, sizeof(packet.type), handles, fbl::count_of(handles));
106 // If the channel write failed, things are going badly, attempt to
109 fprintf(stderr, "crashsvc: channel write failed: %d\n", status);
125 // - a channel on which to write messages when exceptions are encountered
/fuchsia/zircon/system/dev/display/led2472g/
H A Dled2472g.c60 .write = led2472g_write,
/fuchsia/zircon/system/dev/gpio/pl061/
H A Dpl061.c78 // write value first
132 .write = pl061_gpio_write,
/fuchsia/zircon/system/dev/misc/console/
H A Dconsole.c128 .write = console_write,
/fuchsia/zircon/system/dev/misc/pty/
H A Dpty-driver.c123 .write = psd_write,
/fuchsia/zircon/system/dev/sample/fifo/
H A Ddemo-fifo.c123 .write = fifo_write,
/fuchsia/zircon/system/uapp/kstress/
H A Dvmstress.cpp57 // to a pool of worker threads that then randomly commit/decommit/read/write/map/unmap
140 // write to a random range of the vmo
143 status = vmo_.write(buf.get(), off, len);
157 // write to a random range of the vmo via a direct memory reference
/fuchsia/zircon/system/uapp/sysconfig/
H A Dsysconfig.c32 " sysconfig write <section> [key=value]*\n"
39 "write: Write the provided key/value pairs to the specified section.\n"
115 } else if (!strcmp(op_name, "write")) {
160 // we will read the current section into old_kvs and write new section from new_kvs
230 if ((ret = write(fd, new_buffer, sizeof(new_buffer))) != sizeof(new_buffer)) {
231 fprintf(stderr, "could not write sysconfig partition: %d\n", ret);
/fuchsia/zircon/system/ulib/ddk/include/ddk/
H A Ddevice.h156 //@ ## write
157 // The write hook is an attempt to do a non-blocking write operation.
162 // If it is not possible to write data at present **ZX_ERR_SHOULD_WAIT** must
163 // be returned and when it is again possible to write,
168 // The default write implementation returns **ZX_ERR_NOT_SUPPORTED**.
170 zx_status_t (*write)(void* ctx, const void* buf, size_t count, member in struct:zx_protocol_device
184 // These, like read and write, must not block.
/fuchsia/zircon/system/ulib/ddk/include/ddk/protocol/
H A Dsdio.h59 bool write; member in struct:sdio_rw_txn
/fuchsia/zircon/system/ulib/fdio/
H A Dservice.c31 .write = fdio_default_write,
/fuchsia/zircon/system/ulib/minfs/include/minfs/
H A Dhost.h98 return hostfile_ ? write(fd_, buf, count) : emu_write(fd_, buf, count);
/fuchsia/zircon/system/ulib/tftp/include/tftp/
H A Dtftp.h150 // tftp_file_write_cb is called by the library to write |length| bytes,
155 // less than or equal to the original value to indicate a partial write.
163 // tftp_file_close_cb is called by the library to finish a file read or write
172 tftp_file_write_cb write; member in struct:__anon1211
/fuchsia/zircon/system/utest/driver-tests/
H A Dmain.c101 ssize_t rc = write(2, buf + written, bytes - written);

Completed in 209 milliseconds

12345678910