* posix/TESTS: Fix expected result for test cases with * with no
	leading expression.
This commit is contained in:
Ulrich Drepper 2000-01-18 10:53:15 +00:00
parent 6e9b72d3ab
commit c7e85d0c08
6 changed files with 23 additions and 14 deletions

View file

@ -1,5 +1,8 @@
2000-01-18 Ulrich Drepper <drepper@cygnus.com> 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
* posix/TESTS: Fix expected result for test cases with * with no
leading expression.
* sysdeps/unix/sysv/linux/fstatvfs.c: Move actual code in... * sysdeps/unix/sysv/linux/fstatvfs.c: Move actual code in...
* sysdeps/unix/sysv/linux/internal_statvfs.c: ...here. New file. * sysdeps/unix/sysv/linux/internal_statvfs.c: ...here. New file.
* sysdeps/unix/sysv/linux/statvfs.c: Don't use fstatvfs since the * sysdeps/unix/sysv/linux/statvfs.c: Don't use fstatvfs since the

View file

@ -54,10 +54,10 @@
0:ab|cd:abcd 0:ab|cd:abcd
0:()ef:def 0:()ef:def
0:()*:- 0:()*:-
1:*a:- 2:*a:-
0:^*:- 2:^*:-
0:$*:- 2:$*:-
1:(*)b:- 2:(*)b:-
1:$b:b 1:$b:b
2:a\:- 2:a\:-
0:a\(b:a(b 0:a\(b:a(b

View file

@ -54,10 +54,10 @@
{0, "ab|cd", "abcd"}, {0, "ab|cd", "abcd"},
{0, "()ef", "def"}, {0, "()ef", "def"},
{0, "()*", "-"}, {0, "()*", "-"},
{1, "*a", "-"}, {2, "*a", "-"},
{0, "^*", "-"}, {2, "^*", "-"},
{0, "$*", "-"}, {2, "$*", "-"},
{1, "(*)b", "-"}, {2, "(*)b", "-"},
{1, "$b", "b"}, {1, "$b", "b"},
{2, "a\\", "-"}, {2, "a\\", "-"},
{0, "a\\(b", "a(b"}, {0, "a\\(b", "a(b"},

View file

@ -37,8 +37,9 @@ fstatvfs (int fd, struct statvfs *buf)
if (__fstatfs (fd, &fsbuf) < 0) if (__fstatfs (fd, &fsbuf) < 0)
return -1; return -1;
#define STAT(st) fstat (fd, st)
#include "internal_statvfs.c" #include "internal_statvfs.c"
/* We signal success if the statfs call succeeded. */ /* We signal success if the statfs call succeeded. */
return 0; return 0;
} }

View file

@ -40,7 +40,7 @@
file. The way we can test for matching filesystem is using the file. The way we can test for matching filesystem is using the
device number. */ device number. */
buf->f_flag = 0; buf->f_flag = 0;
if (fstat (fd, &st) >= 0) if (STAT (&st) >= 0)
{ {
int save_errno = errno; int save_errno = errno;
struct mntent mntbuf; struct mntent mntbuf;

View file

@ -18,8 +18,12 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <mntent.h>
#include <unistd.h> #include <paths.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/statvfs.h> #include <sys/statvfs.h>
@ -30,11 +34,12 @@ statvfs (const char *file, struct statvfs *buf)
struct stat st; struct stat st;
/* Get as much information as possible from the system. */ /* Get as much information as possible from the system. */
if (__statfs (fd, &fsbuf) < 0) if (__statfs (file, &fsbuf) < 0)
return -1; return -1;
#define STAT(st) stat (file, st)
#include "internal_statvfs.c" #include "internal_statvfs.c"
/* We signal success if the statfs call succeeded. */ /* We signal success if the statfs call succeeded. */
return 0; return 0;
} }