您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vfs_rmdir函数代码示例

51自学网 2021-06-03 09:38:58
  C++
这篇教程C++ vfs_rmdir函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vfs_rmdir函数的典型用法代码示例。如果您正苦于以下问题:C++ vfs_rmdir函数的具体用法?C++ vfs_rmdir怎么用?C++ vfs_rmdir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vfs_rmdir函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: do_rmdir

int	do_rmdir (struct inode *inode, const char *name, int len){#if POST_20_KERNEL_F	struct dentry	*tmp_dent;#endif	int		ret_code;	DOWN(&(inode->i_sem));#if POST_20_KERNEL_F		/* Grab a dentry for the directory being removed. */	ret_code = ovlfs_inode_get_child_dentry(inode, name, len, &tmp_dent,	                                        OVLFS_DENT_GET_POSITIVE);	if ( ret_code == 0 )	{			/* Use the vfs_rmdir function to do the dirty work. */		ret_code = vfs_rmdir(inode, tmp_dent);		dput(tmp_dent);	}#else	IMARK(inode);	ret = inode->i_op->rmdir(inode, name, len);#endif	UP(&(inode->i_sem));	return	ret_code;}
开发者ID:raven-au,项目名称:ovlfs,代码行数:32,


示例2: wrapfs_rmdir

static int wrapfs_rmdir(struct inode *dir, struct dentry *dentry){	struct dentry *lower_dentry;	struct dentry *lower_dir_dentry;	int err;	struct path lower_path;	wrapfs_get_lower_path(dentry, &lower_path);	lower_dentry = lower_path.dentry;	lower_dir_dentry = lock_parent(lower_dentry);	err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);	if (err)		goto out;	d_drop(dentry);	/* drop our dentry on success (why not VFS's job?) */	if (dentry->d_inode)		clear_nlink(dentry->d_inode);	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);	fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode);	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink);out:	unlock_dir(lower_dir_dentry);	wrapfs_put_lower_path(dentry, &lower_path);#ifdef NEKTECH_LOGGER /*NEKTECH LOGGING*/            nektech_logger (dir, dentry, NEKTECH_RMDIR);#endif          /*NEKTECH LOGGING*/	return err;}
开发者ID:AkyZero,项目名称:wrapfs-nektech,代码行数:31,


示例3: ccfs_rmdir

static int ccfs_rmdir(struct inode *dir, struct dentry *dentry){	struct dentry *lower_dentry;	struct dentry *lower_dir_dentry;	int rc;	lower_dentry = ccfs_get_nested_dentry(dentry);		mdbg(INFO3,"RMDIR w/ lower_dentry->d_name.name = [%s]", lower_dentry->d_name.name);		dget(dentry);	lower_dir_dentry = lock_parent(lower_dentry);	dget(lower_dentry);	rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);	dput(lower_dentry);	if (!rc)		d_delete(lower_dentry);	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink); //Fix for kernel 3.7.1 use function set_nlink by Jiri Rakosnik	unlock_dir(lower_dir_dentry);	if (!rc)		d_drop(dentry);	dput(dentry);	return rc;}
开发者ID:FIT-CVUT,项目名称:clondike,代码行数:25,


示例4: diaryfs_rmdir

static int diaryfs_rmdir(struct inode * dir, struct dentry * dentry) {	int err;	struct dentry * lower_dentry;	struct dentry * lower_dir_dentry;	struct path lower_path;	diaryfs_get_lower_path(dentry, &lower_path); 	lower_dentry = lower_path.dentry; 	lower_dir_dentry = lock_parent(lower_dentry);	err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);	if (err)		goto out; 	d_drop(dentry);	if (dentry->d_inode)		clear_nlink(dentry->d_inode); 	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode); 	fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode); 	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink); out:	unlock_dir(lower_dir_dentry);	diaryfs_put_lower_path(dentry, &lower_path); 	return err;}
开发者ID:jameswhang,项目名称:DiaryFS,代码行数:28,


示例5: dev_rmdir

