glibc/sysdeps/unix/sysv/linux/bits
наб 92861d93cd linux: statvfs: allocate spare for f_type
This is the only missing part in struct statvfs.
The LSB calls [f]statfs() deprecated, and its weird types are definitely
off-putting. However, its use is required to get f_type.

Instead, allocate one of the six spares to f_type,
copied directly from struct statfs.
This then becomes a small glibc extension to the standard interface
on Linux and the Hurd, instead of two different interfaces, one of which
is quite odd due to being an ABI type, and there no longer is any reason
to use statfs().

The underlying kernel type is a mess, but all architectures agree on u32
(or more) for the ABI, and all filesystem magicks are 32-bit integers.
We don't lose any generality by using u32, and by doing so we both make
the API consistent with the Hurd, and allow C++
  switch(f_type) { case RAMFS_MAGIC: ...; }

Also fix tst-statvfs so that it actually fails;
as it stood, all it did was return 0 always.
Test statfs()' and statvfs()' f_types are the same.

Link: https://lore.kernel.org/linux-man/f54kudgblgk643u32tb6at4cd3kkzha6hslahv24szs4raroaz@ogivjbfdaqtb/t/#u
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2023-08-08 09:29:06 -03:00
..
types Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
a.out.h
dirent.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dirent_ext.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
epoll.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
errno.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
eventfd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fcntl-linux.h io: Fix record locking contants on 32 bit arch with 64 bit default time_t (BZ#30477) 2023-05-30 08:53:07 -03:00
fcntl.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
in.h Add IP_PROTOCOL from Linux 6.4 to bits/in.h 2023-08-01 17:22:12 +00:00
initspin.h
inotify.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ioctl-types.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ioctls.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ipc-perm.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
local_lim.h Fix misspellings in sysdeps/unix -- BZ 25337 2023-05-23 11:59:23 +00:00
mman-linux.h Fix misspellings in sysdeps/unix -- BZ 25337 2023-05-23 11:59:23 +00:00
mman-map-flags-generic.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
mman-shared.h Add MFD_NOEXEC_SEAL, MFD_EXEC from Linux 6.3 to bits/mman-shared.h 2023-05-26 15:04:51 +00:00
mman.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
mman_ext.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
mqueue.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
msq.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
param.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
poll.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
posix_opt.h Fix misspellings in sysdeps/unix -- BZ 25337 2023-05-23 11:59:23 +00:00
procfs-extra.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
procfs-id.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
procfs-prregset.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
procfs.h
pthread_stack_min-dynamic.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
pthread_stack_min.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ptrace-shared.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
resource.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
rseq.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sched.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sem.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
semaphore.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
shm.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
shmlba.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigaction.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigcontext.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigevent-consts.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
siginfo-arch.h
siginfo-consts-arch.h
siginfo-consts.h Fix misspellings in sysdeps/unix -- BZ 25337 2023-05-23 11:59:23 +00:00
signal_ext.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
signalfd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
signum-arch.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigstack.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigstksz.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
socket-constants.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
socket.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
socket_type.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ss_flags.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
stat.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
statfs.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
statvfs.h linux: statvfs: allocate spare for f_type 2023-08-08 09:29:06 -03:00
statx.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
stdio_lim.h libio: Do not autogenerate stdio_lim.h 2023-03-27 13:57:55 -03:00
struct_stat.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
struct_stat_time64_helper.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-baud.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_cc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_cflag.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_iflag.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_lflag.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-c_oflag.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-misc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-struct.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
termios-tcflow.h Fix misspellings in sysdeps/unix -- BZ 25337 2023-05-23 11:59:23 +00:00
termios.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
time.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
timerfd.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
timex.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
typesizes.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
uio-ext.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
uio_lim.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
unistd_ext.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
utsname.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
waitflags.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00