linux_file.c (cd72f2180bfff020d03180e6eba1c3a0e0125468) | linux_file.c (48e3128b34dad9618402f1f4095f7655e779843c) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 256 unchanged lines hidden (view full) --- 265 if ((error = getvnode(td->td_proc->p_fd, args->fd, &fp)) != 0) 266 return (error); 267 268 if ((fp->f_flag & FREAD) == 0) { 269 fdrop(fp, td); 270 return (EBADF); 271 } 272 | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 256 unchanged lines hidden (view full) --- 265 if ((error = getvnode(td->td_proc->p_fd, args->fd, &fp)) != 0) 266 return (error); 267 268 if ((fp->f_flag & FREAD) == 0) { 269 fdrop(fp, td); 270 return (EBADF); 271 } 272 |
273 vp = fp->un_data.vnode; | 273 vp = fp->f_data; |
274 if (vp->v_type != VDIR) { 275 fdrop(fp, td); 276 return (EINVAL); 277 } 278 279 if ((error = VOP_GETATTR(vp, &va, td->td_ucred, td))) { 280 fdrop(fp, td); 281 return (error); --- 854 unchanged lines hidden --- | 274 if (vp->v_type != VDIR) { 275 fdrop(fp, td); 276 return (EINVAL); 277 } 278 279 if ((error = VOP_GETATTR(vp, &va, td->td_ucred, td))) { 280 fdrop(fp, td); 281 return (error); --- 854 unchanged lines hidden --- |