kernels/linux-2.4.0/fs/affs/namei.c
/*
 * NOTE! unlike strncmp, affs_match returns 1 for success, 0 for failure.
 */
NOTE. unlike strncmp, affs_match returns 1 for success, 0 for failure.
NOTE . unlike strncmp affs_match returns 1 for success 0 for failure .
static int
affs_match(const unsigned char *name, int len, const unsigned char *compare, int dlen, int intl)
{
	unsigned int	(*toupper)(unsigned int) = intl ? affs_intl_toupper : affs_toupper;
	int		  i;
	if (!compare)
		return 0;
	if (len > 30)
		len = 30;
	if (dlen > 30)
		dlen = 30;
	if (!len && dlen == 1 && compare[0] == '.')
		return 1;
	if (dlen != len)
		return 0;
	for (i = 0; i < len; i++)
		if (toupper(name[i]) != toupper(compare[i]))
			return 0;
	return 1;
}
static int affs_match ( const unsigned char * name , int len , const unsigned char * compare , int dlen , int intl ) { unsigned int ( * toupper ) ( unsigned int ) = intl ? affs_intl_toupper : affs_toupper ; int i ; if ( ! compare ) return 0 ; if ( len > 30 ) len = 30 ; if ( dlen > 30 ) dlen = 30 ; if ( ! len && dlen == 1 && compare [ 0 ] == ' ' ) return 1 ; if ( dlen != len ) return 0 ; for ( i = 0 ; i < len ; i ++ ) if ( toupper ( name [ i ] ) != toupper ( compare [ i ] ) ) return 0 ; return 1 ; }
NOTE!
NOTE!
/* "" means "." ---> so paths like "/usr/lib//libc.a" work */