Open
Conversation
Unit Test Results7 460 tests +6 6 745 ✅ +7 36m 20s ⏱️ - 2m 0s Results for commit cac8d8e. ± Comparison against base commit 1c234da. This pull request removes 1 and adds 7 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
5a996a8 to
04c47cb
Compare
agkaminski
reviewed
Jan 26, 2024
|
|
||
|
|
||
| if ((curLevel >= du_common.levels) || ((maybePrint) && (curLevel >= 0))) { | ||
| printf("%zu\t%s\n", roundPrefix(total), d); |
Member
There was a problem hiding this comment.
Perhaps this can be used:
phoenix-rtos-utils/psh/pshapp/pshapp.c
Line 210 in 7b6b834
To not reimplement existing functionality
| if (!((entry->d_name[0] == '.') && ((entry->d_name[1] == '\0') || ((entry->d_name[1] == '.') && (entry->d_name[2] == '\0'))))) { | ||
| const size_t nextPos = makePath(startPos, entry->d_name); | ||
| if (nextPos > 0u) { | ||
| total += doDirectory(nextPos, curLevel - 1, stbuf.st_dev); |
Implements tool that estimates file space usage JIRA: RTOS-745
04c47cb to
cac8d8e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
ducommand is used to estimate the space used by a directory or a specific file. The command stands fordisk usage. When executed,dutraverses the specified directories and prints the sizes of the subdirectories and files (if-aswitch is used) in bytes by default, unless specified otherwise (using switch-kfor kilobytes and-Kfor Kibibytes).Motivation and Context
Need tool to print directory structure and files while developing a file system.
JIRA: RTOS-745
Examples
ia32-generic, estimate size in bytes of /usr/bin and /bin directories
kB, all directories
Types of changes
How Has This Been Tested?
imxrt1176-nil,ia32-genericChecklist:
Special treatment