static int dev_rmdir(const char *name){	struct nameidata nd;	struct dentry *dentry;	int err;	err = vfs_path_lookup(dev_mnt->mnt_root, dev_mnt,			      name, LOOKUP_PARENT, &nd);	if (err)		return err;	mutex_lock_nested(&nd.path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);	dentry = lookup_one_len(nd.last.name, nd.path.dentry, nd.last.len);	if (!IS_ERR(dentry)) {		if (dentry->d_inode) {			if (dentry->d_inode->i_private == &dev_mnt)				err = vfs_rmdir(nd.path.dentry->d_inode,						dentry);			else				err = -EPERM;		} else {			err = -ENOENT;		}		dput(dentry);	} else {		err = PTR_ERR(dentry);	}	mutex_unlock(&nd.path.dentry->d_inode->i_mutex);	path_put(&nd.path);	return err;}
开发者ID:jhu-chang,项目名称:r6300v2,代码行数:32,


示例6: ecryptfs_rmdir

static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry){	struct dentry *lower_dentry;	struct dentry *lower_dir_dentry;	int rc;#ifdef CONFIG_SDP	if(IS_CHAMBER_DENTRY(dentry)) {		printk("You're removing chamber directory. I/O error/n");		return -EIO;	}#endif	lower_dentry = ecryptfs_dentry_to_lower(dentry);	dget(dentry);	lower_dir_dentry = lock_parent(lower_dentry);	dget(lower_dentry);	rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);	dput(lower_dentry);	if (!rc && dentry->d_inode)		clear_nlink(dentry->d_inode);	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink);	unlock_dir(lower_dir_dentry);	if (!rc)		d_drop(dentry);	dput(dentry);	return rc;}
开发者ID:sawdoctor,项目名称:Googy-Max-N4-Kernel,代码行数:29,


示例7: cmd_rmd

static void cmd_rmd(const char *arg, struct tcp_pcb *pcb, struct ftpd_msgstate *fsm){	vfs_stat_t st;	if (arg == NULL) {		send_msg(pcb, fsm, msg501);		return;	}	if (*arg == '/0') {		send_msg(pcb, fsm, msg501);		return;	}	if (vfs_stat(fsm->vfs, arg, &st) != 0) {		send_msg(pcb, fsm, msg550);		return;	}	if (!VFS_ISDIR(st.st_mode)) {		send_msg(pcb, fsm, msg550);		return;	}	if (vfs_rmdir(fsm->vfs, arg) != 0) {		send_msg(pcb, fsm, msg550);	} else {		send_msg(pcb, fsm, msg250);	}}
开发者ID:skyformat99,项目名称:lwip-ftpd,代码行数:26,


示例8: wrapfs_rmdir

static int wrapfs_rmdir(struct inode *dir, struct dentry *dentry){	struct dentry *lower_dentry;	struct dentry *lower_dir_dentry;	int err;	struct path lower_path;	wrapfs_get_lower_path(dentry, &lower_path);	lower_dentry = lower_path.dentry;	lower_dir_dentry = lock_parent(lower_dentry);	err = mnt_want_write(lower_path.mnt);	if (err)		goto out_unlock;	err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);	if (err)		goto out;	d_drop(dentry);	/* drop our dentry on success (why not VFS's job?) */	if (dentry->d_inode)		clear_nlink(dentry->d_inode);	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);	fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode);	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink);out:	mnt_drop_write(lower_path.mnt);out_unlock:	unlock_dir(lower_dir_dentry);	wrapfs_put_lower_path(dentry, &lower_path);	return err;}
开发者ID:abhishekShukla,项目名称:Linux-Stackable-File-System-,代码行数:32,


示例9: sys_rmdir

/* sys_rmdir * Copies the given path into the kernel space, and call vfs_rmdir. */intsys_rmdir(userptr_t path) {	char *p;	int result;	if ((p = (char *)kmalloc(__PATH_MAX)) == NULL) {		return ENOMEM;	}	/* Copy in the path */	result = copyinstr(path, p, __PATH_MAX, NULL);	if (result) {		kfree(p);		return result;	}	/* Check that given path of directory is valid */	if (strcmp(p, ".") == 0 || strcmp(p, "..") == 0) {		kfree(p);		return EINVAL;	}	result = vfs_rmdir(p);	kfree(p);	return result;}
开发者ID:gapry,项目名称:os161,代码行数:29,


