harmony 鸿蒙writeproc

  • 2022-08-09
  • 浏览 (596)

writeproc

Command Function

This command is used to write data to the specified proc file system. The proc file system supports data of strings. The method for writing data needs to be implemented.

Syntax

writeproc <data> >> /proc/<filename>

Parameters

Table 1 Parameter description

Parameter Description
data Specifies the string to write, which ends with a space. If you need to write a space, use ”” to enclose the space.
filename Specifies the proc file to which data is to write.

Usage Guidelines

The proc file system implements its own write() function. Calling the writeproc command will pass input parameters to the write() function.

NOTE
The procfs file system does not support multi-thread access.

Note

Currently, the shell does not support this command.

Example

Run writeproc test >> /proc/uptime.

Output

OHOS \# writeproc test >> /proc/uptime

[INFO]write buf is: test

test >> /proc/uptime

NOTE
The uptime proc file temporarily implements the write() function. The INFO log is generated by the test() function.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Kernel

harmony 鸿蒙Kernel Coding Specification

harmony 鸿蒙Standard Libraries

harmony 鸿蒙Interrupt Management

harmony 鸿蒙Event

harmony 鸿蒙Mutex

harmony 鸿蒙Queue

harmony 鸿蒙Semaphore

harmony 鸿蒙Doubly Linked List

harmony 鸿蒙Memory Management

0  赞