fix error check
This commit is contained in:
parent
a742aed5ad
commit
3f6e061948
@ -551,7 +551,10 @@ PRIVATE dev_t name_to_dev()
|
|||||||
struct vnode *vp;
|
struct vnode *vp;
|
||||||
|
|
||||||
/* Request lookup */
|
/* Request lookup */
|
||||||
if ((r = lookup_vp(0 /*flags*/, 0 /*!use_realuid*/, &vp)) != OK) return r;
|
if ((r = lookup_vp(0 /*flags*/, 0 /*!use_realuid*/, &vp)) != OK) {
|
||||||
|
printf("vfs: name_to_dev: lookup of '%s' failed\n", user_realpath);
|
||||||
|
return NO_DEV;
|
||||||
|
}
|
||||||
|
|
||||||
if ((vp->v_mode & I_TYPE) != I_BLOCK_SPECIAL) {
|
if ((vp->v_mode & I_TYPE) != I_BLOCK_SPECIAL) {
|
||||||
err_code = ENOTBLK;
|
err_code = ENOTBLK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user