示例10: sdcardfs_rmdir

static int sdcardfs_rmdir(struct inode *dir, struct dentry *dentry){	struct dentry *lower_dentry;	struct dentry *lower_dir_dentry;	int err;	struct path lower_path;	struct sdcardfs_sb_info *sbi = SDCARDFS_SB(dentry->d_sb);	const struct cred *saved_cred = NULL;	//char *path_s = NULL;	int has_rw = get_caller_has_rw_locked(sbi->pkgl_id, sbi->options.derive);	if(!check_caller_access_to_name(dir, dentry->d_name.name, sbi->options.derive, 1, has_rw)) {		printk(KERN_INFO "%s: need to check the caller's gid in packages.list/n" 						 "  dentry: %s, task:%s/n",						 __func__, dentry->d_name.name, current->comm);		err = -EACCES;		goto out_eacces;	}	/* save current_cred and override it */	OVERRIDE_CRED(SDCARDFS_SB(dir->i_sb), saved_cred);	/* sdcardfs_get_real_lower(): in case of remove an user's obb dentry	 * the dentry on the original path should be deleted. */	sdcardfs_get_real_lower(dentry, &lower_path);	lower_dentry = lower_path.dentry;	lower_dir_dentry = lock_parent(lower_dentry);	sdcardfs_drop_shared_icache(dir->i_sb, lower_dentry->d_inode);	err = mnt_want_write(lower_path.mnt);	if (err)		goto out_unlock;	err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);	if (err)		goto out;	d_drop(dentry);	/* drop our dentry on success (why not VFS's job?) */	if (dentry->d_inode)		clear_nlink(dentry->d_inode);	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);	fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode);	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink);out:	mnt_drop_write(lower_path.mnt);out_unlock:	unlock_dir(lower_dir_dentry);	sdcardfs_put_real_lower(dentry, &lower_path);	REVERT_CRED(saved_cred);out_eacces:	return err;}
开发者ID:XePeleato,项目名称:android_kernel_huawei_venus,代码行数:54,


示例11: hwgfs_unregister

voidhwgfs_unregister(	hwgfs_handle_t		de){	struct inode		*parent_inode = de->d_parent->d_inode;	if (S_ISDIR(de->d_inode->i_mode))		vfs_rmdir(parent_inode, de);	else		vfs_unlink(parent_inode, de);}
开发者ID:NandanPhadke,项目名称:oslab,代码行数:11,


示例12: u2fs_rmdir

static int u2fs_rmdir(struct inode *dir, struct dentry *dentry){	struct dentry *lower_dentry;	struct dentry *lower_dir_dentry;	int err;	struct path lower_path;		/* creating whiteout if directory was in read-only */	if((U2FS_D(dentry)->lower_path[LEFT].dentry) == NULL && 		(U2FS_D(dentry)->lower_path[LEFT].mnt) == NULL){		err = create_whiteout(dentry);			if(err)			err = -EIO;		goto out_whiteout;	}		u2fs_get_lower_path(dentry, &lower_path, LEFT);	lower_dentry = lower_path.dentry;	lower_dir_dentry = lock_parent(lower_dentry);	err = mnt_want_write(lower_path.mnt);	if (err)		goto out_unlock;		err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);		if (err)		goto out;	if (dentry->d_inode)		clear_nlink(dentry->d_inode);	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);	fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode);	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink);out:	mnt_drop_write(lower_path.mnt);out_unlock:	unlock_dir(lower_dir_dentry);	u2fs_put_lower_path(dentry, &lower_path);	/* creating whiteout if file as existing in both branches */	if((U2FS_D(dentry)->lower_path[RIGHT].dentry) != NULL && 		(U2FS_D(dentry)->lower_path[RIGHT].mnt) != NULL){		err = create_whiteout(dentry);			if(err)			err = -EIO;	}	d_drop(dentry);out_whiteout:	return err;}
开发者ID:abhishekgupta8,项目名称:fan-out-unification-file-system-u2fs,代码行数:52,


