diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-19 02:48:18 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-19 02:48:18 -0400 |
commit | 6567db65f495cf7c11f5c1e60a3e54543d5a69bc (patch) | |
tree | 37b05447d32a30ac2ff47353d4e499abec339578 /src/thread/lock_ptc.c | |
parent | 648c3b4e18b2ce2b6af7d44783e42ca267ea49f5 (diff) | |
download | musl-6567db65f495cf7c11f5c1e60a3e54543d5a69bc.tar.gz musl-6567db65f495cf7c11f5c1e60a3e54543d5a69bc.tar.xz musl-6567db65f495cf7c11f5c1e60a3e54543d5a69bc.zip |
improve [f]stat[v]fs functions, and possibly work around old kernels
the main aim of this patch is to ensure that if not all fields are filled in, they contain zeros, so as not to confuse applications. reportedly some older kernels, including commonly used openvz kernels, lack the f_flags field, resulting in applications reading random junk as the mount flags; the common symptom seems to be wrongly considering the filesystem to be mounted read-only and refusing to operate. glibc has some amazingly ugly fallback code to get the mount flags for old kernels, but having them really is not that important anyway; what matters most is not presenting incorrect flags to the application. I have also aimed to fill in some fields of statvfs that were previously missing, and added code to explicitly zero the reserved space at the end of the structure, which will make things easier in the future if this space someday needs to be used.
Diffstat (limited to 'src/thread/lock_ptc.c')
0 files changed, 0 insertions, 0 deletions