Zepp-Hanzj opened a new pull request, #18994:
URL: https://github.com/apache/nuttx/pull/18994

   ## Description
   
   This PR adds documentation for the `uid` example, which was previously 
missing (only had "TODO" in the documentation).
   
   The `uid` example is a utility for querying user and group information from 
the system's password and group databases using POSIX functions.
   
   ### Changes
   
   **File**: `Documentation/applications/examples/uid/index.rst` (+111 lines)
   
   ### Documentation Added
   
   1. **Introduction**: Explains the tool's purpose and the POSIX functions it 
uses
   2. **Command Syntax**: Shows all available command formats
   3. **Synopsis**: Describes what the tool does
   4. **Options Table**: Lists all available flags with descriptions
   5. **Usage Examples**: Provides real-world examples for each query type:
      - Query user by ID (`-uid`)
      - Query user by name (`-uname`)
      - Query group by ID (`-gid`)
      - Query group by name (`-gname`)
      - Help display (`-h`)
   6. **Configuration**: Lists Kconfig options
   
   ### Source Code Reference
   
   The documentation is based on the actual source code in 
`apps/examples/uid/uid_main.c`:
   
   - **Options**: Extracted from `show_usage()` function (lines 42-51)
   - **Output format**: Extracted from `show_pwd()` and `show_grp()` functions
   - **Configuration**: Extracted from `apps/examples/uid/Kconfig`
   
   ### Verification
   
   ✅ **Content accuracy**: All information directly extracted from source code
   ✅ **Format compliance**: Follows NuttX documentation style (see `flashtool` 
example)
   ✅ **RST syntax**: Valid reStructuredText format
   
   ### Example Usage
   
   ```
   nsh> uid -uid 0
   Name:   root
   UID:    0
   GID:    0
   Home:   /
   Shell:  /bin/sh
   
   nsh> uid -uname root
   Name:   root
   UID:    0
   GID:    0
   Home:   /
   Shell:  /bin/sh
   ```
   
   ### Signed-off-by
   
   hanzj <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to