示例13: nfsd4_clear_clid_dir

static intnfsd4_clear_clid_dir(struct dentry *dir, struct dentry *dentry){	int status;	/* For now this directory should already be empty, but we empty it of	 * any regular files anyway, just in case the directory was created by	 * a kernel from the future.... */	nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file);	mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);	status = vfs_rmdir(dir->d_inode, dentry);	mutex_unlock(&dir->d_inode->i_mutex);	return status;}
开发者ID:PennPanda,项目名称:linux-repo,代码行数:14,


示例14: do_vfsub_rmdir

int do_vfsub_rmdir(struct inode *dir, struct dentry *dentry){	int err;	LKTRTrace("i%lu, %.*s/n", dir->i_ino, AuDLNPair(dentry));	IMustLock(dir);	lockdep_off();	err = vfs_rmdir(dir, dentry);	lockdep_on();	/* dir inode is locked */	if (!err)		au_update_fuse_h_inode(NULL, dentry->d_parent); /*ignore*/	return err;}
开发者ID:wosigh,项目名称:patches,代码行数:15,


示例15: rmdir

static int rmdir(int argc, char *argv[]){    if(argc != 2) {        printf("Usage: %s dir/n", argv[0]);        return 1;    }    char *path = vfs_path_mkabsolute(cwd, argv[1]);    errval_t err = vfs_rmdir(path);    free(path);    if (err_is_fail(err)) {        printf("%s/n", err_getstring(err));        return 1;    } else {        return 0;    }}
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:17,


示例16: vfsub_rmdir

int vfsub_rmdir(struct inode *dir, struct path *path){	int err;	struct dentry *d;	IMustLock(dir);	d = path->dentry;	path->dentry = d->d_parent;	err = security_path_rmdir(path, d);	path->dentry = d;	if (unlikely(err))		goto out;	lockdep_off();	err = vfs_rmdir(dir, path->dentry);	lockdep_on();	if (!err) {		struct path tmp = {			.dentry	= path->dentry->d_parent,			.mnt	= path->mnt		};		vfsub_update_h_iattr(&tmp, /*did*/NULL); /*ignore*/	}out:	return err;}/* ---------------------------------------------------------------------- *//* todo: support mmap_sem? */ssize_t vfsub_read_u(struct file *file, char __user *ubuf, size_t count,		     loff_t *ppos){	ssize_t err;	lockdep_off();	err = vfs_read(file, ubuf, count, ppos);	lockdep_on();	if (err >= 0)		vfsub_update_h_iattr(&file->f_path, /*did*/NULL); /*ignore*/	return err;}
开发者ID:aywq2008,项目名称:omniplay,代码行数:45,


示例17: cmd_vfs_rmdir

static int cmd_vfs_rmdir(struct vmm_chardev *cdev, const char *path){	int rc;	struct stat st;	rc = vfs_stat(path, &st);	if (rc) {		vmm_cprintf(cdev, "Path %s does not exist./n", path);		return rc;	}	if (!(st.st_mode & S_IFDIR)) {		vmm_cprintf(cdev, "Path %s should be directory./n", path);		return VMM_EINVALID;	}	return vfs_rmdir(path);}
开发者ID:MaiDaftedar,项目名称:xvisor-next,代码行数:18,


示例18: scfs_mkdir

