bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm: don't waste time preprocessing on tmpfs or nfs


From: Andreas Schwab
Subject: Re: rm: don't waste time preprocessing on tmpfs or nfs
Date: Wed, 01 Oct 2008 10:05:59 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)

Jim Meyering <address@hidden> writes:

> diff --git a/src/remove.c b/src/remove.c
> index ea52843..6c1eaea 100644
> --- a/src/remove.c
> +++ b/src/remove.c
> @@ -1277,6 +1277,45 @@ dirent_count (struct stat const *st)
>  }
>  #endif /* HAVE_STRUCT_DIRENT_D_TYPE */
>
> +#if defined HAVE_SYS_VFS_H && HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE
> +# include <sys/statfs.h>
> +# include "fs.h"
> +/* FIXME: what about when f_type is not an integral type?
> +   deal with that if/when it's encountered.  */
> +static bool
> +fs_handles_readdir_ordered_dirents_efficiently (uintmax_t fs_type)
> +{
> +  switch (fs_type)
> +    {
> +    case S_MAGIC_TMPFS:
> +    case S_MAGIC_NFS:
> +      return true;

Does this always do correct sign extension on the f_type constants?

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]