2003-07-17 Roland McGrath <roland@redhat.com>
* linux/syscallent.h: Handle statfs64, fstatfs64, utimes. * file.c (printstatfs): Print f_fsid and f_frsize. [LINUX] (printstatfs64, sys_statfs64, sys_fstatfs64): New functions. * linux/syscall.h: Add decls. From Ulrich Drepper <drepper@redhat.com>.
This commit is contained in:
parent
728d94d28a
commit
ab147c5d67
91
file.c
91
file.c
@ -1385,21 +1385,28 @@ long addr;
|
||||
tprintf("{f_type=%s, f_fbsize=%u, f_blocks=%u, f_bfree=%u, ",
|
||||
sprintfstype(statbuf.f_type),
|
||||
statbuf.f_bsize, statbuf.f_blocks, statbuf.f_bfree);
|
||||
tprintf("f_bavail=%u, f_files=%u, f_ffree=%u, f_namelen=%u",
|
||||
statbuf.f_bavail,statbuf.f_files, statbuf.f_ffree, statbuf.f_namelen);
|
||||
tprintf("f_bavail=%u, f_files=%u, f_ffree=%u, f_fsid={%d, %d}, f_namelen=%u",
|
||||
statbuf.f_bavail,statbuf.f_files, statbuf.f_ffree,
|
||||
statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1],
|
||||
statbuf.f_namelen);
|
||||
#else /* !ALPHA */
|
||||
tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%lu, f_bfree=%lu, ",
|
||||
sprintfstype(statbuf.f_type),
|
||||
(unsigned long)statbuf.f_bsize,
|
||||
(unsigned long)statbuf.f_blocks,
|
||||
(unsigned long)statbuf.f_bfree);
|
||||
tprintf("f_files=%lu, f_ffree=%lu",
|
||||
tprintf("f_bavail=%lu, f_files=%lu, f_ffree=%lu, f_fsid={%d, %d}",
|
||||
(unsigned long)statbuf.f_bavail,
|
||||
(unsigned long)statbuf.f_files,
|
||||
(unsigned long)statbuf.f_ffree);
|
||||
(unsigned long)statbuf.f_ffree,
|
||||
statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]);
|
||||
#ifdef LINUX
|
||||
tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen);
|
||||
#endif /* LINUX */
|
||||
#endif /* !ALPHA */
|
||||
#ifdef _STATFS_F_FRSIZE
|
||||
tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize);
|
||||
#endif
|
||||
tprintf("}");
|
||||
}
|
||||
|
||||
@ -1428,6 +1435,82 @@ struct tcb *tcp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef LINUX
|
||||
static void
|
||||
printstatfs64(tcp, addr)
|
||||
struct tcb *tcp;
|
||||
long addr;
|
||||
{
|
||||
struct statfs64 statbuf;
|
||||
|
||||
if (syserror(tcp) || !verbose(tcp)) {
|
||||
tprintf("%#lx", addr);
|
||||
return;
|
||||
}
|
||||
if (umove(tcp, addr, &statbuf) < 0) {
|
||||
tprintf("{...}");
|
||||
return;
|
||||
}
|
||||
#ifdef ALPHA
|
||||
|
||||
tprintf("{f_type=%s, f_fbsize=%u, f_blocks=%u, f_bfree=%u, ",
|
||||
sprintfstype(statbuf.f_type),
|
||||
statbuf.f_bsize, statbuf.f_blocks, statbuf.f_bfree);
|
||||
tprintf("f_bavail=%u, f_files=%u, f_ffree=%u, f_fsid={%d, %d}, f_namelen=%u",
|
||||
statbuf.f_bavail,statbuf.f_files, statbuf.f_ffree,
|
||||
statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1],
|
||||
statbuf.f_namelen);
|
||||
#else /* !ALPHA */
|
||||
tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%lu, f_bfree=%lu, ",
|
||||
sprintfstype(statbuf.f_type),
|
||||
(unsigned long)statbuf.f_bsize,
|
||||
(unsigned long)statbuf.f_blocks,
|
||||
(unsigned long)statbuf.f_bfree);
|
||||
tprintf("f_bavail=%lu, f_files=%lu, f_ffree=%lu, f_fsid={%d, %d}",
|
||||
(unsigned long)statbuf.f_bavail,
|
||||
(unsigned long)statbuf.f_files,
|
||||
(unsigned long)statbuf.f_ffree,
|
||||
statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]);
|
||||
tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen);
|
||||
#endif /* !ALPHA */
|
||||
#ifdef _STATFS_F_FRSIZE
|
||||
tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize);
|
||||
#endif
|
||||
tprintf("}");
|
||||
}
|
||||
|
||||
int
|
||||
sys_statfs64(tcp)
|
||||
struct tcb *tcp;
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
tprintf(", %lu, ", tcp->u_arg[1]);
|
||||
} else {
|
||||
if (tcp->u_arg[1] == sizeof (struct statfs64))
|
||||
printstatfs64(tcp, tcp->u_arg[2]);
|
||||
else
|
||||
tprintf("{???}");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sys_fstatfs64(tcp)
|
||||
struct tcb *tcp;
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
|
||||
} else {
|
||||
if (tcp->u_arg[1] == sizeof (struct statfs64))
|
||||
printstatfs64(tcp, tcp->u_arg[2]);
|
||||
else
|
||||
tprintf("{???}");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LINUX) && defined(__alpha)
|
||||
|
||||
int
|
||||
|
@ -92,8 +92,7 @@ int sys_set_thread_area(), sys_get_thread_area(), sys_remap_file_pages();
|
||||
int sys_timer_create(), sys_timer_delete(), sys_timer_getoverrun();
|
||||
int sys_timer_gettime(), sys_timer_settime(), sys_clock_settime();
|
||||
int sys_clock_gettime(), sys_clock_getres(), sys_clock_nanosleep();
|
||||
int sys_semtimedop();
|
||||
int sys_tgkill();
|
||||
int sys_semtimedop(), sys_statfs64(), sys_fstatfs64(), sys_tgkill();
|
||||
|
||||
|
||||
/* sys_socketcall subcalls */
|
||||
|
Loading…
x
Reference in New Issue
Block a user