1#define DEBUG 1 2/* 3 * Copyright (c) 2000 4 * Poul-Henning Kamp. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vfsops.c 1.36 28 * |
29 * $FreeBSD: head/sys/fs/devfs/devfs_devs.c 83366 2001-09-12 08:38:13Z julian $ |
30 */ 31 32#include "opt_devfs.h" 33#ifndef NODEVFS 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/conf.h> --- 240 unchanged lines hidden (view full) --- 278 int i, j; 279 dev_t dev, pdev; 280 struct devfs_dirent *dd; 281 struct devfs_dirent *de, **dep; 282 char *q, *s; 283 284 if (dm->dm_generation == devfs_generation) 285 return (0); |
286 lockmgr(&dm->dm_lock, LK_UPGRADE, 0, curthread); |
287 if (devfs_noverflow && dm->dm_overflow == NULL) { 288 i = devfs_noverflow * sizeof (struct devfs_dirent *); 289 MALLOC(dm->dm_overflow, struct devfs_dirent **, i, 290 M_DEVFS, M_WAITOK | M_ZERO); 291 } 292 while (dm->dm_generation != devfs_generation) { 293 dm->dm_generation = devfs_generation; 294 for (i = 0; i <= devfs_topino; i++) { --- 58 unchanged lines hidden (view full) --- 353 *dep = de; 354 de->de_dir = dd; 355 TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list); 356#if 0 357 printf("Add ino%d %s\n", i, dev->si_name); 358#endif 359 } 360 } |
361 lockmgr(&dm->dm_lock, LK_DOWNGRADE, 0, curthread); |
362 return (0); 363} 364 365static void 366devfs_create(dev_t dev) 367{ 368 int ino, i, *ip; 369 dev_t *dp; --- 66 unchanged lines hidden --- |