예제 #1
0
파일: inode.c 프로젝트: AK101111/linux
static struct dentry *
bpf_lookup(struct inode *dir, struct dentry *dentry, unsigned flags)
{
	if (strchr(dentry->d_name.name, '.'))
		return ERR_PTR(-EPERM);
	return simple_lookup(dir, dentry, flags);
}
예제 #2
0
파일: sema_id.cpp 프로젝트: jbcoe/banjo
// FIXME: What if the identifier refers to a set of declarations?
Decl&
Parser::on_concept_name(Token tok)
{
  Simple_id& id = build.get_id(tok);
  Decl& decl = simple_lookup(cxt, current_scope(), id);
  if (is<Concept_decl>(&decl))
    return decl;
  throw Lookup_error("'{}' does not name a concept", id);
}
예제 #3
0
파일: sema_id.cpp 프로젝트: jbcoe/banjo
Type&
Parser::on_type_name(Token tok)
{
  Simple_id& id = build.get_id(tok);
  Decl& decl = simple_lookup(cxt, current_scope(), id);
  if (Type* type = get_type_for_decl(cxt, decl))
    return *type;
  throw Lookup_error("'{}' does not name a type", id);
}
예제 #4
0
파일: sema_id.cpp 프로젝트: jbcoe/banjo
Type&
Parser::on_type_alias(Token tok)
{
  Simple_id& id = build.get_id(tok);
  Decl& decl = simple_lookup(cxt, current_scope(), id);

  if (Type_parm* d = as<Type_parm>(&decl))
    return build.get_typename_type(*d);

  // TODO: Actually support type aliases.

  throw Lookup_error("'{}' does not name a type", id);
}
예제 #5
0
struct dentry * sjfs_dir_iops_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) {
	printk("sjfs_dir_iops_lookup -> simple_lookup(\n");
	if(dir) {
		printk("--- dir.ino:%lu\n", dir->i_ino);
	} else {
		printk("--- dir.ino:NULL\n");
	}
	if(dentry && &(dentry->d_name) != NULL && (dentry->d_name).name != NULL) {
		printk("--- dentry.name: \"%s\"\n", (dentry->d_name).name);
	} else {
		printk("--- dentry.name: NULL\n");
	}
	printk("--- flags: %#010hx);\n", flags);

	return simple_lookup(dir, dentry, flags);
}