Minor kernel changes.

This commit is contained in:
Geoffrey Challen
2017-02-09 09:53:00 -05:00
parent 0f0c5fcfc7
commit 15abe49f09
3 changed files with 31 additions and 0 deletions

View File

@@ -135,6 +135,13 @@ getdevice(char *path, char **subpath, struct vnode **startvn)
KASSERT(vfs_biglock_do_i_hold());
/*
* Entirely empty filenames aren't legal.
*/
if (path[0] == 0) {
return EINVAL;
}
/*
* Locate the first colon or slash.
*/