kernels/linux-2.4.0/fs/vfat/namei.c
/*
 * Case sensitive compare of two vfat names.
 */
Case sensitive compare of two vfat names.
Case sensitive compare of two vfat names .
static int vfat_cmp(struct dentry *dentry, struct qstr *a, struct qstr *b)
{
	int alen, blen;
	alen = a->len;
	blen = b->len;
	while (alen && a->name[alen-1] == '.')
		alen--;
	while (blen && b->name[blen-1] == '.')
		blen--;
	if (alen == blen) {
		if (strncmp(a->name, b->name, alen) == 0)
			return 0;
	}
	return 1;
}
static int vfat_cmp ( struct dentry * dentry , struct qstr * a , struct qstr * b ) { int alen , blen ; alen = a -> len ; blen = b -> len ; while ( alen && a -> name [ alen - 1 ] == ' ' ) alen -- ; while ( blen && b -> name [ blen - 1 ] == ' ' ) blen -- ; if ( alen == blen ) { if ( strncmp ( a -> name , b -> name , alen ) == 0 ) return 0 ; } return 1 ; }
Case sensitive compare of two vfat names.
Case sensitive compare of two vfat names .
/* A filename cannot end in '.' or we treat it like it has none */