devfs_vnops.c (30d239bc4c510432e65a84fa1c14ed67a3ab1c92) | devfs_vnops.c (397c19d1753d210247d77eb3ca33d1c7c1eb2fa9) |
---|---|
1/*- 2 * Copyright (c) 2000-2004 3 * Poul-Henning Kamp. All rights reserved. 4 * Copyright (c) 1989, 1992-1993, 1995 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software donated to Berkeley by 8 * Jan-Simon Pendry. --- 786 unchanged lines hidden (view full) --- 795 796#if 0 /* /dev/console */ 797 KASSERT(fp != NULL, 798 ("Could not vnode bypass device on NULL fp")); 799#else 800 if(fp == NULL) 801 return (error); 802#endif | 1/*- 2 * Copyright (c) 2000-2004 3 * Poul-Henning Kamp. All rights reserved. 4 * Copyright (c) 1989, 1992-1993, 1995 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software donated to Berkeley by 8 * Jan-Simon Pendry. --- 786 unchanged lines hidden (view full) --- 795 796#if 0 /* /dev/console */ 797 KASSERT(fp != NULL, 798 ("Could not vnode bypass device on NULL fp")); 799#else 800 if(fp == NULL) 801 return (error); 802#endif |
803 FILE_LOCK(fp); | |
804 KASSERT(fp->f_ops == &badfileops, 805 ("Could not vnode bypass device on fdops %p", fp->f_ops)); | 803 KASSERT(fp->f_ops == &badfileops, 804 ("Could not vnode bypass device on fdops %p", fp->f_ops)); |
806 fp->f_data = dev; 807 fp->f_ops = &devfs_ops_f; 808 FILE_UNLOCK(fp); | 805 finit(fp, fp->f_flag, DTYPE_VNODE, dev, &devfs_ops_f); |
809 return (error); 810} 811 812static int 813devfs_pathconf(struct vop_pathconf_args *ap) 814{ 815 816 switch (ap->a_name) { --- 588 unchanged lines hidden --- | 806 return (error); 807} 808 809static int 810devfs_pathconf(struct vop_pathconf_args *ap) 811{ 812 813 switch (ap->a_name) { --- 588 unchanged lines hidden --- |