/* * scfs_mkdir * * Parameters: * @*dir: inode of the dir to create * @*scfs_dentry: dentry of the dir to create * @mode: * * Return: * SCFS_SUCCESS if success, otherwise if error * * Description: * mkdir() for SCFS. */static int scfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode){	struct dentry *lower_dir_dentry;	struct dentry *lower_parent_dentry;	int ret;	SCFS_DEBUG_START;		lower_dir_dentry = scfs_lower_dentry(dentry);	lower_parent_dentry = lock_parent(lower_dir_dentry);	ret = vfs_mkdir(lower_parent_dentry->d_inode, lower_dir_dentry, mode);	if (ret || !lower_dir_dentry->d_inode) {		SCFS_PRINT_ERROR("dir %s vfs_mkdir failed, "			"lower_dir %s lower_parent %s mode %x/n",			dentry->d_name.name,			lower_dir_dentry->d_name.name,			lower_parent_dentry->d_name.name, mode);		goto out;	}	ret = scfs_interpose(lower_dir_dentry, dentry, dir->i_sb);	if (ret) {		SCFS_PRINT_ERROR("dir %s interpose failed, "			"lower_dir %s lower_parent %s mode %x/n",			dentry->d_name.name,			lower_dir_dentry->d_name.name,			lower_parent_dentry->d_name.name, mode);		vfs_rmdir(lower_parent_dentry->d_inode, lower_dir_dentry);		goto out;	}	fsstack_copy_attr_times(dir, lower_parent_dentry->d_inode);	fsstack_copy_inode_size(dir, lower_parent_dentry->d_inode);	set_nlink(dir, lower_parent_dentry->d_inode->i_nlink);out:	unlock_dir(lower_parent_dentry);	if (!dentry->d_inode)		d_drop(dentry);	SCFS_DEBUG_END;	return ret;}
开发者ID:bju2000,项目名称:android_kernel_samsung_slteskt,代码行数:56,


示例19: esdfs_rmdir

static int esdfs_rmdir(struct inode *dir, struct dentry *dentry){	struct dentry *lower_dentry;	struct dentry *lower_dir_dentry;	int err;	struct path lower_path;	const struct cred *creds =			esdfs_override_creds(ESDFS_SB(dir->i_sb), NULL);	if (!creds)		return -ENOMEM;	/* Never remove a pseudo link target.  Only the source. */	if (ESDFS_DENTRY_HAS_STUB(dentry))		esdfs_get_lower_stub_path(dentry, &lower_path);	else		esdfs_get_lower_path(dentry, &lower_path);	lower_dentry = lower_path.dentry;	lower_dir_dentry = lock_parent(lower_dentry);	err = mnt_want_write(lower_path.mnt);	if (err)		goto out_unlock;	err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);	if (err)		goto out;	d_drop(dentry);	/* drop our dentry on success (why not VFS's job?) */	if (dentry->d_inode)		clear_nlink(dentry->d_inode);	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);	fsstack_copy_inode_size(dir, lower_dir_dentry->d_inode);	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink);out:	mnt_drop_write(lower_path.mnt);out_unlock:	unlock_dir(lower_dir_dentry);	esdfs_put_lower_path(dentry, &lower_path);	esdfs_revert_creds(creds, NULL);	return err;}
开发者ID:itsmerajit,项目名称:kernel_otus,代码行数:41,


示例20: unionfs_rmdir_first

static int unionfs_rmdir_first(struct inode *dir, struct dentry *dentry,			       struct unionfs_dir_state *namelist){	int err;	struct dentry *hidden_dentry;	struct dentry *hidden_dir_dentry = NULL;	print_entry_location();	fist_print_dentry("IN unionfs_rmdir_first: ", dentry);	/* Here we need to remove whiteout entries. */	err = delete_whiteouts(dentry, dbstart(dentry), namelist);	if (err) {		goto out;	}	hidden_dentry = dtohd(dentry);	PASSERT(hidden_dentry);	hidden_dir_dentry = lock_parent(hidden_dentry);	/* avoid destroying the hidden inode if the file is in use */	DGET(hidden_dentry);	if (!(err = is_robranch(dentry))) {		err = vfs_rmdir(hidden_dir_dentry->d_inode, hidden_dentry);	}	DPUT(hidden_dentry);	fist_copy_attr_times(dir, hidden_dir_dentry->d_inode);	/* propagate number of hard-links */	dentry->d_inode->i_nlink = get_nlinks(dentry->d_inode);      out:	if (hidden_dir_dentry) {		unlock_dir(hidden_dir_dentry);	}	fist_print_dentry("OUT unionfs_rmdir_first: ", dentry);	print_exit_status(err);	return err;}
开发者ID:rickgaiser,项目名称:kernelloader,代码行数:40,


