Changeset View
Changeset View
Standalone View
Standalone View
head/sys/ufs/ffs/ffs_alloc.c
Show First 20 Lines • Show All 3,425 Lines • ▼ Show 20 Lines | if (fsckcmds) { | ||||
if (copyinstr((char *)(intptr_t)cmd.value, buf,32,NULL)) | if (copyinstr((char *)(intptr_t)cmd.value, buf,32,NULL)) | ||||
strncpy(buf, "Name_too_long", 32); | strncpy(buf, "Name_too_long", 32); | ||||
printf("%s: unlink %s (inode %jd)\n", | printf("%s: unlink %s (inode %jd)\n", | ||||
mp->mnt_stat.f_mntonname, buf, (intmax_t)cmd.size); | mp->mnt_stat.f_mntonname, buf, (intmax_t)cmd.size); | ||||
} | } | ||||
#endif /* DEBUG */ | #endif /* DEBUG */ | ||||
/* | /* | ||||
* kern_unlinkat will do its own start/finish writes and | * kern_funlinkat will do its own start/finish writes and | ||||
* they do not nest, so drop ours here. Setting mp == NULL | * they do not nest, so drop ours here. Setting mp == NULL | ||||
* indicates that vn_finished_write is not needed down below. | * indicates that vn_finished_write is not needed down below. | ||||
*/ | */ | ||||
vn_finished_write(mp); | vn_finished_write(mp); | ||||
mp = NULL; | mp = NULL; | ||||
error = kern_unlinkat(td, AT_FDCWD, (char *)(intptr_t)cmd.value, | error = kern_funlinkat(td, AT_FDCWD, | ||||
UIO_USERSPACE, 0, (ino_t)cmd.size); | (char *)(intptr_t)cmd.value, FD_NONE, UIO_USERSPACE, | ||||
0, (ino_t)cmd.size); | |||||
break; | break; | ||||
case FFS_SET_INODE: | case FFS_SET_INODE: | ||||
if (ump->um_fsckpid != td->td_proc->p_pid) { | if (ump->um_fsckpid != td->td_proc->p_pid) { | ||||
error = EPERM; | error = EPERM; | ||||
break; | break; | ||||
} | } | ||||
#ifdef DEBUG | #ifdef DEBUG | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |