Bug 9901 - When I use the DF command, the file system size displayed is incorrect in busybox-1.26-x
Summary: When I use the DF command, the file system size displayed is incorrect in bus...
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-27 10:08 UTC by henrry
Modified: 2021-01-27 22:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description henrry 2017-05-27 10:08:53 UTC
busybox-1.26-x Using the f_frsize variable replacement the f_bsize variable.
I used one uClibc versions were seen to lose f_frsize(kernel return it, but then uClibc does not copy it). the f_frsize variable is 0 for the first time, and then it was not. The reason is that there is no initialization of the structure "struct 
 statfs s " in while(1).that's why it's wrong.

solution:
1. add  " #include <string.h> "
2. add  " memset(&s, 0, sizeof(struct statfs)); "  in while(1)
Comment 1 alt.j2-4o4s2yon 2021-01-27 22:26:14 UTC
henrry: can you expand on why you think the output is wrong?