示例21: ecryptfs_rmdir

static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry){	struct dentry *lower_dentry;	struct dentry *lower_dir_dentry;	int rc;	lower_dentry = ecryptfs_dentry_to_lower(dentry);	dget(dentry);	lower_dir_dentry = lock_parent(lower_dentry);	dget(lower_dentry);	rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);	dput(lower_dentry);	if (!rc && dentry->d_inode)		clear_nlink(dentry->d_inode);	fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);	set_nlink(dir, lower_dir_dentry->d_inode->i_nlink);	unlock_dir(lower_dir_dentry);	if (!rc)		d_drop(dentry);	dput(dentry);	return rc;}
开发者ID:Vagelis1608,项目名称:-V-_Kernel_2,代码行数:22,


示例22: dev_rmdir

static int dev_rmdir(const char *name){    struct path parent;    struct dentry *dentry;    int err;    dentry = kern_path_locked(name, &parent);    if (IS_ERR(dentry))        return PTR_ERR(dentry);    if (dentry->d_inode) {        if (dentry->d_inode->i_private == &thread)            err = vfs_rmdir(parent.dentry->d_inode, dentry);        else            err = -EPERM;    } else {        err = -ENOENT;    }    dput(dentry);    mutex_unlock(&parent.dentry->d_inode->i_mutex);    path_put(&parent);    return err;}
开发者ID:twobrokenshoes,项目名称:linux-3.8,代码行数:22,


示例23: delete_dev_dir

//====================================================================// Delete the given device directory. Returns 0 on success and// non-zero on failure.static int delete_dev_dir(const char *dev_dir_path) {    int err = 0;    struct path path;    unsigned int lookup_flags = LOOKUP_REVAL;    // Look up the path for this directory.    if ((err = kern_path(dev_dir_path, lookup_flags, &path)) != 0) {        return err;    }    if (!path.dentry || !path.dentry->d_parent) {        ALERT("Undelete device directory entry has no parent");        return -EINVAL;    }    if ((err = vfs_rmdir(path.dentry->d_parent->d_inode,                         path.dentry)) != 0) {        return err;    }    return err;}
开发者ID:Bredgren,项目名称:CSE451,代码行数:25,


示例24: main

int main(int argc, char *argv[]){    errval_t err;    // initialization    vfs_init();    bench_init();    // mount nfs    err = vfs_mkdir("/nfs");    assert(err_is_ok(err));    err = vfs_mount("/nfs", "nfs://10.110.4.4/local/nfs");    assert(err_is_ok(err));    // argument processing    if (argc == 3) {        printf("Started vfs_bench in command-line mode/n");        int32_t chunksize = atol(argv[1]);        int32_t repetitions = atol(argv[2]);        single_run(chunksize, repetitions);    } else {        printf("Started vfs_bench./n");        for (int32_t i = 1; i < 20; i++) {            single_run(4096, i * 2000);        }    }    //err = vfs_unmount("/nfs"); // unmount is NYI    //assert(err_is_ok(err));    err = vfs_rmdir("/nfs");    assert(err_is_ok(err));    return 0;}
开发者ID:Karamax,项目名称:arrakis,代码行数:37,


示例25: do_rmdir

static int do_rmdir(int argc, char ** argv){	char fpath[VFS_MAX_PATH];	int ret = 0;	int i;	if(argc < 2)	{		usage();		return -1;	}	for(i = 1; i < argc; i++)	{		if(shell_realpath(argv[i], fpath) < 0)			continue;		if(vfs_rmdir(fpath) != 0)		{			ret = -1;			printf("mkdir: failed to remove directory %s/r/n", fpath);		}	}	return ret;}
开发者ID:xboot,项目名称:xboot,代码行数:24,



注:本文中的vfs_rmdir函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vfs_setbootfs函数代码示例
C++ vfs_rename函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。